/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 强制使用亮色主题 */
:root {
    color-scheme: light only;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f0f8ff;
    color: #333;
    line-height: 1.6;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    overflow-x: hidden;
}

/* 粒子背景样式 */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #e6f2ff 0%, #f0f8ff 100%);
}

/* 页面加载动画 */
.container {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 视差滚动效果 */
.header {
    position: relative;
    z-index: 10;
}

.main-content {
    position: relative;
    z-index: 5;
}



/* 背景渐变动画 */
.header {
    background: linear-gradient(135deg, #448bf1 0%, #1a73e8 100%);
}

/* 脉冲动画 */
.feature-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* 确保在暗色模式下仍然使用亮色主题 */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light;
    }
    
    body {
        background-color: #f0f8ff !important;
        color: #333 !important;
    }
    
    /* 强制所有文本使用深色 */
    * {
        color: #333 !important;
    }
    
    /* 强制所有背景使用浅色 */
    .container, .header, .main-content, .feature-card, .footer, .page-header {
        background-color: inherit !important;
        color: inherit !important;
    }
    
    /* 特定元素的背景色强制覆盖 */
    .container {
        background: linear-gradient(135deg, #e6f2ff 0%, #f0f8ff 100%) !important;
    }
    
    .header, .page-header {
        background: linear-gradient(135deg, #448bf1 0%, #1a73e8 100%) !important;
        color: white !important;
    }
    
    .feature-card {
        background: white !important;
    }
    
    .footer {
        background: inherit !important;
        color: inherit !important;
    }
}

/* 容器样式 */
.container {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: linear-gradient(135deg, #e6f2ff 0%, #f0f8ff 100%);
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #448bf1 0%, #1a73e8 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 500px;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(68, 139, 241, 0.1);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: rgba(68, 139, 241, 0.3);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #448bf1, #1a73e8);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(68, 139, 241, 0.1);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.feature-card:hover .card-icon {
    background: rgba(68, 139, 241, 0.2);
}

.card-icon i {
    transition: transform 0.3s ease;
}

.feature-card:hover .card-icon i {
    transform: scale(1.05);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a73e8;
}

.card-description {
    font-size: 1rem;
    color: #5f6368;
    margin-bottom: 1rem;
}

.card-arrow {
    font-size: 1.5rem;
    color: #448bf1;
    font-weight: bold;
    margin-top: auto;
    transition: transform 0.3s ease;
}

.feature-card:hover .card-arrow {
    transform: translateX(3px);
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 0;
    font-size: 0.9rem;
}

/* 响应式设计 - 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        padding: 2rem 1rem;
    }
    
    .main-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .main-content {
        padding: 1.5rem 0;
    }
    
    .feature-cards {
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }
    
    .card-icon i {
        font-size: 1.8rem !important;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .card-description {
        font-size: 0.95rem;
    }
    
    /* 移动端优化：简化动画效果 */
    .feature-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .feature-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }
    
    /* 移动端禁用粒子效果 */
    #particles-js {
        display: none;
    }
    
    /* 移动端优化字体渲染 */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
    }
    
    .card-icon i {
        font-size: 1.5rem !important;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .card-description {
        font-size: 0.9rem;
    }
    
    /* 移动端禁用鼠标视差效果 */
    .feature-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
}

/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .feature-cards {
        max-width: 600px;
    }
    
    .feature-card {
        padding: 1.75rem;
    }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
    .feature-cards {
        max-width: 600px;
    }
    
    .feature-card {
        padding: 2.5rem;
    }
}

/* 页面通用样式 */
.page-header {
    background: linear-gradient(135deg, #448bf1 0%, #1a73e8 100%);
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.back-button {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 600;
}

.page-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* 选择器样式 */
.selector-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.selector-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a73e8;
}

.selector-group {
    margin-bottom: 1.5rem;
}

.selector-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #5f6368;
}

.selector {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
}

/* 按钮样式 */
.button {
    background: #4285f4;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.button:hover {
    background: #3367d6;
}

.button:disabled {
    background: #dadce0;
    color: #5f6368;
    cursor: not-allowed;
}

.button-container {
    text-align: center;
    margin: 1.5rem 0;
}

/* 结果展示区域 */
.results-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.result-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a73e8;
}

.result-item {
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
}

.result-item:last-child {
    border-bottom: none;
}

.result-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.result-info {
    color: #5f6368;
    font-size: 0.9rem;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(26, 115, 232, 0.2);
    border-top: 4px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #5f6368;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-text {
    font-size: 1.1rem;
}

/* 按钮样式 */
.btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
    display: inline-block;
}

.btn:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-deep);
    border-color: var(--brand-deep);
    color: #fff;
}

.btn-danger {
    background: #fff;
    border-color: var(--brand);
    color: var(--brand);
}

.btn-danger:hover {
    background: var(--brand);
    color: #fff;
}

.modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.modal-actions .btn {
    flex: 1;
}

/* 登录弹窗样式 */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 380px;
    width: 90%;
    position: relative;
}

.auth-popup .auth-popup-head {
    text-align: center;
    margin-bottom: 20px;
}

.auth-popup .auth-popup-head h3 {
    margin: 0 0 6px;
    font-size: 18px;
    color: var(--brand-deep);
}

.auth-popup .auth-popup-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.auth-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}

.auth-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.auth-tabs .tab.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    font-weight: 600;
}

.auth-popup .field {
    margin-bottom: 12px;
}

.auth-popup .field label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.auth-popup .field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.auth-popup .field input:focus {
    outline: none;
    border-color: var(--brand);
}

.auth-popup .actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.auth-popup .actions .btn {
    flex: 1;
}

.auth-popup .links {
    text-align: center;
}

.auth-popup .links a {
    color: var(--brand-mid);
    font-size: 13px;
    text-decoration: none;
}

.auth-popup .links a:hover {
    text-decoration: underline;
}

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(47, 74, 97, 0.9);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10001;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============ 付费墙模糊效果 ============ */
/* 仅 12-29 豁免（仅 weekly-report 生效：它把选中日期写到 body） */
body.paywall-active .date-image,
body.paywall-active .resort-image {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

body.paywall-active[data-current-date="12-29"] .resort-image {
    filter: none;
    pointer-events: auto;
}