/* --- Global Variables --- */
:root {
    --primary-blue: #007AFF;
    --accent-green: #34C759;
    --background-gradient-start: #FFFFFF;
    --background-gradient-end: #F5F5F7;
    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --card-border-radius: 16px;
    --card-background: #FFFFFF;
    --input-border-color: #D1D1D6;

    /* Responsive Typography & Spacing */
    --font-size-base: clamp(16px, 1.5vw + 0.5rem, 18px); /* Base font size */
    --font-size-h1: clamp(2.5rem, 5vw + 1rem, 3.5rem); /* ~40px to 56px */
    --font-size-h2: clamp(2rem, 4vw + 1rem, 2.625rem); /* ~32px to 42px */
    --font-size-h3: clamp(1.25rem, 2vw + 0.5rem, 1.5rem); /* ~20px to 24px */

    --spacing-sm: clamp(0.5rem, 1vw + 0.2rem, 0.75rem); /* ~8px to 12px */
    --spacing-md: clamp(1rem, 2vw + 0.5rem, 1.25rem); /* ~16px to 20px */
    --spacing-lg: clamp(1.5rem, 3vw + 0.5rem, 2rem); /* ~24px to 32px */
    --spacing-xl: clamp(2.5rem, 5vw + 1rem, 4rem); /* ~40px to 64px */
    --spacing-xxl: clamp(4rem, 8vw + 1rem, 6.25rem); /* ~64px to 100px */
}

/* --- Global Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, var(--background-gradient-start), var(--background-gradient-end));
    color: var(--text-primary);
    line-height: 1.6;
    font-size: var(--font-size-base); /* Apply responsive base font size */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

main {
    flex-grow: 1; /* 讓 main 區域填充剩餘空間 */
    width: 100%;
}

.main-header, .main-footer {
    width: 100%;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding-left: var(--spacing-md); /* Use responsive padding */
    padding-right: var(--spacing-md); /* Use responsive padding */
}

/* --- Header & Navigation Styles --- */
.main-header {
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid #EAEAEA;
    background-color: var(--background-gradient-start);
    position: sticky; /* Make header sticky */
    top: 0;           /* Stick to the top */
    z-index: 999;     /* Ensure it's above other content */
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: clamp(1rem, 3vw, 1.25rem); /* Responsive logo text */
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0; /* Prevent logo from shrinking too much */
}

.logo-icon {
    margin-right: calc(var(--spacing-sm) / 2); /* Smaller gap */
    font-size: clamp(1.2rem, 4vw, 1.5rem); /* Responsive icon */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.logo span {
    display: inline-block; /* Ensure span respects white-space */
}


.main-nav {
    display: none; /* Mobile first: hide nav */
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg); /* Responsive gap */
    padding: 0; /* Remove default padding */
    margin: 0;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap; /* Prevent nav links wrapping */
    font-size: clamp(0.9rem, 1.5vw, 1rem); /* Responsive nav links */
}

.main-nav a:hover {
    color: var(--primary-blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm); /* Responsive gap */
    flex-shrink: 0; /* Prevent buttons from shrinking too much */
}

/* --- Button Styles --- */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md); /* Responsive padding */
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: clamp(0.9rem, 1.2vw + 0.5rem, 1rem); /* Responsive button text */
    white-space: nowrap;
}
.header-actions .btn {
    width: auto;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: #FFF;
}
.btn-primary:hover:not(:disabled) { opacity: 0.9; }

.btn-large {
    padding: var(--spacing-md) var(--spacing-lg); /* Larger responsive padding */
    font-size: clamp(1rem, 1.5vw + 0.5rem, 1.1rem);
    width: auto;
}

.btn-secondary {
    background-color: #fff;
    color: var(--text-primary);
    border: 1px solid var(--input-border-color);
}
.btn-secondary:hover:not(:disabled) { background-color: #f5f5f5; }

/* --- Hero Section Styles --- */
.hero-section {
    text-align: center;
    padding: var(--spacing-xxl) 0; /* Responsive padding */
}

.hero-section h1 {
    font-size: var(--font-size-h1); /* Responsive H1 */
    font-weight: 700;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.2;
}

.hero-section .subtitle {
    font-size: clamp(1rem, 2vw + 0.5rem, 1.25rem); /* Responsive subtitle */
    color: var(--text-secondary);
    max-width: 650px;
    margin: var(--spacing-md) auto var(--spacing-xl); /* Responsive margin */
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on small screens */
    justify-content: center;
    gap: var(--spacing-md); /* Responsive gap */
}

/* --- Features Section Styles --- */
.features-section {
    padding: var(--spacing-xl) 0; /* Responsive padding */
}

.section-title {
    font-size: var(--font-size-h2); /* Responsive H2 */
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-lg); /* Responsive margin */
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first: single column */
    gap: var(--spacing-lg); /* Responsive gap */
}

.feature-card {
    background-color: var(--card-background);
    border-radius: var(--card-border-radius);
    padding: var(--spacing-lg); /* Responsive padding */
    box-shadow: var(--card-shadow);
    border: 1px solid #EAEAEA;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature-card h3 {
    font-size: var(--font-size-h3); /* Responsive H3 */
    margin-bottom: var(--spacing-sm); /* Responsive margin */
}

