@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-primary: #1a0a0a;
    --bg-dark: #2d1b1b;
    --bg-secondary: #3d1f1f;
    --bg-light: #4d2525;
    --bg-card: #3d1f1f;
    --bg-hover: rgba(220, 38, 38, 0.1);
    --card-bg: hsla(0, 0%, 100%, .05);

    --text-primary: #fca5a5;
    --text-secondary: #f87171;
    --text-muted: #dc2626;

    --primary: #dc2626;
    --primary-hover: #ef4444;
    --secondary: #b91c1c;
    --accent: #f87171;
    --warning: #f59e0b;
    --error: #ef4444;
    --success: #10b981;

    --border-color: hsla(0, 0%, 100%, .1);
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(220, 38, 38, 0.2);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, .1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, .1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, .1);
    --shadow-primary: 0 4px 15px rgba(220, 38, 38, .3);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: .15s ease;
    --transition-normal: .3s ease;
    --transition-slow: .5s ease;

    --spacing-xs: .25rem;
    --spacing-sm: .5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;

    --font-family: "Urbanist", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --font-size-xs: .75rem;
    --font-size-sm: .875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;

    --radius-sm: .5rem;
    --radius-md: .75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: rgba(220, 38, 38, 0.1);

    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;

    --border-primary: rgba(0, 0, 0, 0.1);
    --border-secondary: rgba(220, 38, 38, 0.2);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

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

.page-container {
    min-height: 100vh;
    width: 100%;
    position: relative;
}

.section-container {
    margin: 0 auto;
    max-width: 1480px;
    padding: 0 var(--spacing-xl);
    width: 100%;
}

section {
    position: relative;
}

.section-header {
    margin-bottom: var(--spacing-4xl);
    text-align: center;
}

.section-tag {
    background-color: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--radius-full);
    color: var(--primary);
    display: inline-block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
}

.section-title {
    background: linear-gradient(180deg, #fff, #bababa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: var(--font-size-5xl);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-xl);
    font-family: sans-serif;
}

/* Deixa o título "Explorar Apostilas" um pouco mais suave */
#apostilasPage .section-title {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.82),
        rgba(186, 186, 186, 0.58)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    border: none;
    outline: none;
}

#apostilasPage .section-title::before,
#apostilasPage .section-title::after {
    display: none;
}

.section-subtitle,
.section-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 600px;
}

@media (max-width: 768px) {
    .section-container {
        padding: 0 var(--spacing-lg);
    }

    .section-title {
        font-size: var(--font-size-4xl);
    }
}

@media (max-width: 640px) {
    .section-container {
        padding: var(--spacing-md);
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }
}

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

.main-app.active {
    display: block;
}

.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: rgba(15, 5, 5, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 20px;
    padding: 8px 16px 8px 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 16px;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.nav-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nav-brand-name {
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b6b, #991a1a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.03em;
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    letter-spacing: 0.01em;
    position: relative;
}

.nav-link i {
    font-size: 13px;
}

.nav-link::after {
    display: none;
}

.nav-link:hover {
    background: rgba(220, 38, 38, 0.12);
    color: rgba(255,255,255,0.85);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(220,38,38,0.25), rgba(185,28,28,0.15));
    color: #ff6b6b;
    border: 1px solid rgba(220,38,38,0.3);
}

