:root {
    --primary: #007AFF;
    --primary-light: #5AC8FA;
    --primary-dark: #0051D5;
    --secondary: #5856D6;
    --secondary-light: #AF52DE;
    --success: #34C759;
    --success-light: #30D158;
    --warning: #FF9500;
    --warning-light: #FFCC00;
    --danger: #FF3B30;
    --danger-light: #FF6961;
    --info: #00C7BE;
    --info-light: #5DE4DC;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e5e5e7;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --card-bg: rgba(255, 255, 255, 0.85);
    --sidebar-bg: rgba(255, 255, 255, 0.95);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.12);
    --shadow-colored: 0 10px 30px rgba(0, 122, 255, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #1c1c1e;
    --bg-tertiary: #2c2c2e;
    --text-primary: #ffffff;
    --text-secondary: #98989d;
    --card-bg: rgba(28, 28, 30, 0.85);
    --sidebar-bg: rgba(28, 28, 30, 0.95);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.7);
    --shadow-colored: 0 10px 30px rgba(0, 122, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
    overflow-x: hidden;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* App Layout */
.app {
    display: flex;
    min-height: 100vh;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.app.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(88, 86, 214, 0.3);
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Navigation */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    min-height: 50px;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-colored);
}

.nav-item.logout:hover {
    background: var(--danger);
    color: white;
}

.nav-icon {
    font-size: 1.25rem;
    min-width: 24px;
}

.badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
}

/* Theme Toggle */
.theme-toggle {
    margin-top: auto;
    padding-top: 2rem;
}

.theme-button {
    width: 100%;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition);
    min-height: 50px;
}

.theme-button:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

/* Mobile Header */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 99;
    min-height: 60px;
}

.burger-menu {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 0;
    order: -1; /* Sorgt dafür, dass es ganz links ist */
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.mobile-title {
    font-weight: 600;
    font-size: 1.1rem;
    flex: 1;
    text-align: center;
}

/* Sidebar Overlay für Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    transition: var(--transition);
}

/* Page Info */
.page-info {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 0.95rem;
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 14px;
    border-left: 4px solid var(--primary);
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.card-accent {
    border-left: 4px solid var(--primary);
}

/* Dashboard */
.dashboard {
    display: grid;
    gap: 1.5rem;
}

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

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.stat-card-primary::before {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.stat-card-success::before {
    background: linear-gradient(90deg, var(--success), var(--success-light));
}

.stat-card-warning::before {
    background: linear-gradient(90deg, var(--warning), var(--warning-light));
}

.stat-card-info::before {
    background: linear-gradient(90deg, var(--info), var(--info-light));
}

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

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-primary {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.progress-success {
    background: linear-gradient(90deg, var(--success), var(--success-light));
}

/* Tags */
.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.tag-success {
    background: linear-gradient(135deg, var(--success), var(--success-light));
    color: white;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

.tag-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Topics Table */
.topics-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.topic-row {
    cursor: pointer;
    transition: var(--transition);
}

.topic-main {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.topic-main:hover {
    transform: scale(1.01);
    background: var(--bg-tertiary);
}

.topic-main td {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.topic-main td:first-child {
    border-left: 1px solid var(--border-color);
    border-radius: 14px 0 0 14px;
}

.topic-main td:last-child {
    border-right: 1px solid var(--border-color);
    border-radius: 0 14px 14px 0;
}

.expand-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.subtopics {
    display: none;
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 14px;
    margin-top: 0.5rem;
}

.subtopics.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtopic-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

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

.weight-bar {
    height: 10px;
    border-radius: 6px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideIn 0.6s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.weight-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

.weight-bar:hover {
    transform: scaleY(1.3);
    box-shadow: 0 4px 12px currentColor;
}

@keyframes slideIn {
    from { width: 0; opacity: 0; }
    to { opacity: 1; }
}

.weight-0 { width: 20%; background: linear-gradient(90deg, #8E8E93, #AEAEB2); }
.weight-1 { width: 40%; background: linear-gradient(90deg, var(--warning), var(--warning-light)); box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3); }
.weight-2 { width: 70%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3); }
.weight-3 { width: 100%; background: linear-gradient(90deg, var(--success), var(--success-light)); box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3); }

.weight-indicator {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 0.25rem;
}

.weight-indicator.weight-0 {
    background: #8E8E93;
    color: white;
}

.weight-indicator.weight-1 {
    background: var(--warning);
    color: white;
}

.weight-indicator.weight-2 {
    background: var(--primary);
    color: white;
}

.weight-indicator.weight-3 {
    background: var(--success);
    color: white;
}

/* Glossary Bubbles */
.glossar-container {
    display: grid;
    gap: 1.5rem;
}

.topic-selector {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    min-height: 50px;
}

.topic-selector:hover, .topic-selector:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    outline: none;
}

.bubbles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
}

.bubble {
    padding: 0.875rem 1.5rem;
    border-radius: 24px;
    border: 2px solid;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    box-shadow: var(--shadow);
    min-height: 48px;
    display: flex;
    align-items: center;
}

.bubble:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-hover);
}

.bubble:active {
    transform: scale(0.95);
}

.bubble.unknown {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1), rgba(255, 59, 48, 0.15));
    border-color: var(--danger);
    color: var(--danger);
}

.bubble.partial {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.1), rgba(255, 204, 0, 0.15));
    border-color: var(--warning);
    color: var(--warning);
}