.feature-card p {
    color: var(--text-secondary);
    flex-grow: 1;
    font-size: clamp(0.9rem, 1.2vw + 0.5rem, 1rem); /* Responsive paragraph */
}

.badge { /* Style for Coming Soon etc. */
    position: absolute;
    top: var(--spacing-md);
    background-color: var(--accent-green);
    color: #fff;
    padding: calc(var(--spacing-sm) / 2) var(--spacing-sm);
    border-radius: 6px;
    font-size: clamp(0.7rem, 1vw + 0.3rem, 0.75rem);
    font-weight: 700;
}

.feature-badge { right: var(--spacing-md); }

/* --- Pricing Section Styles --- */
.pricing-section {
    padding: var(--spacing-xl) 0; /* Responsive padding */
    background-color: #FAFAFC;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first: single column */
    gap: var(--spacing-lg); /* Responsive gap */
    align-items: stretch; /* Make cards same height */
}

.pricing-card {
    background-color: var(--card-background);
    border-radius: var(--card-border-radius);
    padding: var(--spacing-lg) var(--spacing-md); /* Responsive padding */
    box-shadow: var(--card-shadow);
    border: 2px solid #EAEAEA;
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pricing-card .choose-plan-btn { /* Style for original buttons */
    width: 100%;
    margin-top: auto; /* Push button to the bottom initially */
    margin-bottom: var(--spacing-md); /* Add space below button */
}

.paypal-button-container { /* Style for PayPal containers */
    margin-top: var(--spacing-md); /* Add space above PayPal buttons */
    min-height: 40px; /* Reserve space */
}

.pricing-card.selected-plan {
    border-color: var(--primary-blue);
    transform: scale(1.02);
}

.pricing-card .badge { /* Style for Recommended */
    right: -40px;
    transform: rotate(45deg);
    padding: calc(var(--spacing-sm) / 2) var(--spacing-xl);
    top: var(--spacing-md);
}

.pricing-card h3 {
    font-size: var(--font-size-h3); /* Responsive H3 */
    margin-bottom: var(--spacing-sm);
}

.pricing-card .price {
    font-size: clamp(0.9rem, 1.2vw + 0.5rem, 1rem); /* Responsive price text */
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.pricing-card .price span {
    font-size: clamp(2rem, 4vw + 1rem, 2.625rem); /* Responsive price number */
    font-weight: 700;
    color: var(--text-primary);
}

.plan-features {
    list-style: none;
    padding-left: 0;
    margin-bottom: var(--spacing-lg);
    flex-grow: 1;
}

.plan-features li {
    margin-bottom: var(--spacing-sm); /* Responsive margin */
    padding-left: calc(var(--spacing-md) + 5px); /* Responsive padding */
    position: relative;
    font-size: clamp(0.9rem, 1.2vw + 0.5rem, 1rem); /* Responsive list items */
}

.plan-features li::before {
    content: '✓';
    color: var(--accent-green);
    position: absolute;
    left: 0;
    font-weight: 700;
}

/* --- Generator and Form Styles --- */
.generator-section {
    padding: var(--spacing-xl) 0; /* Responsive padding */
}

.generator-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-background);
    padding: var(--spacing-lg); /* Responsive padding */
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid #EAEAEA;
}

.form-group {
    margin-bottom: var(--spacing-md); /* Responsive margin */
}
.form-group:last-child { margin-bottom: 0; }

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    font-size: clamp(0.9rem, 1.2vw + 0.5rem, 1rem); /* Responsive labels */
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first: single column */
    gap: var(--spacing-md); /* Responsive gap */
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first: single column */
    gap: var(--spacing-md); /* Responsive gap */
}

input[type="text"], input[type="email"], input[type="password"], textarea, select {
    width: 100%;
    padding: var(--spacing-sm); /* Responsive padding */
    border: 1px solid var(--input-border-color);
    border-radius: 8px;
    font-size: var(--font-size-base); /* Responsive font size */
    font-family: inherit; /* Use body font */
    background-color: #fff;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.result-box {
    width: 100%;
    min-height: 150px;
    background-color: #F5F5F7;
    border: 1px solid var(--input-border-color);
    border-radius: 8px;
    padding: var(--spacing-md); /* Responsive padding */
    color: var(--text-secondary);
    white-space: pre-wrap;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.9rem, 1.2vw + 0.5rem, 1rem);
}

/* --- Contact Section Styles --- */
.contact-section {
    padding: var(--spacing-xl) 0; /* Responsive padding */
    background-color: #FAFAFC;
}

.contact-section .subtitle {
    text-align: center;
    margin-top: calc(-1 * var(--spacing-lg)); /* Adjust based on title margin */
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 1.5vw + 0.5rem, 1.1rem);
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr; /* Mobile first: single column */
    gap: var(--spacing-md); /* Responsive gap */
    position: relative;
}

.contact-form .input-wrapper { position: relative; }
.contact-form .full-width { grid-column: 1 / -1; }

.contact-form button {
    width: auto;
    padding-left: var(--spacing-xl); /* Responsive padding */
    padding-right: var(--spacing-xl);
    justify-self: center;
    grid-column: 1 / -1;
}

