/* Dopamin-Challenge - Moderne CSS Styles */

/* CSS Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Colors */
    --primary-color: #A8D0DB;
    --primary-dark: #2B4570;
    --primary-light: #6366f1;
    --success-color: #10b981;
    --success-light: #34d399;
    --danger-color: #ef4444;
    --danger-light: #f87171;
    --warning-color: #f59e0b;
    --warning-light: #fbbf24;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Calendar Colors */
    --calendar-surface: var(--white);
    --calendar-border: var(--gray-200);
    --calendar-header-bg: var(--primary-color);
    --calendar-header-text: #ffffff;
    --calendar-weekday-text: var(--gray-600);
    --calendar-cell-default-bg: var(--gray-100);
    --calendar-cell-default-text: var(--gray-500);
    --calendar-cell-future-bg: var(--white);
    --calendar-cell-future-text: var(--gray-700);
    --calendar-state-success-bg: var(--success-color);
    --calendar-state-success-text: #ffffff;
    --calendar-state-partial-bg: var(--warning-light);
    --calendar-state-partial-text: #1f2937;
    --calendar-state-missed-bg: var(--danger-color);
    --calendar-state-missed-text: #ffffff;
    --calendar-state-today-bg: var(--primary-color);
    --calendar-state-today-text: #ffffff;
    --calendar-empty-text: var(--gray-500);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Courier New', monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* Dark Mode */
[data-theme="dark"] {
    --white: #111827;
    --gray-50: #1f2937;
    --gray-100: #374151;
    --gray-200: #4b5563;
    --gray-300: #6b7280;
    --gray-400: #9ca3af;
    --gray-500: #d1d5db;
    --gray-600: #e5e7eb;
    --gray-700: #f3f4f6;
    --gray-800: #f9fafb;
    --gray-900: #ffffff;
    
    /* Calendar Colors */
    --calendar-surface: #0f172a;
    --calendar-border: rgba(148, 163, 184, 0.2);
    --calendar-header-bg: #1e293b;
    --calendar-header-text: var(--gray-100);
    --calendar-weekday-text: var(--gray-400);
    --calendar-cell-default-bg: rgba(148, 163, 184, 0.12);
    --calendar-cell-default-text: var(--gray-400);
    --calendar-cell-future-bg: rgba(148, 163, 184, 0.05);
    --calendar-cell-future-text: var(--gray-300);
    --calendar-state-success-bg: #10b981;
    --calendar-state-success-text: #052e16;
    --calendar-state-partial-bg: #fbbf24;
    --calendar-state-partial-text: #0f172a;
    --calendar-state-missed-bg: #ef4444;
    --calendar-state-missed-text: #fee2e2;
    --calendar-state-today-bg: #38bdf8;
    --calendar-state-today-text: #032c4c;
    --calendar-empty-text: var(--gray-400);
}

/* Base Styles */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: var(--space-md);
}

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

a:hover {
    color: #fff;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-sm {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-lg {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

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

    
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

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

.justify-between {
    justify-content: space-between;
}

.flex-1 {
    flex: 1;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-sm) 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}

@media (max-width: 640px) {
    [data-user-state="auth"] .logo {
        display: none;
    }
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.nav-link {
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.nav-link:hover {
    background-color: var(--gray-100);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: var(--white);
}

@media (max-width: 640px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-xs);
    }

    .nav {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: var(--space-sm);
        padding-bottom: var(--space-xs);
        -webkit-overflow-scrolling: touch;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.9rem;
        white-space: nowrap;
    }

    #theme-toggle.btn {
        padding: var(--space-xs) var(--space-sm);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    user-select: none;
}

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

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

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

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--gray-300);
}

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

.btn-success:hover:not(:disabled) {
    background-color: #059669;
}

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

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.75rem;
}

.btn-lg {
    padding: var(--space-md) var(--space-2xl);
    font-size: 1rem;
}

/* Forms */
.form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
}

.form-input {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.form-input.error {
    border-color: var(--danger-color);
}

.form-error {
    color: var(--danger-color);
    font-size: 0.875rem;
}

.form-help {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.success-info-box {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.08);
    box-shadow: var(--shadow-sm);
    align-items: flex-start;
}

.success-info-box[hidden] {
    display: none;
}

.success-info-icon {
    font-size: 2rem;
    line-height: 1;
}

.success-info-box h3 {
    margin-bottom: var(--space-sm);
    color: var(--success-color);
}

.success-info-hint {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.warning-info-box {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.12);
    box-shadow: var(--shadow-sm);
}

.warning-info-box[hidden] {
    display: none;
}

.warning-info-box h3 {
    margin-bottom: var(--space-sm);
    color: var(--warning-color);
}

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal);
    margin-left: 4px;
    margin-right: 4px;
}

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

.card-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.card-description {
    color: var(--gray-600);
    margin-top: var(--space-sm);
}

/* Calendar */
.calendar {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.calendar-header {
    background: var(--primary-color);
    color: var(--white);
    padding: var(--space-lg);
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--gray-200);
}

.calendar-day {
    aspect-ratio: 1;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    cursor: default;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    font-weight: 500;
    position: relative;
    border-radius: var(--radius-sm);
}

.calendar-day.success {
    background: var(--success-color);
    color: var(--white);
}

.calendar-day.failed {
    background: var(--danger-color);
    color: var(--white);
}

.calendar-day.current {
    background: var(--primary-color);
    color: var(--white);
}

.calendar-day.future {
    background: var(--gray-100);
    color: var(--gray-400);
    cursor: default;
}

.calendar-day.missed {
    background: var(--gray-300);
    color: var(--gray-500);
}

