/* ==========================================
   雅思学习平台 - 蓝色主题
   ========================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #1e40af;
    --bg-tint: #eff6ff;
    --bg-tint-dark: #dbeafe;
    --shadow: 0 20px 60px rgba(0,0,0,0.2);
    --shadow-sm: 0 5px 20px rgba(0,0,0,0.1);
    --radius: 20px;
    --radius-sm: 15px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
    line-height: 1.8;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Navigation ---- */
.main-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
}

.nav-brand {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary) !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    color: #555 !important;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none !important;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--bg-tint);
    color: var(--primary) !important;
}

.nav-link.nav-active {
    background: var(--bg-tint);
    color: var(--primary) !important;
    font-weight: 600;
}

.nav-login {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
    border-radius: 20px;
    padding: 8px 20px;
}

.nav-login:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(37,99,235,0.4);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
}

.nav-user-menu {
    position: relative;
    cursor: pointer;
}

.nav-user-name {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--primary);
    background: var(--bg-tint);
}

.nav-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 150px;
    padding: 8px 0;
    z-index: 100;
}

.nav-user-menu:hover .nav-dropdown,
.nav-user-menu.open .nav-dropdown {
    display: block;
}

/* More dropdown */
.nav-more-menu {
    position: relative;
    cursor: pointer;
}

.nav-more-trigger {
    user-select: none;
}

.nav-more-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 140px;
    padding: 8px 0;
    z-index: 100;
}

.nav-more-menu:hover .nav-more-dropdown,
.nav-more-menu.open .nav-more-dropdown {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    color: #555 !important;
    text-decoration: none !important;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-tint);
    color: var(--primary) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--primary);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 10px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
    .nav-links.show { display: flex; }
    .nav-toggle { display: block; }
}

/* ---- Flash Messages ---- */
.flash-container {
    max-width: 1200px;
    margin: 10px auto;
    padding: 0 20px;
}

.flash-msg {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-weight: 500;
}

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #17a2b8;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

.flash-danger, .flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #dc3545;
}

/* ---- Breadcrumb ---- */
.breadcrumb-bar {
    max-width: 1200px;
    margin: 10px auto 0;
    padding: 0 20px;
}

.breadcrumb-bar nav {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    color: #999;
    flex-wrap: wrap;
}

.breadcrumb-bar a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-bar a:hover {
    text-decoration: underline;
}

.breadcrumb-bar .sep {
    color: #ccc;
}

.breadcrumb-bar .current {
    color: #555;
    font-weight: 500;
}

/* ---- Main Content ---- */
.main-content-wrapper {
    min-height: calc(100vh - 60px);
}

/* ---- Dashboard ---- */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    color: var(--primary);
    font-size: 2.2em;
    margin-bottom: 10px;
}

.welcome-text {
    color: #666;
    font-size: 1.1em;
}

.vip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: white;
    padding: 2px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 700;
    margin-left: 5px;
}

.vip-info {
    color: #ff8c00;
    font-weight: 600;
    margin-left: 5px;
}

.upgrade-link {
    color: var(--primary) !important;
    font-weight: 600;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.module-card {
    display: block;
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    border-left: 5px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    text-decoration: none !important;
    color: #333 !important;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.module-card-gold {
    border-left-color: #d97706;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.module-card-gold:hover {
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.3);
}

.module-card-gold h2 {
    color: #b45309;
}

.feature-tag-gold {
    background: #fef3c7;
    color: #d97706;
}

.module-card-purple {
    border-left-color: #667eea;
}

.module-card-purple:hover {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.module-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.module-card h2 {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 1.3em;
}

.module-card p {
    color: #888;
    font-size: 0.95em;
    margin-bottom: 15px;
}

.feature-tag {
    display: inline-block;
    background: var(--bg-tint);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.module-card-purple .feature-tag {
    background: #f0f4ff;
    color: #667eea;
}

/* ---- Status Section ---- */
.status-section {
    margin-top: 40px;
}

.status-section h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.status-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.status-card {
    background: white;
    padding: 20px 30px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    min-width: 150px;
}

.status-label {
    color: #999;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.status-value {
    color: var(--primary);
    font-size: 1.3em;
    font-weight: 700;
}

/* ---- Pricing Page ---- */
.pricing-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.pricing-header {
    text-align: center;
    margin-bottom: 30px;
}

.pricing-header h1 {
    color: var(--primary);
    font-size: 2.2em;
    margin-bottom: 10px;
}

.pricing-header p {
    color: #666;
    font-size: 1.1em;
}

.current-status {
    text-align: center;
    margin-bottom: 30px;
}

.status-active, .status-expired {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 12px;
    font-size: 1em;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-expired {
    background: #fff3cd;
    color: #856404;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.pricing-card {
    background: white;
    border-radius: var(--radius);
    padding: 35px 30px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    transition: transform 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card-popular {
    border: 3px solid var(--primary);
    box-shadow: 0 10px 40px rgba(37,99,235,0.2);
}

.popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 4px 20px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

.plan-name {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 15px;
}

.plan-price {
    font-size: 2.5em;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

.plan-price span {
    font-size: 0.4em;
    color: #999;
    font-weight: 400;
}

.plan-save {
    color: #4caf50;
    font-weight: 600;
    margin-bottom: 15px;
}

.plan-features {
    list-style: none;
    text-align: left;
    margin: 20px 0;
}

.plan-features li {
    padding: 8px 0;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.plan-btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 25px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.plan-btn:hover {
    background: var(--bg-tint);
}

.plan-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
}

.plan-btn-primary:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(37,99,235,0.4);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

/* ---- Comparison Table ---- */
.pricing-comparison {
    margin-top: 50px;
}

.pricing-comparison h2 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 25px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.comparison-table th {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 15px 20px;
    text-align: center;
}

.comparison-table th:first-child {
    text-align: left;
}

.comparison-table td {
    padding: 12px 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.highlight-row td {
    background: var(--bg-tint);
}

.vip-check {
    color: var(--primary);
    font-weight: 700;
}

/* ---- IELTS Page Wrapper ---- */
.ielts-page-wrapper {
    /* Allows ielts pages to have their own body background */
}

/* ---- Shared IELTS Animations ---- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.6; } }
@keyframes dots { 0%,20% { content: '.'; } 40%,60% { content: '..'; } 80%,100% { content: '...'; } }

/* ---- Shared IELTS Loading Spinner ---- */
.loading-spinner { text-align: center; padding: 80px; }
.loading-spinner .spinner {
    border: 4px solid #e5e7eb; border-top: 4px solid currentColor;
    border-radius: 50%; width: 40px; height: 40px;
    animation: spin 1s linear infinite; margin: 0 auto 16px;
}

/* ---- Footer ---- */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 30px 20px;
    text-align: center;
    font-size: 0.9em;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.footer-links a {
    color: #cbd5e1 !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white !important;
}

.footer-copy {
    color: #64748b;
    font-size: 0.85em;
}