#form-status {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: var(--spacing-sm);
    font-weight: 500;
    font-size: clamp(0.9rem, 1.2vw + 0.5rem, 1rem);
}
#form-status.success { color: var(--accent-green); }
#form-status.error { color: red; }

.error-message {
    color: red;
    font-size: clamp(0.8rem, 1vw + 0.4rem, 0.875rem); /* Responsive error text */
    height: 1.2em; /* Adjust height */
    margin-top: calc(var(--spacing-sm) / 2);
}

/* --- Export Options Styles --- */
.export-options {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first: single column */
    gap: var(--spacing-sm); /* Responsive gap */
}

.export-btn {
    padding: var(--spacing-sm); /* Responsive padding */
    font-size: var(--font-size-base); /* Responsive font size */
    font-weight: 500;
    border: 1px solid var(--input-border-color);
    background-color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
}

.export-btn:hover { border-color: var(--primary-blue); color: var(--primary-blue); }

.export-btn.premium-feature { color: var(--text-secondary); }

.export-btn.premium-feature span {
    background-color: var(--primary-blue);
    color: #fff;
    font-size: clamp(0.6rem, 0.8vw + 0.3rem, 0.625rem);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: var(--spacing-sm);
    font-weight: 700;
}

/* --- Footer Styles --- */
.main-footer {
    padding: var(--spacing-lg) 0; /* Responsive padding */
    text-align: center;
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 1vw + 0.4rem, 0.875rem); /* Responsive footer text */
    border-top: 1px solid #EAEAEA;
}

/* --- Loading Animation --- */
.loader { /* No changes needed */ }
@keyframes load { /* No changes needed */ }

/* --- 登录/注册弹窗样式 --- */
#auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex; /* Use flex to control visibility */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible; /* Control visibility */
    transition: opacity 0.3s ease, visibility 0s linear 0s;
    padding: 15px;
}

/* --- **Fix for hidden state** --- */
#auth-modal-overlay.hidden {
    opacity: 0;
    visibility: hidden; /* Hide completely */
    transition: opacity 0.3s ease, visibility 0s linear 0.3s; /* Delay hiding */
    pointer-events: none;
}


#auth-modal {
    background: var(--card-background);
    padding: var(--spacing-lg); /* Responsive padding */
    border-radius: var(--card-border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease;
}

#auth-modal-overlay.hidden #auth-modal {
    transform: scale(0.95);
}

#close-modal-btn { /* Style adjustments */
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: none;
    border: none;
    font-size: clamp(1.2rem, 2vw + 0.5rem, 1.5rem);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px; /* Increase clickable area */
    line-height: 1;
}

.auth-tabs { margin-bottom: var(--spacing-lg); /* Responsive margin */ }
.auth-tabs .tab-link {
    padding: var(--spacing-sm); /* Responsive padding */
    font-size: clamp(1rem, 1.5vw + 0.5rem, 1.1rem); /* Responsive tab text */
}
.auth-tabs .tab-link.active { /* No changes needed */ }

/* --- **Fix for Tab Content Display** --- */
.tab-content {
    display: none; /* Hide all tab content by default */
}
.tab-content.active {
    display: block; /* ONLY show the active tab content */
}


.tab-content h2 {
    font-size: var(--font-size-h3); /* Responsive modal title */
    margin-bottom: var(--spacing-md);
}
.tab-content .input-wrapper { margin-bottom: var(--spacing-md); /* Responsive margin */ }

.btn.full-width { width: 100%; }

.social-login { margin-top: var(--spacing-md); /* Responsive margin */ }
.social-login span { margin-bottom: var(--spacing-md); /* Responsive margin */ }
.social-login span::before, .social-login span::after { width: 38%; }
.social-login span::before { left: 0; }
.social-login span::after { right: 0; }

.btn-social-google { /* No major changes needed */ }
.btn-social-google::before { /* No changes needed */ }


/* === Responsive Breakpoints Start === */

/* Tablet (Portrait) & Larger (Apply general multi-column layouts) */
@media (min-width: 768px) {
    .main-nav { display: block; } /* Show nav */
    
    .features-grid { grid-template-columns: repeat(3, 1fr); } /* 3 columns for features */
    
    .pricing-grid { grid-template-columns: repeat(3, 1fr); } /* 3 columns for pricing */
    
    .settings-grid { grid-template-columns: repeat(2, 1fr); } /* Settings grid 2 columns */
    
    .action-buttons { grid-template-columns: 1fr 1fr; } /* Action buttons 2 columns */
    
    .contact-form { grid-template-columns: 1fr 1fr; } /* Contact form 2 columns */
    
    .export-options {
        display: flex; /* Export options horizontal */
        grid-template-columns: none;
        gap: var(--spacing-md); /* Adjust gap for flex */
    }
     .export-btn {
        width: auto; /* Allow buttons to size naturally */
        flex-grow: 1; /* Make buttons share space */
    }

    .cta-buttons { flex-direction: row; } /* CTA buttons horizontal */
    .cta-buttons .btn { width: auto; }
}

