/* ===== Base Styles ===== */
:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #EEF2FF;
    --secondary: #06B6D4;
    --accent: #F59E0B;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --text-light: #9CA3AF;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --bg-dark: #0F172A;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-white);
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
}

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

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

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 10px;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    transition: var(--transition);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-icon {
    font-size: 26px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-medium);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

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

.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 50%, #F0F9FF 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(79, 70, 229, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-medium);
    margin-bottom: 36px;
    max-width: 520px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 6px;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 520px;
}

.floating-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: absolute;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.card-main {
    width: 380px;
    padding: 28px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: none;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-weight: 600;
    color: var(--text-dark);
}

.card-dots {
    display: flex;
    gap: 6px;
}

.card-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.card-dots span:nth-child(1) { background: #FF5F57; }
.card-dots span:nth-child(2) { background: #FFBD2E; }
.card-dots span:nth-child(3) { background: #28CA42; }

.progress-ring {
    width: 160px;
    height: 160px;
    margin: 0 auto 24px;
    position: relative;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: #E5E7EB;
    stroke-width: 10;
}

.progress-bar {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 74.644;
    transition: stroke-dashoffset 1.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-percent {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.progress-sub {
    font-size: 13px;
    color: var(--text-light);
}

.card-tasks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-medium);
}

.task.done {
    color: var(--text-dark);
}

.task-check {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.task.done .task-check {
    background: var(--success);
    color: white;
}

.task:not(.done) .task-check {
    border: 2px solid var(--border);
    color: var(--text-light);
}

.card-small {
    padding: 20px;
    width: 200px;
    animation-delay: -2s;
}

.card-topics {
    top: 20px;
    right: 0;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic {
    padding: 6px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
}

.card-streak {
    bottom: 40px;
    left: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    animation-delay: -4s;
}

.streak-icon {
    font-size: 36px;
}

.streak-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.streak-label {
    font-size: 13px;
    color: var(--text-light);
}

/* SVG Gradient */
.hero-visual::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
}

/* ===== Section Common ===== */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 60px;
}

.section-header.light {
    color: white;
}

.section-header.light .section-title,
.section-header.light .section-desc {
    color: white;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.25;
}

.section-desc {
    font-size: 17px;
    color: var(--text-medium);
    line-height: 1.7;
}

/* ===== Features Section ===== */
.features {
    padding: 100px 0;
    background: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.feature-card {
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    background: var(--bg-white);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 22px;
}

.feature-icon.blue { background: #EFF6FF; }
.feature-icon.green { background: #ECFDF5; }
.feature-icon.purple { background: #F5F3FF; }
.feature-icon.orange { background: #FFF7ED; }
.feature-icon.pink { background: #FDF2F8; }
.feature-icon.teal { background: #F0FDFA; }

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.7;
}

/* ===== Tracks Section ===== */
.tracks {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
    position: relative;
    overflow: hidden;
}

.tracks::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.tracks .container {
    position: relative;
    z-index: 1;
}

.tracks-timeline {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.timeline-marker {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
}

.timeline-content {
    flex: 1;
}

.timeline-time {
    display: inline-block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
}

.timeline-content h4 {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

/* ===== Notes Section ===== */
.notes {
    padding: 100px 0;
    background: var(--bg-light);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.note-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.note-tags {
    margin-bottom: 16px;
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.tag.math { background: #EFF6FF; color: #2563EB; }
.tag.english { background: #ECFDF5; color: #059669; }
.tag.physics { background: #F5F3FF; color: #7C3AED; }

.note-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.note-card p {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 20px;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
}

/* ===== About Section ===== */
.about {
    padding: 100px 0;
    background: var(--bg-white);
}

.about-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    border-radius: var(--radius-lg);
    padding: 64px;
    color: white;
    overflow: hidden;
    position: relative;
}

.about-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.about-content {
    position: relative;
    z-index: 1;
}

.about-content .section-tag {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.about-content h2 {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.about-content > p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 28px;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.about-feature .check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.about-visual {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.quote-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 36px;
    max-width: 360px;
}

.quote-mark {
    font-size: 60px;
    line-height: 1;
    color: var(--primary);
    font-family: Georgia, serif;
    display: block;
    margin-bottom: 8px;
}

.quote-card p {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 20px;
}

.quote-author {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Auth Section ===== */
.auth-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.auth-container {
    max-width: 460px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 18px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.auth-tab.active {
    color: var(--primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.auth-form {
    display: none;
    padding: 36px;
}

.auth-form.active {
    display: block;
}

.auth-form h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-medium);
    font-size: 14px;
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-medium);
    cursor: pointer;
}

.forgot {
    color: var(--primary);
}

.forgot:hover {
    color: var(--primary-dark);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-medium);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand .nav-logo {
    color: white;
    margin-bottom: 12px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

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

.footer-column h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 18px;
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-visual {
        order: 2;
        height: 440px;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .features-grid,
    .notes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-features {
        align-items: center;
    }

    .about-visual {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-menu,
    .nav-auth {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-stats {
        gap: 32px;
    }

    .features-grid,
    .notes-grid {
        grid-template-columns: 1fr;
    }

    .card-main {
        width: 300px;
        padding: 20px;
    }

    .card-small {
        display: none;
    }

    .about-card {
        padding: 36px 24px;
    }

    .footer-links {
        gap: 40px;
    }

    .footer-content {
        flex-direction: column;
    }
}

/* ===== Animations on Scroll ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
