/* Commercial Design System - IT老齐 */
:root {
    --primary-color: #0f172a;
    /* Deep Blue */
    --secondary-color: #1e293b;
    /* Slate Blue */
    --accent-color: #d4af37;
    /* Gold */
    --text-color: #334155;
    --text-light: #94a3b8;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-accent:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-vip {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(255, 165, 0, 0.3);
    position: relative;
    overflow: hidden;
    margin-right: 10px;
}

.btn-vip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 165, 0, 0.4);
}

.btn-vip::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

.btn-vip:hover::after {
    left: 100%;
}

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vip-badge {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Button - Hidden on Desktop */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

.mobile-vip-btn {
    display: none;
}

.mobile-user-menu {
    display: none;
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .nav-content {
        padding: 0 15px;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .mobile-vip-btn {
        display: flex;
        align-items: center;
        gap: 5px;
        background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
        color: white !important;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 700;
        margin-left: auto;
        /* Push to right */
        margin-right: 15px;
        box-shadow: 0 2px 5px rgba(255, 165, 0, 0.3);
    }

    .mobile-vip-btn i {
        font-size: 0.8rem;
    }

    /* Hide text on very small screens if needed, but keeping for now */
    @media (max-width: 360px) {
        .mobile-vip-text {
            display: none;
        }
    }

    .desktop-only {
        display: none !important;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 20px;
        gap: 20px;
        box-shadow: 0 10px 10px -5px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out, visibility 0.3s;
        z-index: 999;
        visibility: hidden;
    }

    .nav-links.mobile-active {
        transform: translateY(0);
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid #f1f5f9;
        display: block;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .mobile-user-menu {
        display: block;
        width: 100%;
        padding-top: 20px;
        border-top: 1px solid #e2e8f0;
        text-align: center;
    }

    .mobile-user-info {
        margin-bottom: 20px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .btn-block {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        text-align: center;
    }

    /* My Learning Page Mobile Adaptation */
    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .course-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .history-info {
        width: 100%;
        margin-bottom: 15px;
    }

    .continue-btn {
        width: 100%;
        text-align: center;
    }

    .continue-btn {
        width: 100%;
        text-align: center;
    }
}

/* Footer Styles */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px 0;
    margin-top: 40px;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.copyright {
    text-align: center;
    border-top: 1px solid var(--secondary-color);
    padding-top: 10px;
    color: #94a3b8;
    width: 100%;
}

/* Toast Component Styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease-out forwards, fadeOut 0.3s ease-in forwards 2.7s;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 350px;
    width: 100%;
    overflow: hidden;
}

/* Toast Types */
.toast.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.toast.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Toast Content */
.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1;
}

.toast-content i {
    font-size: 1.2rem;
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.016s linear;
}

/* Toast Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Loading Animation */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Error Message */
.error-container {
    text-align: center;
    padding: 60px 0;
    color: #e74c3c;
    font-size: 18px;
}