/* Tablet (Landscape) & Desktop Specific Adjustments (Refine 3-column grids if needed) */
@media (min-width: 1024px) {
    /* Ensure 3 columns are definitely used */
    .features-grid { grid-template-columns: repeat(3, 1fr); }
    .pricing-grid { grid-template-columns: repeat(3, 1fr); }

    /* Reset potential tablet overrides for the last card */
    .features-grid > .feature-card:last-child:nth-child(odd),
    .pricing-grid > .pricing-card:last-child:nth-child(odd) {
        grid-column: auto;
        max-width: none;
        justify-self: initial;
    }
     .settings-grid {
         grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Allow flexible columns on larger screens */
    }
}


/* Mobile Landscape Specific Adjustments (Optimize horizontal space) */
@media (max-width: 900px) and (orientation: landscape) { /* Adjusted max-width for landscape */
   .settings-grid {
        grid-template-columns: 1fr 1fr; /* Try 2 columns on mobile landscape */
    }
   .action-buttons {
        grid-template-columns: 1fr 1fr; /* Try 2 columns */
    }
    .export-options {
        grid-template-columns: repeat(3, 1fr); /* Try 3 columns */
    }
   #auth-modal {
       max-height: 90vh;
       overflow-y: auto;
   }
   .hero-section {
       padding-top: var(--spacing-xl);
       padding-bottom: var(--spacing-xl);
   }
}

/* Extra Small Screens (Further reduce sizes if needed) */
@media (max-width: 480px) {
   .container { padding-left: 15px; padding-right: 15px; } /* Reduce container padding */
   .btn { padding: 8px 16px; font-size: 14px;} /* Smaller buttons and text */
   .btn-large { padding: 12px 24px; font-size: 15px;}
   .feature-card, .pricing-card, .generator-container, #auth-modal { padding: var(--spacing-md); } /* Reduce card padding */
    .pricing-card .price span {
        font-size: clamp(1.8rem, 4vw + 0.8rem, 2.2rem); /* Slightly smaller price number */
    }
    .logo { 
        font-size: clamp(0.9rem, 4vw, 1rem); /* Further reduce font on small screens */
    }
     .logo-icon {
        font-size: clamp(1.1rem, 5vw, 1.3rem); /* Further reduce icon size */
     }
    .header-actions .btn {
        padding: 6px 10px; /* Even smaller buttons */
        font-size: 13px;
    }
}
/* ---------------
 * 账户页面 - "返回" 按钮样式
 * --------------- */
.btn-back {
    display: inline-block;
    margin-bottom: 20px; /* 和标题拉开距离 */
    font-size: 14px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
}
.btn-back:hover {
    color: #007bff;
    text-decoration: underline;
}

/* ---------------
 * 状态消息样式 (用于“保存成功”或“失败”)
 * --------------- */
.status-message {
    margin-top: 15px;
    font-size: 14px;
}
.success-message {
    color: green;
}
.error-message {
    color: red;
}

/* ---------------
 * 导航栏 "Active" 状态
 * (当用户在 'account.html' 页面时，高亮 'a啊' 按钮)
 * --------------- */
.header-actions .btn.active {
    background-color: #f0f0f0;
    color: #333;
    cursor: default;
}

/* ---------------
 * 账户中心 (Hub Page) 样式
 * --------------- */
.account-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.hub-card {
    display: block;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.hub-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.hub-card h3 {
    margin-top: 0;
    color: #007bff;
}

.hub-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.hub-card.disabled {
    background: #f9f9f9;
    color: #999;
    cursor: not-allowed;
}

.hub-card.disabled:hover {
    border-color: #ddd;
    box-shadow: none;
    transform: none;
}

.hub-card.disabled h3,
.hub-card.disabled p {
    color: #999;
}

.hub-card.disabled span {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    background: #eee;
    padding: 3px 8px;
    border-radius: 12px;
}

/* ---------------
 * 【新】导航栏 - 用户头像和下拉菜单
 * --------------- */

/* 1. 动态填充的 header-actions 容器 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 2. 用户头像 (CSS 模拟) */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #007bff; /* 默认背景色 */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
}

/* 3. 用户名 (用作下拉菜单的触发器) */
.nav-user-name {
    font-weight: 600;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    position: relative; /* 为下拉箭头定位 */
    padding-right: 15px; /* 为箭头留出空间 */
}

/* 4. 下拉箭头 */
.nav-user-name::after {
    content: '▼';
    font-size: 10px;
    color: #888;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s;
}

/* 5. 下拉菜单本身 (默认隐藏) */
.nav-user-dropdown {
    display: none; /* 默认隐藏 */
    position: absolute;
    top: 55px; /* 放在导航栏下方 */
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    width: 220px;
    z-index: 1000;
    overflow: hidden;
}

/* 6. 当菜单激活时 (通过 JS 添加 'active') */
.nav-user-dropdown.active {
    display: block;
}
.nav-user-name.active::after {
    transform: translateY(-50%) rotate(180deg); /* 箭头旋转 */
}


/* 7. 下拉菜单里的项目 */
.nav-user-dropdown a,
.nav-user-dropdown button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
}