.theme-toggle,
.notification-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.theme-toggle:hover,
.notification-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    background: var(--error);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.user-profile:hover {
    background: var(--bg-hover);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.sidebar {
    position: fixed;
    top: 72px;
    left: 0;
    width: 280px;
    height: calc(100vh - 72px);
    background: var(--bg-card);
    border-right: 1px solid var(--border-primary);
    z-index: 900;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    transform: translateX(-224px);
    width: 56px;
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

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

.sidebar.collapsed .sidebar-logo span {
    display: none;
}

.sidebar-content {
    flex: 1;
    padding: 16px 0;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding: 0 24px;
}

.sidebar.collapsed .sidebar-section-title {
    display: none;
}

.sidebar-menu {
    list-style: none;
}

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

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.sidebar-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-item.active .sidebar-link {
    background: var(--bg-hover);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.sidebar-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar.collapsed .sidebar-link span {
    display: none;
}

.sidebar-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.sidebar.collapsed .sidebar-badge {
    display: none;
}

.main-content {
    min-height: 100vh;
}

.page {
    display: none;
    min-height: calc(100vh - 72px);
    padding-top: 120px;
}

.page.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

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

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

.hero {
    margin-top: -120px;
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    background: var(--bg-primary);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    width: 100%;
    margin-top: 25px;
}


.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
    padding: 8px 15px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 450;
    margin-bottom: 8px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-lg);
    color: #dc2626;
    font-family: sans-serif;
}

.gradient-text {
    background: linear-gradient(135deg, #991a1a 0%, #000000 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    border: none;
    outline: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--primary), #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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


.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--spacing-2xl);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-4xl);
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

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

.features {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.feature-card:hover::before {
    transform: translateX(100%);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    margin: 0 auto 24px;
    color: white;
    font-size: 24px;
}

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

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #ef4444);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--primary);
    color: var(--text-primary);
}

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

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

.btn-large {
    padding: 16px 36px;
    font-size: 1rem;
}

.btn-explore {
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    border-radius: 16px;
}

.btn-explore:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(220, 38, 38, 0.4);
}

.btn-explore:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.grade-tabs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 48px;
    background: rgba(15, 5, 5, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(220, 38, 38, 0.15);
    max-width: max-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.tab-btn {
    padding: 9px 22px;
    background: none;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(255,255,255,0.45);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(220,38,38,0.3), rgba(185,28,28,0.2));
    color: #ff8080;
    border-color: rgba(220,38,38,0.35);
    box-shadow: 0 2px 12px rgba(220,38,38,0.2);
}

.tab-btn:hover:not(.active) {
    background: rgba(220, 38, 38, 0.08);
    color: rgba(255,255,255,0.7);
    border-color: rgba(220,38,38,0.15);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.floating-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(220, 38, 38, 0.5);
    border-radius: 50%;
    animation: floatUp infinite ease-in-out;
    bottom: 0;
    z-index: 0;
}

@keyframes floatUp {
    0% { opacity: 1; }
    100% { transform: translateY(-120vh); opacity: 0; }
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: var(--spacing-lg);
}

.floating-rose {
    width: 200px;
    height: auto;
    animation: levitate 3s infinite ease-in-out;
}

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

.discord-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    width: 200px;
    appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fca5a5"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.discord-select:hover {
    border-color: var(--primary);
}

.discord-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.volume-select {
    width: 100%;
    max-width: 400px;
}


.grade-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition);
    position: relative;
}

.grade-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #dc2626, #b91c1c);
    border-radius: 4px 0 0 4px;
}

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

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

.grade-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    color: white;
    font-size: 20px;
}

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

.grade-count {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-hover);
    padding: 4px 8px;
    border-radius: 12px;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.subject-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-hover);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition-fast);
}

.subject-item:hover {
    background: rgba(220, 38, 38, 0.2);
}

.subject-item i {
    color: var(--primary);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.subject-item span:first-of-type {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.subject-count {
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
}

.grade-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.grade-actions .btn {
    flex: 1;
    justify-content: center;
}

.volume-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-primary);
    margin-bottom: 12px;
}

.volume-section:first-of-type {
    border-top: none;
    margin-top: 16px;
    margin-bottom: 12px;
}

.volume-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.books-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.book-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 14px;
    font-weight: 500;
}

.book-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.book-item i:first-child {
    color: var(--error);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.book-item i:last-child {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: auto;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.book-item:hover i:last-child {
    opacity: 1;
    color: var(--primary);
}

.stats-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition);
}

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

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    color: white;
    font-size: 24px;
}

.stat-info {
    flex: 1;
}