.calendar-day.disabled {
    opacity: 0.4;
    cursor: default;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 0.9rem;
}

.calendar-day-icon {
    font-size: 0.75rem;
    line-height: 1;
}

.calendar-day.retro-enabled {
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.4);
}

.calendar-day.retro-enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.retro-edit-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: var(--calendar-header-text);
}

.retro-edit-hint .retro-edit-count {
    font-weight: 600;
}

.retro-edit-count {
    color: var(--gray-700);
}

.retro-edit-note {
    font-size: 0.75rem;
    opacity: 0.9;
    color: var(--gray-700);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-100);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-footer {
    padding: var(--space-xl);
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}

/* Retro modal */
.retro-modal {
    max-width: 640px;
    width: min(640px, 95%);
}

.retro-modal-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.retro-modal-info {
    background: var(--gray-50);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.05);
}

.retro-modal-hint {
    margin: 0;
    font-weight: 600;
    color: var(--gray-900);
}

.retro-modal-note {
    margin: 0.35rem 0 0;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.retro-modal-alert {
    border-left: 4px solid var(--danger-color, #dc2626);
    background: rgba(239, 68, 68, 0.12);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    color: var(--danger-color, #dc2626);
    font-weight: 600;
}

.retro-modal-alert[hidden] {
    display: none;
}

.retro-modal-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.retro-goal-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.retro-goal-row {
    background: var(--gray-50);
    border-left: 4px solid var(--primary-color);
    border-radius: 18px;
    padding: var(--space-lg);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    border: 1px solid var(--gray-200);
    position: relative;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.retro-goal-row::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 14px;
    border: 1px dashed transparent;
    pointer-events: none;
    transition: border-color var(--transition-fast);
}

.retro-goal-row-pending::after {
    border-color: rgba(148, 163, 184, 0.2);
}

.retro-goal-row-complete {
    border-left-color: var(--success-color);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25);
}
body > main > div.container > div:nth-child(3) > div:nth-child(2) > div:nth-child(1) > small {
    color: #f3f4f6;
}
.retro-goal-row-complete::after {
    border-color: rgba(16, 185, 129, 0.35);
}

.retro-goal-row-complete .retro-goal-title {
    color: var(--success-color);
}

.retro-goal-row-complete .retro-goal-unit {
    background: rgba(16, 185, 129, 0.18);
    color: var(--success-color);
}

.retro-goal-row-complete .retro-goal-toggle-label {
    color: var(--success-color);
}

.retro-goal-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.retro-goal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.retro-goal-header-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
}

.retro-goal-icon {
    font-size: 1.35rem;
}

.retro-goal-title {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-900);
}

.retro-goal-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary-color);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    white-space: nowrap;
    font-weight: 600;
}

.retro-goal-description {
    margin: 0.35rem 0 0;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.retro-goal-state {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
    color: var(--gray-600);
}

.retro-goal-state.is-complete {
    background: rgba(16, 185, 129, 0.18);
    color: var(--success-color);
}

.retro-goal-target {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-top: 0.25rem;
}

.retro-goal-input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.retro-goal-input-label {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.retro-goal-input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    background: var(--white);
    color: var(--gray-900);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.retro-goal-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.retro-goal-unit {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-900);
    background: var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.75rem;
}

.retro-goal-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.75rem;
}

.retro-goal-toggle input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary-color);
}

.retro-goal-toggle-label {
    font-size: 0.9rem;
}

.retro-goal-empty {
    text-align: center;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    color: var(--gray-600);
    border: 1px dashed var(--gray-200);
}

.retro-form-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    border-top: 1px solid var(--gray-200);
    padding-top: var(--space-lg);
}

@media (max-width: 640px) {
    .retro-modal {
        width: 95%;
    }

    .retro-goal-row {
        padding: var(--space-md);
    }

    .retro-goal-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .retro-goal-input-label {
        width: 100%;
    }

    .retro-form-footer {
        flex-direction: column;
    }

    .retro-form-footer .btn {
        width: 100%;
    }
}

/* Leaderboard */
.leaderboard {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
    transition: background-color var(--transition-fast);
}

.leaderboard-item:hover {
    background: var(--gray-50);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-rank {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 3rem;
    color: var(--primary-color);
}

.leaderboard-rank.first {
    color: #fbbf24;
}

.leaderboard-rank.second {
    color: var(--gray-400);
}

.leaderboard-rank.third {
    color: #cd7c2f;
}

.leaderboard-info {
    flex: 1;
    margin-left: var(--space-lg);
}

.leaderboard-name {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.leaderboard-stats {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.leaderboard-points {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
}

/* Alerts */
.alert {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border: 1px solid;
}

.alert-success {
    background: #ecfdf5;
    border-color: var(--success-color);
    color: #065f46;
}

.alert-error {
    background: #fef2f2;
    border-color: var(--danger-color);
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: var(--warning-color);
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border-color: var(--primary-color);
    color: #1e40af;
}

/* Confetti Animation */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    animation: confetti-fall 3s linear infinite;
    z-index: 1000;
}

.confetti:nth-child(2n) {
    background: var(--success-color);
    animation-delay: -0.5s;
}

.confetti:nth-child(3n) {
    background: var(--warning-color);
    animation-delay: -1s;
}

.confetti:nth-child(4n) {
    background: var(--danger-color);
    animation-delay: -1.5s;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    .header-content {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal {
        margin: var(--space-md);
        width: calc(100% - 2rem);
    }
    
    .calendar-grid {
        font-size: 0.875rem;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.hidden { display: none; }
.visible { display: block; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }
