:root {
    --primary-color: #4A9B7D;
    --primary-light: #6BB39A;
    --primary-dark: #3A8267;
    --secondary-color: #6B9AC4;
    --accent-color: #F5C87A;
    --bg-primary: #FAFBF9;
    --bg-secondary: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-primary: #26384A;
    --text-secondary: #536678;
    --text-tertiary: #8A9AAA;
    --border-color: #E8EBE6;
    --border-light: #F0F1EE;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-soft: 0 8px 24px rgba(31, 51, 43, 0.06);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --font-xs: 14px;
    --font-sm: 15px;
    --font-base: 17px;
    --font-md: 18px;
    --font-lg: 21px;
    --font-xl: 28px;
    --font-2xl: 36px;
    --font-hero: 60px;
    
    --line-height-base: 1.75;
    --line-height-relaxed: 1.85;
    --line-height-title: 1.25;
}

body.dark-mode {
    --primary-color: #22D3A6;
    --primary-light: #3BE8C2;
    --primary-dark: #18C097;
    --secondary-color: #5AB8E6;
    --accent-color: #F8D57E;
    --bg-primary: #07111F;
    --bg-secondary: #0B1728;
    --bg-sidebar: #0A1628;
    --bg-card: #102033;
    --bg-card-hover: #14283F;
    --text-primary: #F4F8FC;
    --text-secondary: #C0CFDA;
    --text-tertiary: #8EA0B3;
    --border-color: rgba(111, 180, 160, 0.18);
    --border-light: rgba(111, 180, 160, 0.12);
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
    --glow-soft: 0 0 20px rgba(34, 211, 166, 0.18);
}

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

html {
    scroll-behavior: smooth;
    font-size: 17px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--line-height-base);
    min-height: 100vh;
    display: flex;
    font-size: var(--font-base);
    transition: background-color 0.35s ease, color 0.35s ease;
}

body,
.sidebar,
.main-content,
.page-section,
.card,
.feature-card,
.flashcard,
.outline-card,
.markdown-preview,
.upload-area,
.file-card,
.progress-timeline,
.structure-result,
.sources-container,
.notes-toolbar,
.cards-toolbar,
button,
.nav-item,
.tab-btn {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.theme-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    z-index: 2000;
    min-width: 120px;
    justify-content: center;
    box-shadow: var(--shadow-light);
}

.theme-toggle-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-medium);
}

.theme-toggle-btn .theme-icon {
    font-size: 16px;
    transition: transform 0.35s ease;
}

body.dark-mode .theme-toggle-btn .theme-icon {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .theme-toggle-btn {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
    }
}

.sidebar {
    width: 220px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-light);
}

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

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

.logo i {
    font-size: 26px;
    color: var(--primary-color);
}

.subtitle {
    font-size: 14px;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
    line-height: 1.6;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 8px;
}

.nav-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-md);
    position: relative;
    margin-left: 0;
    min-height: 52px;
}

.nav-item:hover {
    background: rgba(74, 155, 125, 0.08);
    color: var(--primary-color);
    padding-left: 24px;
}

.nav-item.active {
    background: rgba(74, 155, 125, 0.12);
    color: var(--primary-color);
    padding-left: 24px;
    font-weight: 700;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 28px;
    background: var(--primary-color);
    border-radius: 0 2px 2px 0;
}

.nav-item i,
.nav-item .nav-icon {
    font-size: 18px;
    width: 22px;
    text-align: center;
    transition: transform 0.25s ease;
}

.nav-item:hover i,
.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
}

.login-btn {
    width: 100%;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
}

.login-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(74, 155, 125, 0.05);
}

.main-content {
    flex: 1;
    margin-left: 220px;
    min-height: 100vh;
    background: var(--bg-light);
}

.page {
    display: none;
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page.active {
    display: block;
}

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

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 48px;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(74, 155, 125, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.section {
    display: none;
    min-height: 100vh;
}

.section.active {
    display: block;
}

.section-header {
    padding: 48px 48px 36px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.section-header h1 {
    font-size: 38px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.25;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 24px;
    line-height: 1.75;
}

.input-output-hint {
    display: flex;
    gap: 32px;
    margin-top: 24px;
    padding: 20px;
    background: rgba(74, 155, 125, 0.05);
    border-radius: var(--radius-md);
}

.hint-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.hint-label {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 40px;
}

.hint-arrow {
    color: var(--text-tertiary);
}

.hint-content {
    color: var(--text-secondary);
}

#home-section {
    background: var(--bg-primary);
}

.hero {
    padding: 64px 48px;
    background: 
        linear-gradient(
            90deg,
            rgba(248, 252, 251, 0.96) 0%,
            rgba(248, 252, 251, 0.90) 40%,
            rgba(248, 252, 251, 0.65) 100%
        ),
        url('assets/hero-light-bg.png?v=2');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center right;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 32px 32px;
}

.hero-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 600px;
    height: 600px;
    pointer-events: none;
}

.deco-wave {
    position: absolute;
    bottom: 0;
    right: -50px;
    width: 500px;
    height: 300px;
    background: linear-gradient(135deg, rgba(74, 155, 125, 0.06) 0%, rgba(107, 154, 196, 0.06) 100%);
    border-radius: 50% 50% 0 0;
    transform: scaleX(-1);
}

.deco-grid {
    position: absolute;
    top: 100px;
    right: 100px;
    width: 300px;
    height: 300px;
    background-image: 
        linear-gradient(rgba(74, 155, 125, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 155, 125, 0.08) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}

.hero-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.18;
    letter-spacing: -0.015em;
}

.hero-content h1 .highlight {
    color: var(--primary-color);
}

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

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 52px;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: var(--font-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(74, 155, 125, 0.3);
}

.primary-btn:hover::before {
    left: 100%;
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 16px rgba(74, 155, 125, 0.25);
}

.secondary-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: var(--font-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.secondary-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(74, 155, 125, 0.06);
}

.secondary-btn:active {
    transform: scale(0.98);
}

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

.stat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    cursor: default;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
}

.stat-item:hover {
    background: rgba(74, 155, 125, 0.08);
    transform: translateY(-3px);
    border-color: rgba(74, 155, 125, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.stat-item:hover .stat-icon {
    transform: scale(1.1);
}

.stat-item:hover .stat-icon.green {
    background: rgba(74, 155, 125, 0.15);
    box-shadow: 0 4px 12px rgba(74, 155, 125, 0.2);
}

.stat-item:hover .stat-icon.blue {
    background: rgba(107, 154, 196, 0.15);
    box-shadow: 0 4px 12px rgba(107, 154, 196, 0.2);
}

.stat-item:hover .stat-icon.orange {
    background: rgba(245, 200, 122, 0.15);
    box-shadow: 0 4px 12px rgba(245, 200, 122, 0.2);
}

.stat-icon.green {
    background: rgba(74, 155, 125, 0.1);
    color: var(--primary-color);
}

.stat-icon.blue {
    background: rgba(107, 154, 196, 0.1);
    color: var(--secondary-color);
}

.stat-icon.orange {
    background: rgba(245, 200, 122, 0.1);
    color: var(--accent-color);
}

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

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s ease;
    line-height: 1.2;
}

.stat-item:hover .stat-value {
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.preview-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    padding: 24px;
    width: 100%;
    animation: floatCard 6s ease-in-out infinite;
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.card-header i {
    font-size: 20px;
    color: var(--primary-color);
}

.card-header span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 3px;
    animation: pulse 2s ease-in-out infinite;
}

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

.progress-text {
    font-size: 14px;
    color: #2F7D62;
    font-weight: 500;
}

.features {
    padding: 72px 48px;
}

.section-header {
    margin-bottom: 40px;
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: #203246;
    margin-bottom: 12px;
    line-height: 1.25;
}

.section-header p {
    font-size: 18px;
    color: #536678;
    line-height: 1.75;
}

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

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transform: scaleX(0);
    transition: transform 0.35s ease;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 155, 125, 0.03) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(74, 155, 125, 0.15);
    border-color: rgba(74, 155, 125, 0.3);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card:nth-child(1):hover {
    border-color: rgba(74, 155, 125, 0.4);
}

.feature-card:nth-child(2):hover {
    border-color: rgba(107, 154, 196, 0.4);
    box-shadow: 0 12px 32px rgba(107, 154, 196, 0.15);
}

.feature-card:nth-child(2):hover::before {
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

.feature-card:nth-child(2):hover::after {
    background: linear-gradient(135deg, rgba(107, 154, 196, 0.03) 0%, transparent 50%);
}

.feature-card:nth-child(3):hover {
    border-color: rgba(245, 200, 122, 0.4);
    box-shadow: 0 12px 32px rgba(245, 200, 122, 0.15);
}

.feature-card:nth-child(3):hover::before {
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.feature-card:nth-child(3):hover::after {
    background: linear-gradient(135deg, rgba(245, 200, 122, 0.03) 0%, transparent 50%);
}

.feature-card:nth-child(4):hover {
    border-color: rgba(155, 89, 182, 0.4);
    box-shadow: 0 12px 32px rgba(155, 89, 182, 0.15);
}

.feature-card:nth-child(4):hover::before {
    background: linear-gradient(90deg, transparent, #9B59B6, transparent);
}

.feature-card:nth-child(5):hover {
    border-color: rgba(52, 152, 219, 0.4);
    box-shadow: 0 12px 32px rgba(52, 152, 219, 0.15);
}

.feature-card:nth-child(5):hover::before {
    background: linear-gradient(90deg, transparent, #3498DB, transparent);
}

.feature-card:nth-child(6):hover {
    border-color: rgba(230, 126, 34, 0.4);
    box-shadow: 0 12px 32px rgba(230, 126, 34, 0.15);
}

.feature-card:nth-child(6):hover::before {
    background: linear-gradient(90deg, transparent, #E67E22, transparent);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:nth-child(1) .feature-icon {
    background: rgba(74, 155, 125, 0.1);
    color: var(--primary-color);
}

.feature-card:nth-child(2) .feature-icon {
    background: rgba(107, 154, 196, 0.1);
    color: var(--secondary-color);
}

.feature-card:nth-child(3) .feature-icon {
    background: rgba(245, 200, 122, 0.1);
    color: var(--accent-color);
}

.feature-card:nth-child(4) .feature-icon {
    background: rgba(155, 89, 182, 0.1);
    color: #9B59B6;
}

.feature-card:nth-child(5) .feature-icon {
    background: rgba(52, 152, 219, 0.1);
    color: #3498DB;
}

.feature-card:nth-child(6) .feature-icon {
    background: rgba(230, 126, 34, 0.1);
    color: #E67E22;
}

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

.feature-card:nth-child(1):hover .feature-icon {
    background: rgba(74, 155, 125, 0.18);
}

.feature-card:nth-child(2):hover .feature-icon {
    background: rgba(107, 154, 196, 0.18);
}

.feature-card:nth-child(3):hover .feature-icon {
    background: rgba(245, 200, 122, 0.18);
}

.feature-card:nth-child(4):hover .feature-icon {
    background: rgba(155, 89, 182, 0.18);
}

.feature-card:nth-child(5):hover .feature-icon {
    background: rgba(52, 152, 219, 0.18);
}

.feature-card:nth-child(6):hover .feature-icon {
    background: rgba(230, 126, 34, 0.18);
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 750;
    margin-bottom: 12px;
    color: var(--text-primary);
    transition: color 0.25s ease;
    line-height: 1.35;
}

.feature-card:hover h3 {
    color: var(--primary-color);
}

.feature-card:nth-child(2):hover h3 {
    color: var(--secondary-color);
}

.feature-card:nth-child(3):hover h3 {
    color: #D4A855;
}

.feature-card:nth-child(4):hover h3 {
    color: #9B59B6;
}

.feature-card:nth-child(5):hover h3 {
    color: #3498DB;
}

.feature-card:nth-child(6):hover h3 {
    color: #E67E22;
}

.feature-card p {
    font-size: 16.5px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    transition: color 0.25s ease;
}

.feature-arrow {
    display: flex;
    justify-content: flex-end;
    color: var(--text-tertiary);
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-arrow {
    color: var(--primary-color);
    transform: translateX(8px);
}

.feature-card:nth-child(2):hover .feature-arrow {
    color: var(--secondary-color);
}

.feature-card:nth-child(3):hover .feature-arrow {
    color: #D4A855;
}

.feature-card:nth-child(4):hover .feature-arrow {
    color: #9B59B6;
}

.feature-card:nth-child(5):hover .feature-arrow {
    color: #3498DB;
}

.feature-card:nth-child(6):hover .feature-arrow {
    color: #E67E22;
}

.workflow {
    padding: 64px 48px;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.workflow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.3;
}

.workflow h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 32px;
    position: relative;
}

.workflow-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    position: relative;
}

.workflow-steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--border-light) 0%, var(--primary-color) 50%, var(--border-light) 100%);
    z-index: 0;
}

.workflow-step {
    flex: 1;
    text-align: left;
    position: relative;
    z-index: 1;
    padding: 16px;
    border-radius: var(--radius-lg);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.workflow-step:hover {
    background: rgba(74, 155, 125, 0.05);
    transform: translateY(-6px);
}

.workflow-step:hover .step-number {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(74, 155, 125, 0.3);
}

.workflow-step:hover h4 {
    color: var(--primary-color);
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 14px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.step-number::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.workflow-step:hover .step-number::before {
    opacity: 0.2;
}



.workflow-step:nth-child(1) .step-number {
    background: var(--primary-color);
}

.workflow-step:nth-child(2) .step-number {
    background: var(--secondary-color);
}

.workflow-step:nth-child(3) .step-number {
    background: var(--accent-color);
}

.workflow-step:nth-child(4) .step-number {
    background: #9B59B6;
}

.workflow-step:hover:nth-child(1) {
    background: rgba(74, 155, 125, 0.05);
}

.workflow-step:hover:nth-child(2) {
    background: rgba(107, 154, 196, 0.05);
}

.workflow-step:hover:nth-child(3) {
    background: rgba(245, 200, 122, 0.05);
}

.workflow-step:hover:nth-child(4) {
    background: rgba(155, 89, 182, 0.05);
}

.workflow-step:hover:nth-child(2) .step-number {
    box-shadow: 0 4px 16px rgba(107, 154, 196, 0.3);
}

.workflow-step:hover:nth-child(3) .step-number {
    box-shadow: 0 4px 16px rgba(245, 200, 122, 0.3);
}

.workflow-step:hover:nth-child(4) .step-number {
    box-shadow: 0 4px 16px rgba(155, 89, 182, 0.3);
}

.workflow-step:nth-child(2):hover h4 {
    color: var(--secondary-color);
}

.workflow-step:nth-child(3):hover h4 {
    color: #D4A855;
}

.workflow-step:nth-child(4):hover h4 {
    color: #9B59B6;
}

.workflow-step h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    transition: color 0.3s ease;
    line-height: 1.4;
}

.workflow-step p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.75;
    transition: color 0.3s ease;
}

.workflow-step:hover p {
    color: var(--text-primary);
}

.workflow-arrow {
    color: var(--text-tertiary);
    font-size: 18px;
    margin-top: 8px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.workflow-step:hover + .workflow-arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}

.workflow-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.workflow-step:hover + .workflow-arrow::before {
    opacity: 0.1;
}

.differentiation {
    padding: 64px 48px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(74, 155, 125, 0.03) 100%);
}

.differentiation h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
}

.diff-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 48px;
}

.diff-container {
    display: flex;
    align-items: stretch;
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.diff-column {
    flex: 1;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.diff-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.diff-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.diff-icon.simple {
    background: rgba(149, 165, 166, 0.1);
    color: var(--text-tertiary);
}

.diff-icon.advanced {
    background: rgba(74, 155, 125, 0.1);
    color: var(--primary-color);
}

.diff-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.diff-flow {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.flow-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flow-label {
    padding: 8px 14px;
    background: rgba(149, 165, 166, 0.08);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.diff-column:last-child .flow-label {
    background: rgba(74, 155, 125, 0.08);
    color: var(--primary-color);
}

.flow-item i {
    font-size: 12px;
    color: var(--text-tertiary);
}

.diff-column:last-child .flow-item i {
    color: var(--primary-color);
}

.diff-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.diff-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
}

.diff-vs span {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(39, 174, 96, 0.95);
    color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

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

.toast-message i {
    font-size: 18px;
}

.toast-message span {
    font-size: 14px;
    font-weight: 500;
}

.flashcards-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

#results-section {
    background: var(--bg-light);
    padding-bottom: 48px;
}

.results-tabs {
    display: flex;
    gap: 8px;
    padding: 0 48px;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.results-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 0 22px;
    min-height: 44px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(74, 155, 125, 0.05);
}

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

.results-content {
    padding: 0 48px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.structure-result {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
}

.paper-info h2 {
    font-size: 24px;
    font-weight: 750;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.authors {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

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

.tag {
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.tag.field {
    background: rgba(74, 155, 125, 0.1);
    color: var(--primary-color);
}

.tag.keyword {
    background: rgba(107, 154, 196, 0.1);
    color: var(--secondary-color);
}

.abstract-section,
.chapters-section,
.tables-section,
.figures-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.structure-result h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.structure-result p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.chapters-list,
.tables-list,
.figures-list {
    list-style: none;
    padding: 0;
}

.chapters-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
    cursor: pointer;
    font-size: 16px;
    min-height: 44px;
}

.chapters-list li:hover {
    background: rgba(74, 155, 125, 0.05);
}

.chapter-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tables-list li,
.figures-list li {
    padding: 10px 0;
    font-size: 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    line-height: 1.6;
}

.tables-list li:last-child,
.figures-list li:last-child {
    border-bottom: none;
}

.notes-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: var(--shadow-light);
}

.toolbar-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.markdown-preview {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-card);
    max-height: 600px;
    overflow-y: auto;
    font-size: 17px;
    line-height: 1.85;
    color: var(--text-primary);
}

.markdown-preview h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-color);
    line-height: 1.3;
}

.markdown-preview h2 {
    font-size: 24px;
    font-weight: 750;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 16px;
    line-height: 1.35;
}

.markdown-preview h3 {
    font-size: 21px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 26px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.markdown-preview p {
    font-size: 17px;
    color: var(--text-primary);
    line-height: 1.85;
    margin-bottom: 16px;
}

.markdown-preview ul,
.markdown-preview ol {
    padding-left: 28px;
    margin-bottom: 16px;
}

.markdown-preview li {
    font-size: 17px;
    color: var(--text-primary);
    line-height: 1.85;
    margin-bottom: 10px;
}

.knowledge-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.knowledge-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.knowledge-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.knowledge-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.knowledge-source {
    font-size: 12px;
    color: var(--text-tertiary);
    font-style: italic;
}

.flashcards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
}

.flashcards-grid .flashcard {
    height: auto;
}

.flashcard {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    min-height: auto;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.35s ease;
    border: 1px solid var(--border-light);
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

.flashcard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #6BB39A);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.flashcard:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(74, 155, 125, 0.15);
    border-color: rgba(74, 155, 125, 0.3);
}

.flashcard:hover::before {
    transform: scaleX(1);
}

.flashcard.expanded {
    background: linear-gradient(180deg, rgba(74, 155, 125, 0.05) 0%, var(--bg-card) 100%);
    border-color: rgba(74, 155, 125, 0.4);
    box-shadow: 0 20px 50px rgba(74, 155, 125, 0.18);
    transform: translateY(-4px);
}

.flashcard.expanded::before {
    transform: scaleX(1);
}

.card-question {
    padding: 28px 28px 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.card-question h4 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.55;
    color: var(--text-primary);
    flex: 1;
    margin: 0;
    transition: color 0.3s ease;
}

.flashcard.expanded .card-question h4 {
    color: var(--primary-color);
}

.card-toggle-icon {
    font-size: 24px;
    color: var(--text-tertiary);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
    font-weight: 300;
}

.flashcard.expanded .card-toggle-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.card-hint-text {
    padding: 0 28px 20px;
    font-size: 14px;
    color: #7A8B9A;
    margin: 0;
    transition: opacity 0.3s ease, height 0.3s ease;
    height: auto;
}

.flashcard.expanded .card-hint-text {
    opacity: 0;
    height: 0;
    padding: 0 28px;
    overflow: hidden;
}

.card-answer {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease,
                transform 0.4s ease;
    padding: 0 28px;
}

.flashcard.expanded .card-answer {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
    padding: 16px 28px 24px;
    overflow-y: auto;
}

.flashcard.expanded .card-answer::-webkit-scrollbar {
    width: 5px;
}

.flashcard.expanded .card-answer::-webkit-scrollbar-track {
    background: rgba(47, 125, 98, 0.08);
    border-radius: 3px;
}

.flashcard.expanded .card-answer::-webkit-scrollbar-thumb {
    background: rgba(47, 125, 98, 0.35);
    border-radius: 3px;
}

.flashcard.expanded .card-answer::-webkit-scrollbar-thumb:hover {
    background: rgba(47, 125, 98, 0.55);
}

.answer-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #2F7D62;
    margin-bottom: 14px;
    padding: 5px 14px;
    background: #E8F5EF;
    border-radius: var(--radius-sm);
    border: 1px solid #BFE3D3;
}

.card-answer > p {
    font-size: 17px;
    color: var(--text-primary);
    line-height: 1.8;
    margin: 0 0 20px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
}

.source-tag {
    background: #E8F5EF;
    color: #2F7D62;
    border: 1px solid #BFE3D3;
}

.flashcards-grid .source-tag {
    color: #000000;
}

.flashcards-grid .flashcard:hover .source-tag {
    color: #000000;
}

.cards-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    margin-bottom: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.cards-count {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.export-cards-btn {
    min-width: 140px;
    height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #3FA37A;
    color: #FFFFFF;
    border: 1px solid #3FA37A;
    box-shadow: 0 8px 20px rgba(63, 163, 122, 0.22);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.export-cards-btn:hover {
    background: #328866;
    border-color: #328866;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(63, 163, 122, 0.28);
}

.export-cards-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(63, 163, 122, 0.2);
}

.export-cards-btn .btn-icon {
    font-size: 16px;
    line-height: 1;
}

.difficulty-tag {
    background: #FFF4D8;
    color: #9A6A00;
    border: 1px solid #F3D58C;
}

.type-tag {
    background: #EAF2FF;
    color: #3568A8;
    border: 1px solid #C8DAF5;
}

.outline-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.outline-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    min-height: 140px;
    box-sizing: border-box;
    transition: all 0.25s ease;
    cursor: default;
}

.outline-card:hover {
    transform: translateY(-4px);
    border-color: #BFE3D3;
    box-shadow: 0 14px 32px rgba(31, 51, 43, 0.1);
}

.outline-card:hover .outline-number {
    background: #328866;
}

.outline-number {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #3FA37A;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
}

.outline-content-card {
    flex: 1;
    min-width: 0;
}

.outline-content-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 750;
    line-height: 1.4;
    color: #24384A;
}

.outline-content-card p {
    margin: 0;
    font-size: 17px;
    line-height: 1.8;
    color: #536678;
}

.sources-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
}

.sources-container h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.sources-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.coverage-section,
.tracking-section {
    margin-top: 24px;
}

.sources-container h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.coverage-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.coverage-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(149, 165, 166, 0.1);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--text-tertiary);
}

.coverage-item.covered {
    background: rgba(74, 155, 125, 0.08);
    border-left-color: var(--primary-color);
}

.coverage-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.coverage-name {
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
}

.coverage-status {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-color);
}

.tracking-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.tracking-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 20px;
}

.tracking-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.tracking-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.tracking-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tracking-tags span {
    padding: 4px 10px;
    background: rgba(74, 155, 125, 0.1);
    border-radius: 10px;
    font-size: 11px;
    color: var(--primary-color);
}

@media (max-width: 1024px) {
    .knowledge-list {
        grid-template-columns: 1fr;
    }
    
    .flashcards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .outline-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .results-tabs {
        padding: 0 24px;
    }
    
    .results-content {
        padding: 0 24px;
    }
    
    .structure-result,
    .markdown-preview,
    .sources-container {
        padding: 20px;
    }
    
    .chapters-list,
    .tables-list,
    .figures-list {
        padding-left: 0;
    }
    
    .flashcards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    
    .coverage-list {
        grid-template-columns: 1fr;
    }
    
    .tracking-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .flashcards-grid {
        grid-template-columns: 1fr;
    }

    .cards-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .export-cards-btn {
        width: 100%;
    }
}

#upload-section {
    background: var(--bg-light);
}

.upload-container {
    padding: 64px 48px;
}

.upload-area {
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 80px 48px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    max-width: 700px;
    margin: 0 auto;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(74, 155, 125, 0.02);
}

.upload-icon {
    width: 64px;
    height: 64px;
    background: rgba(74, 155, 125, 0.08);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
    font-size: 28px;
}

.upload-area h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.upload-area p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.upload-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    background: var(--primary-dark);
}

.upload-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.sample-btn {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sample-btn:hover {
    background: rgba(74, 155, 125, 0.08);
}

.file-input {
    display: none;
}

.file-cards-container {
    padding: 0 48px 32px;
}

.file-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.card-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-icon {
    width: 48px;
    height: 48px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E74C3C;
    font-size: 22px;
}

.file-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.file-meta {
    display: flex;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.meta-item i {
    font-size: 12px;
}

.card-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(241, 196, 15, 0.1);
    color: #F39C12;
}

.status-badge.completed {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.status-badge.processing {
    background: rgba(52, 152, 219, 0.1);
    color: #3498DB;
}

.parse-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.parse-btn:hover:not(:disabled) {
    background: var(--primary-dark);
}

.parse-btn:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
}

.parse-progress-container {
    padding: 0 48px 32px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.progress-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-timer {
    font-size: 14px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.progress-timeline {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.progress-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 24px;
    position: relative;
}

.progress-step:last-child {
    padding-bottom: 0;
}

.progress-step:last-child .step-line {
    display: none;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.progress-step.completed .step-circle {
    background: var(--primary-color);
    color: white;
}

.progress-step.completed .step-circle::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.step-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.step-status.waiting {
    background: rgba(149, 165, 166, 0.1);
    color: var(--text-tertiary);
}

.step-status.processing {
    background: rgba(52, 152, 219, 0.1);
    color: #3498DB;
}

.step-status.completed {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.step-line {
    position: absolute;
    left: 19px;
    top: 56px;
    width: 2px;
    height: calc(100% - 40px);
    background: var(--border-light);
}

.progress-step.completed .step-line {
    background: var(--primary-color);
}

.progress-bar-container {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-bar-container .progress-bar {
    flex: 1;
    height: 8px;
    margin-bottom: 0;
}

.progress-percentage {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    font-family: var(--font-mono);
    min-width: 48px;
    text-align: right;
}

.parse-complete-container {
    padding: 48px;
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin: 0 48px 32px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.complete-icon {
    font-size: 56px;
    margin-bottom: 20px;
    display: block;
}

.parse-complete-container h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.parse-complete-container p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.7;
}

.complete-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.supported-formats {
    padding: 0 48px 64px;
}

.supported-formats h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.format-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.format-item:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.format-item i {
    color: var(--primary-color);
    font-size: 16px;
}

#structure-section {
    background: var(--bg-light);
}

.structure-container {
    padding: 48px;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
}

.structure-tree {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.structure-tree h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.tree-view {
    list-style: none;
}

.tree-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    font-size: 15px;
    color: var(--text-secondary);
    min-height: 40px;
}

.tree-item:hover {
    background: rgba(74, 155, 125, 0.06);
    color: var(--text-primary);
}

.tree-item i {
    font-size: 11px;
    color: var(--text-tertiary);
}

.tree-children {
    margin-left: 20px;
    border-left: 1px solid var(--border-light);
    padding-left: 8px;
    margin-top: 4px;
}

.tree-children .tree-item {
    padding-left: 12px;
    font-size: 14px;
}

.structure-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-content: start;
}

.info-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.15s ease;
}

.info-card:hover {
    border-color: var(--primary-color);
}

.info-icon {
    width: 48px;
    height: 48px;
    background: rgba(74, 155, 125, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
    flex-shrink: 0;
}

.info-content {
    display: flex;
    flex-direction: column;
}

.info-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.info-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

#notes-section {
    background: var(--bg-light);
}

.notes-container {
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}

.notes-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.toolbar-btn {
    padding: 0 18px;
    min-height: 40px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
}

.toolbar-btn.active,
.toolbar-btn:hover {
    background: rgba(74, 155, 125, 0.08);
    color: var(--primary-color);
}

.toolbar-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 12px;
}

.action-btn:hover {
    background: rgba(74, 155, 125, 0.06);
    color: var(--primary-color);
}

.notes-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    min-height: 500px;
}

.markdown-preview {
    max-height: 500px;
    overflow-y: auto;
    font-size: 17px;
    line-height: 1.85;
    color: var(--text-primary);
}

.markdown-preview h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-color);
    line-height: 1.3;
}

.markdown-preview h2 {
    font-size: 24px;
    font-weight: 750;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 16px;
    line-height: 1.35;
}

.markdown-preview h3 {
    font-size: 21px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 26px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.markdown-preview p {
    font-size: 17px;
    color: var(--text-primary);
    line-height: 1.85;
    margin-bottom: 16px;
}

.markdown-preview ul,
.markdown-preview ol {
    padding-left: 28px;
    margin-bottom: 16px;
}

.markdown-preview li {
    font-size: 17px;
    color: var(--text-primary);
    line-height: 1.85;
    margin-bottom: 10px;
}

.notes-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.notes-sidebar h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.4;
}

.knowledge-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    background: rgba(74, 155, 125, 0.08);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.insight-item {
    display: flex;
    gap: 10px;
    padding: 16px;
    background: rgba(245, 200, 122, 0.08);
    border: 1px solid rgba(245, 200, 122, 0.2);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.insight-item i {
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 2px;
}

#flashcards-section {
    background: var(--bg-light);
}

.flashcards-container {
    padding: 48px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 0;
}

.flashcard {
    perspective: 1000px;
    cursor: pointer;
    height: 240px;
}

.flashcard.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.card-front {
    background: var(--bg-card);
}

.card-category {
    align-self: flex-start;
    padding: 5px 12px;
    background: rgba(74, 155, 125, 0.08);
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 500;
    border-radius: 20px;
    margin-bottom: 18px;
}

.card-front h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.card-back {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    transform: rotateY(180deg);
    justify-content: space-between;
}

.card-back p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
}

.source-tag {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.flashcards-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 48px 48px;
}

#outline-section {
    background: var(--bg-light);
}

.outline-container {
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.outline-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.outline-item {
    margin-bottom: 4px;
}

.outline-item.level-1 .item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(74, 155, 125, 0.05);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.outline-item.level-1 .item-header:hover {
    background: rgba(74, 155, 125, 0.08);
    border-color: rgba(74, 155, 125, 0.2);
}

.outline-item.level-1 .item-header i {
    font-size: 11px;
    color: var(--primary-color);
}

.outline-item.level-1 .item-header span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.item-children {
    padding-left: 36px;
    margin-top: 4px;
}

.outline-item.level-2 {
    padding: 10px 12px;
    font-size: 15px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    line-height: 1.6;
}

.outline-item.level-2:hover {
    background: rgba(74, 155, 125, 0.05);
    color: var(--text-primary);
}

.outline-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-self: start;
}

.outline-preview h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.preview-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.preview-header {
    padding: 14px 20px;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.preview-body {
    padding: 22px 20px;
}

.preview-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
    line-height: 1.4;
}

.preview-outline p {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.6;
}

.preview-sub {
    padding-left: 20px;
    font-size: 14px !important;
    color: var(--text-secondary) !important;
    font-weight: 400 !important;
}

#export-section {
    background: var(--bg-primary);
}

.export-container {
    padding: 48px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.export-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.export-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.export-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.export-icon {
    width: 56px;
    height: 56px;
    background: rgba(74, 155, 125, 0.08);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    color: var(--primary-color);
    font-size: 24px;
}

.export-card h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.4;
}

.export-card p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.75;
}

.export-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0 22px;
    min-height: 42px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

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

.export-settings {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.export-settings h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.settings-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    .hero-content-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .hero-content h1 {
        font-size: 44px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .structure-container {
        grid-template-columns: 1fr;
    }
    
    .notes-container {
        grid-template-columns: 1fr;
    }
    
    .outline-container {
        grid-template-columns: 1fr;
    }
    
    .flashcards-container {
        grid-template-columns: 1fr;
    }
    
    .export-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .settings-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hero-content h1 {
        font-size: 38px;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section-header h1 {
        font-size: 32px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .section-header p {
        font-size: 16px;
    }
    
    .feature-card h3 {
        font-size: 20px;
    }
    
    .feature-card p {
        font-size: 15.5px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .markdown-preview {
        font-size: 16px;
    }
    
    .markdown-preview h1 {
        font-size: 28px;
    }
    
    .markdown-preview h2 {
        font-size: 22px;
    }
    
    .markdown-preview h3 {
        font-size: 19px;
    }
    
    .markdown-preview p,
    .markdown-preview li {
        font-size: 16px;
    }
    
    .outline-content-card h3 {
        font-size: 20px;
    }
    
    .outline-content-card p {
        font-size: 16px;
    }
    
    .card-question h4 {
        font-size: 18px;
    }
    
    .card-answer > p {
        font-size: 16px;
    }
    
    .paper-info h2 {
        font-size: 22px;
    }
    
    .structure-result h3 {
        font-size: 17px;
    }
    
    .structure-result p {
        font-size: 16px;
    }
    
    .tab-btn {
        font-size: 15px;
        min-height: 40px;
        padding: 0 16px;
    }
    
    .differentiation {
        padding: 48px 24px;
    }
    
    .diff-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .diff-vs {
        width: 100%;
        padding: 16px 0;
        border-top: 1px dashed var(--border-light);
        border-bottom: 1px dashed var(--border-light);
    }
    
    .flow-item {
        flex-wrap: wrap;
    }
    
    .workflow-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
    
    .upload-container,
    .supported-formats,
    .structure-container,
    .notes-container,
    .outline-container,
    .export-container {
        padding: 32px 24px;
    }
    
    .hero {
        padding: 48px 24px;
    }
    
    .features,
    .workflow {
        padding: 48px 24px;
    }
    
    .export-options {
        grid-template-columns: 1fr;
    }
    
    .settings-options {
        grid-template-columns: 1fr;
    }
    
    body.dark-mode .hero {
        background: 
            linear-gradient(
                180deg,
                rgba(7, 17, 31, 0.96) 0%,
                rgba(7, 17, 31, 0.88) 55%,
                rgba(7, 17, 31, 0.72) 100%
            ),
            url('assets/hero-night-bg.png?v=2');
        background-size: cover;
        background-position: center right;
        background-repeat: no-repeat;
    }
    
    body:not(.dark-mode) .hero {
        background: 
            linear-gradient(
                180deg,
                rgba(248, 252, 251, 0.98) 0%,
                rgba(248, 252, 251, 0.92) 50%,
                rgba(248, 252, 251, 0.80) 100%
            ),
            url('assets/hero-light-bg.png?v=2');
        background-size: cover;
        background-position: center right;
        background-repeat: no-repeat;
    }
}

.section {
    opacity: 1;
}

.hero-content h1 {
    opacity: 1;
}

.hero-content p {
    opacity: 1;
}

.hero-buttons {
    opacity: 1;
}

.hero-stats {
    opacity: 1;
}

.preview-card {
    opacity: 1;
}

.feature-card {
    opacity: 1;
}

.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

.flashcard {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard:hover {
    transform: translateY(-6px);
}

.flashcard.flipped .card-inner {
    transform: rotateY(180deg);
}

.info-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .hero {
    background: 
        linear-gradient(
            90deg,
            rgba(7, 17, 31, 0.96) 0%,
            rgba(7, 17, 31, 0.82) 42%,
            rgba(7, 17, 31, 0.38) 100%
        ),
        url('assets/hero-night-bg.png?v=2');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    border-bottom: 1px solid rgba(34, 211, 166, 0.18);
}

body.dark-mode .hero-content h1 {
    color: #F4F8FC;
}

body.dark-mode .hero-content h1 .highlight {
    color: #22D3A6;
    text-shadow: 0 0 24px rgba(34, 211, 166, 0.28);
}

body.dark-mode .hero-content p {
    color: #C0CFDA;
}

body.dark-mode .hero .stat-item {
    background: rgba(16, 32, 51, 0.72);
    border: 1px solid rgba(111, 180, 160, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

body.dark-mode .hero .stat-item:hover {
    border-color: rgba(34, 211, 166, 0.45);
    box-shadow: 0 0 24px rgba(34, 211, 166, 0.16);
}

body.dark-mode .hero .primary-btn {
    background: linear-gradient(135deg, #22D3A6, #18B88F);
    color: #FFFFFF;
    box-shadow: 0 10px 28px rgba(34, 211, 166, 0.25);
}

body.dark-mode .hero .primary-btn:hover {
    box-shadow: 0 14px 36px rgba(34, 211, 166, 0.35);
    transform: translateY(-2px);
}

body.dark-mode .hero .secondary-btn {
    background: rgba(16, 32, 51, 0.65);
    color: #F4F8FC;
    border: 1px solid rgba(192, 207, 218, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .hero .secondary-btn:hover {
    background: rgba(16, 32, 51, 0.85);
    border-color: rgba(34, 211, 166, 0.4);
    color: #22D3A6;
}

body.dark-mode .feature-card {
    border-color: rgba(111, 180, 160, 0.15);
}

body.dark-mode .feature-card:hover {
    border-color: rgba(34, 211, 166, 0.4);
    box-shadow: 0 12px 32px rgba(34, 211, 166, 0.15), var(--glow-soft);
}

body.dark-mode .nav-item:hover {
    background: rgba(34, 211, 166, 0.1);
    color: var(--primary-color);
}

body.dark-mode .nav-item.active {
    background: rgba(34, 211, 166, 0.15);
    color: var(--primary-color);
    box-shadow: inset 0 0 20px rgba(34, 211, 166, 0.08);
}

body.dark-mode .nav-item.active::before {
    background: var(--primary-color);
    box-shadow: 0 0 12px rgba(34, 211, 166, 0.6);
}

body.dark-mode .sidebar-header {
    border-bottom-color: rgba(111, 180, 160, 0.15);
}

body.dark-mode .sidebar-footer {
    border-top-color: rgba(111, 180, 160, 0.15);
}

body.dark-mode .login-btn {
    background: rgba(34, 211, 166, 0.1);
    border-color: rgba(34, 211, 166, 0.3);
    color: var(--primary-color);
}

body.dark-mode .login-btn:hover {
    background: rgba(34, 211, 166, 0.2);
    border-color: var(--primary-color);
}

body.dark-mode .upload-area:hover,
body.dark-mode .upload-area.dragover {
    background: rgba(34, 211, 166, 0.05);
    border-color: var(--primary-color);
}

body.dark-mode .tag {
    background: rgba(34, 211, 166, 0.12);
    color: var(--primary-color);
}

body.dark-mode .source-tag {
    background: rgba(34, 211, 166, 0.1);
    color: var(--primary-color);
    border-color: rgba(34, 211, 166, 0.2);
}

body.dark-mode .difficulty-tag {
    background: rgba(248, 213, 126, 0.1);
    color: #F8D57E;
    border-color: rgba(248, 213, 126, 0.2);
}

body.dark-mode .type-tag {
    background: rgba(90, 184, 230, 0.1);
    color: #5AB8E6;
    border-color: rgba(90, 184, 230, 0.2);
}

body.dark-mode .answer-label {
    background: rgba(34, 211, 166, 0.15);
    color: var(--primary-color);
    border-color: rgba(34, 211, 166, 0.3);
}

body.dark-mode .flashcard:hover {
    box-shadow: 0 16px 40px rgba(34, 211, 166, 0.12);
}

body.dark-mode .flashcard.expanded {
    border-color: rgba(34, 211, 166, 0.5);
    box-shadow: 0 20px 50px rgba(34, 211, 166, 0.15);
}

body.dark-mode .outline-card:hover {
    border-color: rgba(34, 211, 166, 0.4);
    box-shadow: var(--glow-soft);
}

body.dark-mode .outline-number {
    background: var(--primary-color);
}

body.dark-mode .outline-card:hover .outline-number {
    background: var(--primary-dark);
    box-shadow: 0 0 16px rgba(34, 211, 166, 0.4);
}

body.dark-mode .step-number {
    box-shadow: 0 0 12px rgba(34, 211, 166, 0.3);
}

body.dark-mode .stat-icon.green {
    background: rgba(34, 211, 166, 0.15);
}

body.dark-mode .stat-item:hover .stat-icon.green {
    background: rgba(34, 211, 166, 0.25);
    box-shadow: 0 4px 16px rgba(34, 211, 166, 0.3);
}

body.dark-mode .toolbar-btn.active,
body.dark-mode .toolbar-btn:hover {
    background: rgba(34, 211, 166, 0.12);
}

body.dark-mode .action-btn:hover {
    background: rgba(34, 211, 166, 0.1);
}

body.dark-mode .tree-item:hover {
    background: rgba(34, 211, 166, 0.1);
}

body.dark-mode .info-card:hover {
    border-color: var(--primary-color);
}

body.dark-mode .info-icon {
    background: rgba(34, 211, 166, 0.12);
}

body.dark-mode .upload-icon {
    background: rgba(34, 211, 166, 0.12);
}

body.dark-mode .feature-icon {
    opacity: 0.9;
}

body.dark-mode .feature-card:hover .feature-icon {
    box-shadow: 0 0 20px rgba(34, 211, 166, 0.3);
}

body.dark-mode .progress-fill {
    box-shadow: 0 0 12px rgba(34, 211, 166, 0.5);
}

body.dark-mode .complete-icon {
    text-shadow: 0 0 20px rgba(34, 211, 166, 0.5);
}

body.dark-mode .section-header {
    border-bottom-color: rgba(111, 180, 160, 0.15);
}

body.dark-mode .tabs-container {
    border-bottom-color: rgba(111, 180, 160, 0.15);
}

body.dark-mode .tab-btn:hover {
    background: rgba(34, 211, 166, 0.08);
}

body.dark-mode .tab-btn.active {
    background: var(--primary-color);
    box-shadow: 0 0 20px rgba(34, 211, 166, 0.3);
}

body.dark-mode .empty-state {
    color: var(--text-secondary);
}

body.dark-mode .empty-icon {
    background: rgba(34, 211, 166, 0.1);
}

body.dark-mode .export-card:hover {
    border-color: rgba(34, 211, 166, 0.4);
}

body.dark-mode .export-icon {
    background: rgba(34, 211, 166, 0.12);
}

body.dark-mode .structure-tree,
body.dark-mode .notes-content,
body.dark-mode .outline-content {
    border-color: rgba(111, 180, 160, 0.15);
}

body.dark-mode .card-back {
    background: linear-gradient(135deg, var(--primary-color) 0%, #18C097 100%);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.format-item {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.format-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

.format-item:hover i {
    transform: scale(1.1);
}

.format-item i {
    transition: transform 0.25s ease;
}

.file-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-card:hover {
    box-shadow: var(--shadow-medium);
}

.toolbar-btn {
    transition: all 0.2s ease;
}

.toolbar-btn.active {
    background: rgba(74, 155, 125, 0.1);
    color: var(--primary-color);
}

.action-btn {
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(74, 155, 125, 0.1);
    color: var(--primary-color);
    transform: scale(1.05);
}

.export-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.export-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
}

.export-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.export-btn:hover {
    background: rgba(74, 155, 125, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.insight-item {
    transition: all 0.25s ease;
}

.insight-item:hover {
    background: rgba(245, 200, 122, 0.12);
    border-color: rgba(245, 200, 122, 0.3);
    transform: translateX(4px);
}

.source-tag {
    transition: color 0.2s ease;
}

.flashcard:hover .source-tag {
    color: rgba(255, 255, 255, 0.9);
}

.tree-item {
    transition: all 0.2s ease;
}

.tree-item:hover {
    background: rgba(74, 155, 125, 0.06);
    padding-left: 16px;
}

.outline-item.level-2 {
    transition: all 0.2s ease;
}

.outline-item.level-2:hover {
    background: rgba(74, 155, 125, 0.05);
    padding-left: 18px;
    color: var(--text-primary);
}

.section-header {
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.upload-area {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 155, 125, 0.2);
}

.upload-btn:active {
    transform: translateY(0);
}

.sample-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sample-btn:hover {
    background: rgba(74, 155, 125, 0.08);
    transform: translateY(-2px);
}

.sample-btn:active {
    transform: translateY(0);
}

.parse-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.parse-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 155, 125, 0.2);
}

.parse-btn:active:not(:disabled) {
    transform: translateY(0);
}

.notes-content {
    transition: all 0.3s ease;
}

.notes-content:hover {
    border-color: rgba(74, 155, 125, 0.2);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .preview-card {
        animation: none;
    }
    
    .section,
    .hero-content h1,
    .hero-content p,
    .hero-buttons,
    .hero-stats,
    .preview-card,
    .feature-card,
    .workflow-step,
    .progress-step,
    .export-card {
        opacity: 1;
        animation: none;
    }
}