.nav-user-dropdown a:hover,
.nav-user-dropdown button:hover {
    background-color: #f4f4f4;
}

/* 8. 菜单里的分割线 */
.nav-user-dropdown hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 4px 0;
}

/* ---------------
 * 【新】账户安全 - 危险区
 * --------------- */
hr.section-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 40px 0;
}

.danger-zone {
    border: 1px solid #dc3545; /* 红色边框 */
    border-radius: 8px;
    padding: 20px;
    background: #fff8f8;
}

.danger-zone h3 {
    color: #dc3545;
    margin-top: 0;
}

.danger-zone p {
    font-size: 14px;
    color: #555;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* ---------------
 * 【新】个人资料 - 头像上传样式
 * --------------- */
.avatar-upload-section {
    display: flex;
    align-items: center;
    gap: 20px; /* 图像和按钮之间的间距 */
    margin-bottom: 30px; /* 和下方的表单拉开距离 */
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%; /* 圆形 */
    background-color: #f0f0f0; /* 默认背景色 */
    border: 2px solid #ddd;
    object-fit: cover; /* 确保图片不变形 */
    color: #bbb; /* (如果图片加载失败，显示 'alt' 文本) */
    font-size: 12px;
    text-align: center;
}

/* 确保上传按钮样式不会太大 */
.avatar-upload-section .btn-secondary {
    font-size: 14px;
    padding: 8px 16px;
}

/*
 * ===================================================================
 * * Reportify AI - 修复补丁 (2025-11-13)
 * * 修复“方形头像” Bug
 * ===================================================================
*/

/* (!!!) 修复点: 修复 profile.html 上的“大”头像 */
#avatar-preview {
    display: block;
    width: 120px;       /* 确保尺寸统一 */
    height: 120px;
    border-radius: 50%; /* (!!!) 这是圆形修复 */
    object-fit: cover;  /* (!!!) 防止图片拉伸变形 */
    border: 3px solid #f0f0f0;
    margin-bottom: 1rem;
    background-color: #f9f9f9; /* 添加背景色以防图片加载失败 */
}

/* (!!!) 修复点: 修复右上角导航栏的“小”头像 */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* (!!!) 这是圆形修复 */
    background-color: #007bff; /* 默认背景色 (如果只有首字母) */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    overflow: hidden; /* (!!!) 确保 <img> 不会溢出 */
}

/* (!!!) 修复点: 确保头像内的 <img> 也是圆形的 */
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* (!!!) 防止图片拉伸变形 */
}