.stat-card .stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

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

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

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

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.page-header {
    padding: 40px 0 60px;
    text-align: center;
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 800;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        transform: translateX(-100%);
    }

    .sidebar.open .sidebar-link span,
    .sidebar.open .sidebar-section-title,
    .sidebar.open .sidebar-badge {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .main-content.sidebar-collapsed {
        margin-left: 0;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }

    .nav-center {
        margin: 0 16px;
        max-width: 200px;
    }

    .hero {
        margin-top: -120px;
        padding: 60px 0 80px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .hero-stats {
        gap: 32px;
    }

    .features {
        padding: 80px 0;
    }

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

    .grade-tabs {
        flex-direction: column;
        width: 100%;
    }

    .subjects-grid {
        grid-template-columns: 1fr;
    }

    .grade-actions {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .user-name {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .nav-center {
        display: none;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .features {
        padding: 60px 0;
    }

    .stats-section {
        padding: 60px 0;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px);
    padding-top: 120px;
    padding: 40px 0;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--primary), transparent);
    animation: rotate 4s linear infinite;
    z-index: -1;
    opacity: 0.1;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    margin: 0 auto 24px;
    color: white;
    font-size: 32px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container i:first-child {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 16px;
    z-index: 2;
}

.input-container input {
    width: 100%;
    height: 48px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 0 48px;
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
}

.input-container input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.input-container input::placeholder {
    color: var(--text-muted);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    z-index: 3;
}

.password-toggle:hover {
    color: var(--primary);
    background: var(--bg-hover);
}

.password-toggle i {
    font-size: 14px;
}

.login-btn {
    margin-top: 16px;
    height: 48px;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    justify-content: center;
}

.login-btn.loading {
    pointer-events: none;
}

.login-btn.loading span {
    opacity: 0;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 0 32px;
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome-section h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.welcome-section h1 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.school-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 8px 12px;
    background: var(--bg-hover);
    border-radius: 8px;
    max-width: fit-content;
}

.school-info i.fa-school {
    color: var(--primary);
    font-size: 16px;
}

.school-name {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.school-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.school-toggle:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.school-toggle i {
    font-size: 12px;
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 16px;
}

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

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

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

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    color: white;
    font-size: 20px;
}

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

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: var(--transition-fast);
    gap: 12px;
    flex-wrap: wrap;
}

.info-item:hover {
    background: var(--bg-hover);
}

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

.info-value {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.4;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: none;
    border-radius: 12px;
    transition: var(--transition-fast);
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 10px;
    color: var(--primary);
    font-size: 18px;
}

.stat-info {
    text-align: center;
}

.stat-item .stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

.stat-item .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.activity-item:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 8px;
    color: var(--primary);
    font-size: 14px;
}

.activity-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 768px) {

    .login-card {
        padding: 32px 24px;
        margin: 0 16px;
    }

    .dashboard-card a.btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px 16px;
    }

    .login-header h2 {
        font-size: 24px;
    }

    .welcome-section h1 {
        font-size: 24px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .info-value {
        font-size: 13px;
        width: 100%;
    }
}



.donation-widget {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    z-index: 900;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.donation-widget:hover {
    transform: translateY(-2px);
}

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

.widget-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.toggle-widget {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.toggle-widget:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.donation-widget.collapsed .donation-list {
    display: none;
}

.donation-widget.collapsed .toggle-widget i {
    transform: rotate(180deg);
}

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

.donation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 14px;
}

.donation-item {
    display: flex;
    flex-direction: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 14px;
    min-width: 100px;
}

.donor-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.donation-amount {
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 1024px) {
    .donation-widget {
        display: none;
    }
}

.donation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.donation-modal.active {
    opacity: 1;
    visibility: visible;
}

.donation-modal-content {
    background: linear-gradient(160deg, #1a0808 0%, #0d0404 100%);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.04), inset 0 1px 0 rgba(255,255,255,0.06);
    transform: scale(0.92) translateY(24px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.donation-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dc2626, #ef4444, transparent);
}

.donation-modal.active .donation-modal-content {
    transform: scale(1) translateY(0);
}

.donation-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 2;
}

.donation-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.donation-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), #ef4444);
    border-radius: 12px;
    margin: 0 auto 24px;
    color: white;
    font-size: 28px;
}

.donation-header {
    text-align: center;
    margin-bottom: 28px;
}

.donation-header h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-primary);
}

.donation-header h2 .highlight {
    background: linear-gradient(135deg, var(--primary), #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.donation-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.support-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.donation-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid rgba(220, 38, 38, 0.35);
    background: rgba(220, 38, 38, 0.1);
    color: #ff8080;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    letter-spacing: 0.02em;
    box-shadow: none;
}

.donation-btn:hover {
    background: rgba(220, 38, 38, 0.18);
    border-color: rgba(220, 38, 38, 0.5);
    color: #ffaaaa;
    transform: translateY(-1px);
}

.donation-btn i {
    font-size: 13px;
    color: #ff8080;
}

.support-btn {
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.support-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.75);
}

.donation-card {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.donation-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.donation-card-header i {
    color: #ab2121;
    font-size: 20px;
}

.donation-card-text {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin-bottom: 8px;
}

.donation-loading {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-style: italic;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #ef4444);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(220, 38, 38, 0.4);
}

@media (max-width: 768px) {
    .donation-modal-content {
        padding: 40px 28px;
    }

    .donation-header h2 {
        font-size: var(--font-size-2xl);
    }

    .donation-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .donation-modal-content {
        padding: 24px 20px;
    }

    .donation-header h2 {
        font-size: 20px;
    }

    .donation-header p {
        font-size: 14px;
    }

    .donation-btn {
        padding: 14px 24px;
        font-size: 14px;
    }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    min-height: 400px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-primary);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
    margin-bottom: 24px;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes loadingPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .loading-container {
        padding: 60px 20px;
        min-height: 300px;
    }

    .loading-spinner {
        width: 48px;
        height: 48px;
        border-width: 3px;
        margin-bottom: 20px;
    }

    .loading-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .loading-container {
        padding: 40px 16px;
        min-height: 250px;
    }

    .loading-spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
        margin-bottom: 16px;
    }

    .loading-text {
        font-size: 13px;
    }
}

.hero-stats {
    display: none !important;
}

.hero-actions {
    margin-bottom: 0 !important;
}

.features::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 300px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.features {
    position: relative;
}

.hero-subtitle {
    color: #9ca3bd !important;
}

.btn-large {
    padding: 14px 28px !important;
    font-size: 0.95rem !important;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem) !important;
    }

    .hero-subtitle {
        font-size: 0.9rem !important;
    }

    .btn-large {
        padding: 12px 24px !important;
        font-size: 0.9rem !important;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.grade-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.grade-card:nth-child(1) {
    animation-delay: 0.1s;
}

.grade-card:nth-child(2) {
    animation-delay: 0.2s;
}

.grade-card:nth-child(3) {
    animation-delay: 0.3s;
}

.grade-card:nth-child(4) {
    animation-delay: 0.4s;
}

.grade-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3);
    border-color: var(--primary);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grade-card:nth-child(1) .grade-icon {
    animation-delay: 0.2s;
}

.grade-card:nth-child(2) .grade-icon {
    animation-delay: 0.3s;
}

.grade-card:nth-child(3) .grade-icon {
    animation-delay: 0.4s;
}

.grade-card:nth-child(4) .grade-icon {
    animation-delay: 0.5s;
}

.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before,
.btn-secondary::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;
}

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

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.4);
}

.book-item {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.book-item:hover {
    transform: translateX(5px) scale(1.03);
    background: rgba(220, 38, 38, 0.15);
    border-left: 3px solid var(--primary);
    padding-left: 9px;
}

.tab-btn {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tab-btn:hover:not(.active) {
    transform: translateY(-2px);
}

.tab-btn.active {
    animation: fadeIn 0.3s ease-out;
}

.feature-card {
    animation: fadeInUp 0.2s ease-out;
}

.donation-modal.active .donation-modal-content {
    animation: fadeInUp 0.6s ease-out;
}


@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    background: var(--primary);
    transition: width 0.3s ease;
}

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

.hero-actions .btn {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.hero-actions .btn:nth-child(1) {
    animation-delay: 0.4s;
}

.hero-actions .btn:nth-child(2) {
    animation-delay: 0.5s;
}

.hero-title {
    color: #dc2626;
}

.hero-subtitle {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.1);
    font-weight: bold;
    pointer-events: none;
    z-index: 10;
    user-select: none;
    font-family: var(--font-family);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

#imageDisplay {
  max-width: 80%;
  max-height: 80%;
}

#closeImageModal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

#prevImage, #nextImage {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 10px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 5px;
}