.bubble.known {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1), rgba(48, 209, 88, 0.15));
    border-color: var(--success);
    color: var(--success);
}

.bubble-example {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 0.25rem;
}

/* Lernzettel */
.notes-list {
    display: grid;
    gap: 1rem;
}

.note-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: var(--card-bg);
    border-radius: 14px;
    border-left: 4px solid;
    transition: var(--transition);
}

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

.note-item.note-todo {
    border-left-color: var(--danger);
}

.note-item.note-learning {
    border-left-color: var(--warning);
}

.note-item.note-completed {
    border-left-color: var(--success);
}

.note-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.note-title {
    font-weight: 500;
}

.note-status {
    padding: 0.375rem 0.875rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.note-status.status-todo {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger);
}

.note-status.status-learning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning);
}

.note-status.status-completed {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success);
}

.note-actions {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.875rem 1.75rem;
    border-radius: 14px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.4);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success), var(--success-light));
    color: white;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

.btn-success:hover {
    box-shadow: 0 8px 20px rgba(52, 199, 89, 0.4);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 8px 20px rgba(255, 59, 48, 0.4);
    transform: translateY(-2px);
}

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

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

.btn-icon {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon-primary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-icon-primary:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.btn-icon-danger {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-icon-danger:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.1);
}

/* Status Circle (replaces Checkbox) */
.status-circle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    border: 3px solid var(--danger);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: transparent;
    flex-shrink: 0;
}

.status-circle:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

.status-circle.completed {
    background: linear-gradient(135deg, var(--success), var(--success-light));
    border-color: var(--success);
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.4);
}

.status-circle.completed::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 18px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.status-circle.completed:hover {
    box-shadow: 0 6px 16px rgba(52, 199, 89, 0.5);
}

/* Subtopic Title - Strikethrough when completed */
.subtopic-title {
    transition: var(--transition);
}

.subtopic-title.completed {
    text-decoration: line-through;
    opacity: 0.6;
    color: var(--success);
}

/* Questions */
.question-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.question-closed {
    opacity: 0.8;
    border-left: 4px solid var(--success);
}

.question-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.animal-icon {
    font-size: 1.75rem;
}

.question-text {
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 1.05rem;
}

.answer {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 12px;
    margin: 0.75rem 0;
    border-left: 3px solid var(--primary);
}

.question-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

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

    .stat-value {
        font-size: 2rem;
    }

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

    .question-actions .btn {
        width: 100%;
    }

    .note-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .note-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .page-info {
        font-size: 0.875rem;
    }
    
    .bubbles-grid {
        gap: 0.75rem;
    }
    
    .bubble {
        font-size: 0.875rem;
        padding: 0.75rem 1.25rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
}

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

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

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

/* Iframe */
iframe {
    width: 100%;
    height: calc(100vh - 180px);
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Touch optimization */
@media (hover: none) and (pointer: coarse) {
    .btn, .checkbox, .bubble, .nav-item, .weight-bar {
        min-height: 44px;
        min-width: 44px;
    }
    
    .subtopic-item {
        padding: 1.25rem;
    }
    
    .question-card {
        padding: 1.75rem;
    }
}

/* Countdown Cards */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.countdown-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.countdown-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.countdown-card-warning::before {
    background: linear-gradient(90deg, var(--warning), var(--warning-light));
}

.countdown-card-danger::before {
    background: linear-gradient(90deg, var(--danger), var(--danger-light));
}

.countdown-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.countdown-icon {
    font-size: 2.5rem;
}

.countdown-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.countdown-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.countdown-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.countdown-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    min-width: 70px;
}

.countdown-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.countdown-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.countdown-separator {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.countdown-finished {
    text-align: center;
    padding: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--success), var(--success-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Downloads List */
.downloads-list {
    display: grid;
    gap: 1rem;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 14px;
    transition: var(--transition);
}

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

.download-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.download-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 12px;
    flex-shrink: 0;
}

.download-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.download-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.btn-download {
    white-space: nowrap;
}

/* Form Elements */
.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-secondary);
}

.form-input:disabled,
.form-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 14px;
    box-shadow: var(--shadow-hover);
    border-left: 4px solid;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-info {
    border-left-color: var(--info);
}

.toast-icon {
    font-size: 1.25rem;
    font-weight: bold;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info .toast-icon {
    color: var(--info);
}

.toast-message {
    flex: 1;
    font-weight: 500;
}

@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .countdown-display {
        gap: 0.25rem;
    }
    
    .countdown-item {
        min-width: 60px;
        padding: 0.5rem;
    }
    
    .countdown-number {
        font-size: 1.5rem;
    }
    
    .countdown-separator {
        font-size: 1.5rem;
    }
    
    .download-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-download {
        width: 100%;
    }
}