/* 修复账户页页眉间距 */
.account-header {
    background-color: #fff;
    position: relative; /* 防止它浮动 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* 确保内容不会被遮挡 */
.account-hub {
    padding-top: 20px;
}

/* 让账户页面的页眉有白色背景，并且不浮动 */
.account-header {
    background-color: #ffffff;
    position: relative !important; /* 强制相对定位 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* =========================================
   2025-11-13 紧急修复补丁
   ========================================= */

/* 1. 修复：隐藏工具类 (解决模板弹窗、登录弹窗直接显示的问题) */
.hidden {
    display: none !important;
}

/* 2. 修复：右上角导航容器 (解决下拉菜单乱跑的问题) */
.header-actions {
    position: relative; /* 让下拉菜单相对于这个容器定位 */
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 3. 修复：下拉菜单位置 */
.nav-user-dropdown {
    /* 确保它在头像正下方，而不是屏幕最右边 */
    right: 0; 
    top: 100%; 
    margin-top: 10px;
    width: 200px; /* 固定宽度，防止太窄 */
}

/* 4. 修复：账户页页眉高度 (解决页眉太宽的问题) */
.account-header {
    background-color: #fff;
    position: relative !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0; /* 减小上下间距 */
}

.account-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 5. 修复：头像样式 (确保是圆的，且不重复显示) */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    background-color: #eee;
    flex-shrink: 0; /* 防止被压缩 */
}
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   2025-11-13 紧急修复补丁 (Visual Fixes)
   ========================================= */

/* 1. 关键：隐藏工具类 (必须有 !important) */
/* 这解决了模板弹窗和登录弹窗无法隐藏的问题 */
.hidden {
    display: none !important;
}

/* 2. 修复：右上角导航容器定位 */
/* 这解决了下拉菜单跑到屏幕最右边的问题 */
.header-actions {
    position: relative; 
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 3. 修复：下拉菜单具体位置 */
.nav-user-dropdown {
    right: 0; 
    top: 100%; 
    margin-top: 10px;
    width: 200px; 
    /* 确保菜单在最上层 */
    z-index: 1000; 
}

/* 4. 修复：账户页页眉高度 */
/* 这解决了账户页面页眉太宽的问题 */
.account-header {
    background-color: #fff;
    position: relative !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0; 
}

.account-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 5. 修复：头像样式 (确保是圆的) */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    background-color: #eee;
    flex-shrink: 0; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   2025-11-13 终极视觉修复
   ========================================= */

/* 1. 强制将“我的账户/模板/资料”页面的页眉变窄 */
.account-header {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    height: auto !important;
    min-height: 60px !important;
    background-color: #ffffff !important;
    position: relative !important; /* 防止浮动 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 2. 确保 Logo 和 导航 在一条线上 */
.account-header .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* 3. 强制隐藏所有不该显示的元素 (解决弹窗关不掉) */
.hidden {
    display: none !important;
}

/* =========================================
   2025-11-17 最终布局修正
   ========================================= */

/* 1. 在账户、模板、安全页面，隐藏中间的 "Features/Pricing" 菜单 */
/* 这将直接解决页眉过宽/过高的问题，尤其是在手机上 */
.account-header .main-nav {
    display: none !important;
}

/* 2. 确保 Logo 和 头像 分布在两端 */
.account-header .container {
    display: flex !important;
    justify-content: space-between !important; /* Logo在左，头像在右 */
    align-items: center !important;
    height: 60px !important; /* 强制锁定高度 */
}

/* =========================================
   2025-11-17 布局终极修正 (Fix Alignment & Width)
   ========================================= */

/* 1. 强制页眉占满屏幕宽度，打破 body 的居中限制 */
.account-header {
    width: 100% !important;  /* (!!!) 关键：强制占满整行 */
    max-width: 100% !important;
    height: 60px !important; 
    min-height: 60px !important;
    
    padding: 0 !important;
    margin: 0 !important;
    
    background-color: #ffffff !important;
    position: relative !important;
    border-bottom: 1px solid #e0e0e0;
    
    /* 确保内部布局正确 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 2. 内部容器：Logo 靠左，头像靠右 */
.account-header .container {
    width: 100% !important;
    max-width: 1200px !important; /* 保持内容最大宽度 */
    height: 100% !important;
    padding: 0 20px !important;
    margin: 0 auto !important;
    
    display: flex !important;
    /* (!!!) 关键：这就是让 Logo 和头像分开的原因 */
    justify-content: space-between !important; 
    align-items: center !important;
    flex-wrap: nowrap !important;
}

/* 3. 彻底隐藏中间导航，防止干扰布局 */
.account-header .main-nav {
    display: none !important;
}

/* 4. 修复 Logo 位置，防止被挤压 */
.account-header .logo {
    display: flex !important;
    align-items: center !important;
    margin-right: auto !important; /* 确保它用力往左挤 */
}

/* 修复主页定价卡片高度不一致 */
.pricing-grid {
    align-items: stretch; /* 强制所有卡片等高 */
}
.pricing-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.pricing-card .plan-features {
    flex-grow: 1; /* 让列表撑满剩余空间，把按钮顶到底部 */
}

/* =========================================
   2025-11-19 报告排版终极修复 (Fix Layout)
   ========================================= */

.result-box {
    /* (!!!) 核心修复：强制取消 Flex 布局，改为普通块级布局 */
    display: block !important; 
    
    /* 确保宽度撑满，防止被挤压 */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    
    /* 视觉样式 */
    background: #ffffff;
    padding: 30px !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-height: 300px;
    
    /* 字体样式 */
    text-align: left !important; /* 强制左对齐 */
    line-height: 1.8 !important; /* 行高 */
    font-size: 16px !important;
    color: #333 !important;
    
    /* 处理长文本换行 */
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* 修复结果内部的所有元素 (段落、标题等) */
.result-box p, 
.result-box h1, 
.result-box h2, 
.result-box h3, 
.result-box li {
    display: block !important; /* 确保它们各占一行 */
    width: 100% !important;
    margin-bottom: 15px !important;
    text-align: left !important;
}

/* 修复列表缩进 */
.result-box ul, 
.result-box ol {
    padding-left: 20px !important;
    margin-bottom: 15px !important;
}

/* 修复标题加粗 */
.result-box strong {
    font-weight: bold !important;
    color: #000 !important;
}

/* =========================================
   2025-11-20 模板库 Pro 级设计 (UI Overhaul)
   ========================================= */

/* 1. 顶部 Hero 区域 (全宽背景) */
.template-hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 40px;
}
.template-hero-section h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 800;
}
.template-hero-section p {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 2. 布局容器 (侧边栏 + 网格) */
.template-layout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px; /* 底部留白 */
    display: flex;
    gap: 40px;
    align-items: flex-start; /* 顶部对齐 */
}

/* 3. 左侧过滤器 (侧边栏) */
.template-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 25px;
    position: sticky; /* 关键：滚动时吸顶 */
    top: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.filter-group { margin-bottom: 30px; }
.filter-group h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #adb5bd;
    margin-bottom: 15px;
    font-weight: 700;
}
.filter-list { list-style: none; padding: 0; margin: 0; }
.filter-list li {
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.filter-list li:hover { background-color: #f1f3f5; color: #212529; }
.filter-list li.active {
    background-color: #e7f5ff;
    color: #007bff;
    font-weight: 600;
}

/* 4. 右侧内容区 */
.template-main { flex-grow: 1; }

.template-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.template-header-row h2 { font-size: 1.5rem; color: #343a40; margin: 0; }

/* 5. 卡片网格 (Grid) */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* 自适应宽度 */
    gap: 25px;
}

/* 6. 模板卡片 (Card) */
.template-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%; /* 等高 */
    position: relative;
    overflow: hidden;
}
.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: #cce5ff;
}
/* 顶部彩条 (装饰) */
.card-top-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #00c6ff);
}

/* 标签区 */
.card-badges { margin-bottom: 15px; display: flex; gap: 8px; flex-wrap: wrap; }
.t-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}
.t-badge.role { background: #e3f2fd; color: #0d47a1; }
.t-badge.freq { background: #f3f0ff; color: #5f3dc4; }
.t-badge.pro { background: #fff9db; color: #f08c00; border: 1px solid #fcc419; }

/* 内容 */
.template-card h3 {
    font-size: 1.2rem;
    margin: 0 0 10px 0;
    color: #212529;
    font-weight: 700;
}
.template-card p {
    font-size: 0.9rem;
    color: #868e96;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; /* 撑开空间 */
}

/* 按钮 */
.card-actions button { width: 100%; }

/* --- 模板库新布局 (追加) --- */
.template-hero-section {
    background: #fff; padding: 40px 20px; text-align: center; border-bottom: 1px solid #eee; margin-bottom: 30px;
}
.template-hero-section h1 { margin-bottom: 10px; }

.template-layout-container {
    display: flex; max-width: 1200px; margin: 0 auto; padding: 0 20px 60px; gap: 30px; align-items: flex-start;
}

.template-sidebar {
    width: 240px; flex-shrink: 0; background: #fff; padding: 20px; border-radius: 8px; border: 1px solid #eee;
}
.filter-list li { padding: 8px 12px; cursor: pointer; border-radius: 6px; font-size: 0.95rem; margin-bottom: 2px; }
.filter-list li:hover { background: #f8f9fa; }
.filter-list li.active { background: #e7f5ff; color: #007bff; font-weight: 600; }

.template-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
}
.template-card {
    background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 20px;
    transition: transform 0.2s; display: flex; flex-direction: column;
}
.template-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.template-card h3 { font-size: 1.1rem; margin: 10px 0; }
.badge { display: inline-block; font-size: 10px; padding: 3px 6px; background: #eee; border-radius: 4px; }
.badge.pro { background: #fff3cd; color: #856404; }

/* --- New Auth Modal Styles --- */
.auth-modal {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    font-family: sans-serif;
}
.auth-subtitle { color: #666; margin-bottom: 20px; font-size: 0.9em; }
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 0.9em; }
.form-group input { 
    width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 1em; 
}
.full-width { width: 100%; margin-top: 10px; padding: 12px; }
.forgot-links { margin-top: 5px; font-size: 0.8em; text-align: right; }
.password-requirements { list-style: none; padding: 0; margin-top: 5px; font-size: 0.8em; color: #888; }
.password-requirements li::before { content: "• "; }
.password-requirements li.valid { color: green; }
.password-requirements li.invalid { color: red; }
.divider { text-align: center; margin: 20px 0; color: #ccc; font-size: 0.8em; }
.btn-social { 
    width: 100%; padding: 10px; background: #fff; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; 
}
.btn-social:hover { background: #f5f5f5; }

/* --- Toast Notification (高端消息提示) --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}
.toast {
    background: #fff;
    color: #333;
    padding: 15px 25px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease forwards;
    min-width: 250px;
    border-left: 5px solid #007bff; /* 默认蓝色 */
}
.toast.success { border-left-color: #28a745; } /* 成功绿 */
.toast.error { border-left-color: #dc3545; }   /* 失败红 */
.toast i { font-size: 1.2rem; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    to { transform: translateX(100%); opacity: 0; }
}

/* =================================================================
   ✅ UI v11.0 - 视觉平衡版 (粘贴到 style.css 最底部)
   修复：强制三个卡片等高、按钮位置绝对一致、增加灰色不可用样式
   ================================================================= */

/* 1. 价格网格 (强制一行，拉伸对齐) */
.pricing-grid {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: stretch !important; /* 关键：拉伸高度 */
    gap: 25px !important;
    max-width: 1200px !important;
    margin: 40px auto !important;
    padding: 0 20px !important;
}

/* 2. 价格卡片 (Flex 垂直布局) */
.pricing-card {
    flex: 1 !important;
    min-width: 280px !important;
    max-width: 350px !important;
    
    /* 🔴 核心：让卡片内部元素上下撑开 */
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    
    background: #ffffff !important;
    border: 1px solid #e1e4e8 !important;
    border-radius: 20px !important;
    padding: 40px 30px !important;
    text-align: center !important;
    position: relative !important;
    height: auto !important;
    min-height: 100% !important; /* 确保占满父容器高度 */
}

/* 3. 功能列表 (占据剩余空间，把按钮挤到底部) */
.features-list {
    flex-grow: 1 !important; 
    margin-bottom: 30px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important; /* 列表内容靠上 */
    gap: 15px !important; /* 列表项之间的间距 */
}

.features-list li {
    padding: 0 !important;
    border: none !important; /* 去掉下划线，更干净 */
    font-size: 0.95rem !important;
    color: #555 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-align: left !important;
}

/* 🔴 新增：不可用功能的样式 (灰色 + 删除线) */
.features-list li.disabled {
    color: #ccc !important;
    text-decoration: line-through; /* 删除线 */
}
.features-list li.disabled i {
    color: #ddd !important; /* 图标变灰 */
}

/* 4. 按钮样式 (强制统一大小和位置) */
.pricing-card button, 
.pricing-card a.btn {
    margin-top: auto !important; /* 再次确保沉底 */
    width: 100% !important;
    display: block !important;
    padding: 14px 0 !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

/* Free 和 Basic 按钮 (白色背景) */
.pricing-card .btn-secondary,
.pricing-card .btn-outline {
    background: #fff !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
}
.pricing-card .btn-secondary:hover {
    background: #f8f9fa !important;
    border-color: #bbb !important;
}

/* Pro 按钮 (蓝色背景) */
.pricing-card .btn-primary {
    background: #007bff !important;
    color: white !important;
    border: none !important;
}

/* 5. 选中状态 */
.pricing-card.plan-active {
    border: 3px solid #007bff !important;
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 30px rgba(0,123,255,0.15) !important;
    z-index: 10 !important;
}

/* =============================================
   🔴 价格与标识微调补丁 (粘贴到 style.css 底部)
   ============================================= */

/* 1. 价格区域：强制同一行对齐 */
.pricing-card .price {
    display: flex !important;
    justify-content: center !important;
    align-items: baseline !important; /* 基线对齐 */
    gap: 5px !important;
    margin: 15px 0 !important;
}

/* 2. 统一字体大小：金额和月份一样大 */
/* 您觉得之前的金额太小？或者不协调？这里统一设为 1.8rem (约28px) */
.pricing-card .price {
    font-size: 1.8rem !important; 
    font-weight: 700 !important;
    color: #333 !important;
    letter-spacing: 0 !important;
}

/* 强制 span (月份) 继承父元素的大小 */
.pricing-card .price span {
    font-size: 1.8rem !important; /* 和金额一样大 */
    font-weight: 700 !important;   /* 和金额一样粗 */
    color: #333 !important;        /* 和金额一样黑 */
}

/* 3. Pro 版本上方的“最佳推荐”蓝色文字 */
.best-value-text {
    color: #007bff !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: 5px !important;
    display: block !important;
}

/* 4. 隐藏旧的悬浮徽章 (如果有的话) */
.recommended-badge {
    display: none !important;
}

/* ====================================================================
   🔥 Reportify AI - 响应式适配补丁 v5.0 (追加到 style.css 最底部)
   ==================================================================== */

/* --- 1. 全局修正 (强制修复 Logo 颜色和容器) --- */
/* 解决 Vivo/安卓手机 Logo 变蓝的问题 */
a.logo, 
a.logo:visited,
.main-header a {
    color: #333 !important; 
    text-decoration: none !important;
}
.logo-icon {
    color: #e63946 !important; 
}

/* 确保所有容器内边距计算正确 */
* { box-sizing: border-box; }
body { overflow-x: hidden; }

/* --- 2. 导航栏锁定 (所有设备通用) --- */
/* 强制 Logo 和 头像 永远在同一行，绝不换行 */
.main-header .container {
    display: flex !important;
    flex-direction: row !important; 
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

/* --- 3. 屏幕分级适配 --- */

/* [层级 A] 笔记本 & 横屏 iPad Pro (1025px - 1366px) */
@media screen and (max-width: 1366px) {
    .container { padding: 0 40px; }
    /* 保持 3 列，但缩小间距 */
    .features-grid, .pricing-grid, .stats-grid { gap: 20px; }
}

/* [层级 B] 竖屏 iPad & 折叠屏展开态 (769px - 1024px) */
@media screen and (max-width: 1024px) {
    .container { padding: 0 30px; }
    
    /* 强制改为 2 列布局，防止 3 列太挤 */
    .features-grid, .pricing-grid, .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
    
    /* 标题字号微调 */
    .hero-section h1 { font-size: 3rem; }
}

/* [层级 C] 手机 & 折叠屏外屏 (768px 以下) */
@media screen and (max-width: 768px) {
    .container { padding: 0 20px !important; }

    /* 强制改为单列 (1列) 布局 */
    .features-grid, 
    .pricing-grid, 
    .stats-grid, 
    .generator-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px;
    }

    /* 卡片宽度修正：填满屏幕 */
    .feature-card, .pricing-card, .stat-box {
        width: 100% !important;
        margin: 0 !important;
        max-width: none !important;
    }

    /* 导航栏微调 */
    .header-actions {
        margin-top: 0 !important;
        width: auto !important;
    }
    
    /* Hero 区域 */
    .hero-section { padding: 40px 0; }
    .hero-section h1 { font-size: 2.2rem !important; }

    /* 按钮全宽 */
    .cta-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; text-align: center; }

    /* Profile 页面垂直排列 */
    .profile-card { flex-direction: column; }
    .profile-sidebar { 
        border-right: none; 
        border-bottom: 1px solid #eee; 
        margin-bottom: 20px; 
    }
}

/* [层级 D] 小屏手机 (480px 以下) */
@media screen and (max-width: 480px) {
    .logo { font-size: 1.1rem; }
    .user-nav-wrapper { gap: 5px !important; }
    
    /* 空间不足时隐藏用户名，只留头像 */
    .user-name { display: none !important; }
}