#prevImage {
  left: 20px;
}

#nextImage {
  right: 20px;
}

.image-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
}

.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    z-index: 10001;
}

.image-prev {
    left: -50px;
}

.image-next {
    right: -50px;
}

.volume-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #202225;
    color: #dcddde;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.view-btn i:first-child {
    color: #ef4444;
    font-size: 15px;
    flex-shrink: 0;
}

.view-btn span {
    flex: 1;
    color: #dcddde;
}

.view-btn-arrow {
    font-size: 11px;
    color: #72767d;
    flex-shrink: 0;
    transition: color 0.2s;
}

.view-btn:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.4);
    transform: translateX(3px);
}

.view-btn:hover .view-btn-arrow {
    color: #ef4444;
}

.volume-empty {
    font-size: 12px;
    color: #72767d;
    font-style: italic;
    padding: 6px 4px;
}

/* Embed-style grade cards */
.embed-card {
    border-left: 4px solid var(--primary) !important;
    background: #2f3136 !important;
    color: #dcddde !important;
    border-radius: 4px !important;
    padding: 16px !important;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.06);
    min-width: 260px;
    max-width: 340px;
    flex: 1;
}

.embed-card::before {
    display: none !important;
}

.embed-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.embed-card-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.embed-card .grade-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    border-radius: 8px;
    flex-shrink: 0;
}

.embed-card h3 {
    font-size: 15px !important;
    font-weight: 600;
    color: #ffffff !important;
    margin: 0;
}

.embed-card .grade-count {
    font-size: 11px;
    color: #72767d;
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 10px;
    width: fit-content;
}

.embed-card .volume-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 0;
}

.embed-card .volume-section:first-of-type {
    border-top: none;
    margin-top: 4px;
}

.embed-card .volume-title {
    font-size: 12px;
    font-weight: 700;
    color: #b9bbbe;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.embed-card .volume-title::before {
    display: none;
}

.grade-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

/* Server card mini */
.server-section {
    padding-top: 0;
}

.server-card-mini {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1100px, calc(100vw - 40px));
    background: #2f3136;
    border-left: 4px solid #FABA86;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 500;
    transition: box-shadow 0.2s ease;
}

.server-card-mini:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}

.server-card-banner {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.server-card-body {
    padding: 10px 12px;
}

.server-card-body h3 {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.server-card-body p {
    font-size: 11px;
    color: #b9bbbe;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.server-card-body .discord-embed-btn {
    display: block;
    text-align: center;
    font-size: 12px;
    padding: 7px 10px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .server-card-mini {
        position: static;
        width: 100%;
        max-width: 320px;
        margin: 80px auto 0;
    }
}

/* Discord Embed Styles */
.discord-embed {
    border-left: 4px solid #5f2a07;
    background: #2f3136;
    color: #dcddde;
    border-radius: 4px;
    margin: 0;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.discord-banner-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.discord-embed-body {
    padding: 16px;
}

.discord-embed-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #b9bbbe;
    margin-bottom: 8px;
}

.discord-embed-author i {
    color: #5865f2;
}

.discord-embed-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.discord-embed-body p {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #dcddde;
}

.discord-embed-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.discord-embed-field {
    background: #202225;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 14px;
}

.discord-embed-field i {
    color: #b9bbbe;
    margin-right: 8px;
}

.discord-embed-field strong {
    color: #ffffff;
    display: block;
    font-weight: 600;
}

.discord-embed-field span {
    color: #b9bbbe;
    display: block;
    margin-top: 2px;
    font-size: 12px;
}

.discord-embed-btn {
    background: #5865f2;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.discord-embed-btn:hover {
    background: #4752c4;
}

.discord-embed-btn i {
    margin-right: 8px;
}

/* Discord Popup de divulgação */
.discord-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 340px;
    background: #2f3136;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
    z-index: 9998;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.discord-popup.show {
    transform: translateY(0);
    opacity: 1;
}

.discord-popup.hide {
    transform: translateY(120%);
    opacity: 0;
}

.discord-popup-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: #5865f2;
    transform-origin: left;
    animation: none;
}

.discord-popup-progress.running {
    animation: progressShrink 6s linear forwards;
}

@keyframes progressShrink {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

.discord-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 50%;
    color: #b9bbbe;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.discord-popup-close:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.discord-popup-banner {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.discord-popup-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px 16px;
}

.discord-popup-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #c45c00, #7a2e00);
    border-radius: 50%;
    color: #FABA86;
    font-size: 16px;
    flex-shrink: 0;
}

.discord-popup-text {
    flex: 1;
}

.discord-popup-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.discord-popup-text p {
    font-size: 11px;
    color: #b9bbbe;
    line-height: 1.4;
    margin: 0;
}

.discord-popup-btn {
    background: #5865f2;
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.discord-popup-btn:hover {
    background: #4752c4;
}

@media (max-width: 480px) {
    .discord-popup {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 16px;
    }
}

/* ============================================================
   MELHORIAS MOBILE
   ============================================================ */

@media (max-width: 768px) {

    /* Navbar */
    .navbar {
        top: 10px;
        width: calc(100% - 24px);
    }

    .nav-container {
        padding: 6px 10px;
        gap: 8px;
        width: 100%;
        justify-content: space-between;
    }

    .nav-brand-name {
        font-size: 12px;
    }

    .nav-logo {
        width: 22px;
        height: 22px;
    }

    .nav-link {
        padding: 6px 10px;
        font-size: 11px;
        gap: 5px;
    }

    .nav-link span {
        display: none;
    }

    .nav-link i {
        font-size: 15px;
    }

    /* Hero */
    .hero {
        padding: 20px 0;
    }

    .hero-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
    }

    .floating-rose {
        width: 100px;
    }

    .title-container {
        gap: 12px;
        flex-direction: column;
    }

    /* Tabs */
    .grade-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        width: calc(100% - 32px);
        gap: 4px;
        padding: 6px;
    }

    .tab-btn {
        padding: 8px 14px;
        font-size: 12px;
        flex: 1;
        text-align: center;
    }

    /* Cards */
    .grade-cards {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 0 4px;
    }

    .embed-card {
        min-width: unset !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Botões de apostila */
    .view-btn {
        font-size: 12px;
        padding: 10px 12px;
    }

    /* Popup Discord */
    .discord-popup {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 12px;
        left: 12px;
    }

    /* Modal de doação */
    .donation-modal-content {
        padding: 28px 20px;
        margin: 12px;
        width: calc(100% - 24px);
    }

    .donation-header h2 {
        font-size: 1.3rem;
    }

    .support-buttons {
        flex-direction: column;
    }

    .donation-btn,
    .support-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Server card */
    .server-card-mini {
        width: calc(100vw - 24px);
        left: 12px;
        right: 12px;
        transform: none;
    }

    /* Apostilas section */
    .apostilas-section .container {
        padding: 0 12px;
    }

    .section-title {
        font-size: 1.6rem !important;
    }

    .section-subtitle {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .nav-brand {
        display: none;
    }

    .nav-container {
        justify-content: center;
    }

    .hero-title {
        font-size: clamp(1.4rem, 8vw, 1.8rem) !important;
    }

    .floating-rose {
        width: 80px;
    }

    .tab-btn {
        font-size: 11px;
        padding: 7px 10px;
    }

    .embed-card h3 {
        font-size: 14px !important;
    }

    .view-btn span {
        font-size: 11px;
    }
}
