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

:root {
    /* Light Blue Theme */
    --primary-color: #0ea5e9;
    --primary-light: #38bdf8;
    --primary-dark: #0284c7;
    --secondary-color: #06b6d4;
    --bg-light: #f0f9ff;
    --bg-light-2: #ffffff;
    --bg-dark: #0f172a;
    --bg-dark-2: #1e293b;
    --text-light: #164e63;
    --text-dark: #f0f9ff;
    --border-light: #bae6fd;
    --border-dark: #475569;
}

html[data-theme="light"] {
    --bg-primary: var(--bg-light);
    --bg-secondary: var(--bg-light-2);
    --text-primary: var(--text-light);
    --border-primary: var(--border-light);
    --accent-color: var(--primary-color);
}

html[data-theme="dark"] {
    --bg-primary: var(--bg-dark);
    --bg-secondary: var(--bg-dark-2);
    --text-primary: var(--text-dark);
    --border-primary: var(--border-dark);
    --accent-color: var(--primary-light);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                                rgba(14, 165, 233, 0.1) 0%, 
                                transparent 50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

/* ===== AUTH SCREEN ===== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    padding: 20px;
}

.auth-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

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

@keyframes toggleSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes sunBurst {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7),
                    0 0 0 0 rgba(251, 191, 36, 0.5),
                    0 0 0 0 rgba(251, 191, 36, 0.3);
    }
    100% {
        box-shadow: 0 0 0 8px rgba(251, 191, 36, 0),
                    0 0 0 16px rgba(251, 191, 36, 0),
                    0 0 0 24px rgba(251, 191, 36, 0);
    }
}

@keyframes moonGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.7),
                    0 0 0 0 rgba(96, 165, 250, 0.5),
                    0 0 0 0 rgba(96, 165, 250, 0.3);
    }
    100% {
        box-shadow: 0 0 0 8px rgba(96, 165, 250, 0),
                    0 0 0 16px rgba(96, 165, 250, 0),
                    0 0 0 24px rgba(96, 165, 250, 0);
    }
}

@keyframes thumbPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes trackFlash {
    0% { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 15px rgba(14, 165, 233, 0.4); }
    100% { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1); }
}

@keyframes toggleGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(14, 165, 233, 0); }
}

.auth-title {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* ===== FORMS ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

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

.form-group input {
    padding: 12px 15px;
    border: 2px solid var(--border-primary);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* ===== BUTTONS ===== */
.liquid-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    transition: all 0.3s ease;
    width: 100%;
}

.liquid-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.4);
}

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

/* ===== ERROR MESSAGE ===== */
.error-msg {
    color: #ef4444;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 20px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ===== TOGGLE FORM ===== */
.toggle-form {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.toggle-form a {
    color: var(--accent-color);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.toggle-form a:hover {
    color: var(--secondary-color);
}

/* ===== DB INFO ===== */
.db-info {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-primary);
}

/* ===== THEME TOGGLE (ENHANCED PREMIUM VERSION) ===== */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    position: relative;
    width: 65px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    border-radius: 50px;
    background: rgba(14, 165, 233, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.08);
    background: rgba(14, 165, 233, 0.15);
    animation: toggleGlow 1.5s ease-in-out infinite;
}

.theme-toggle:active {
    transform: scale(0.92);
}

.toggle-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #bfdbfe 0%, #e0f2fe 100%);
    border-radius: 30px;
    display: flex;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(14, 165, 233, 0.2);
    padding: 3px;
    border: 2px solid rgba(14, 165, 233, 0.3);
    position: relative;
    overflow: hidden;
}

.toggle-track::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.theme-toggle:active .toggle-track::before {
    animation: trackFlash 0.6s ease;
}

html[data-theme="dark"] .toggle-track {
    background: linear-gradient(135deg, #1e3a8a 0%, #0c4a6e 100%);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(96, 165, 250, 0.3);
}

.toggle-icon {
    font-size: 18px;
    flex: 1;
    text-align: center;
    transition: all 0.4s ease;
    opacity: 0.7;
}

.toggle-icon.sun {
    color: #f59e0b;
    animation: sunBurst 0.6s ease-out 1;
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
}

.toggle-icon.moon {
    color: #60a5fa;
    animation: moonGlow 0.6s ease-out 1;
    filter: drop-shadow(0 2px 4px rgba(96, 165, 250, 0.3));
}

.theme-toggle:active .toggle-icon {
    animation: toggleSpin 0.6s ease;
}

.toggle-thumb {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    position: absolute;
    left: 2px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    animation: thumbPulse 0.6s ease-out 1;
}

html[data-theme="dark"] .toggle-thumb {
    left: 32px;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    animation: thumbPulse 0.6s ease-out 1;
}

/* ===== APP CONTAINER ===== */
.app-container {
    display: none;
    min-height: 100vh;
    background: var(--bg-primary);
}

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

.app-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    color: white;
    animation: slideDown 0.5s ease;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle.inline {
    width: 55px;
    height: 30px;
}

/* Header mini dashboard */
.header-controls{
    display:flex;
    align-items:center;
    gap:12px;
}

.dashboard-mini{
    display:flex;
    align-items:center;
    gap:8px;
}

.mini-week{
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 10px;
    border-radius:12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.04);
    cursor:pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mini-week:hover{ transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.12);} 

.mini-bars{ display:flex; gap:3px; align-items:end; height:28px; }
.mini-bars .mini-bar{ width:6px; background:#d1fae5; border-radius:3px; transition:height 0.25s ease; }
.mini-label{ font-size:0.75rem; opacity:0.8; color:var(--text-primary); }

.header-history{ padding:6px 12px; border-radius:12px; background: linear-gradient(135deg,#22c55e,#16a34a); color:#fff; border:none; font-weight:600; box-shadow:0 6px 14px rgba(34,197,94,0.2); transition:transform .2s ease;}
.header-history:hover{ transform: translateY(-3px);}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 600;
}

.user-id {
    font-size: 0.8rem;
    opacity: 0.9;
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ===== STATS BAR ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(6, 182, 212, 0.1));
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ===== CONTRIBUTION GRAPH ===== */
.graph-section {
    margin-bottom: 40px;
}

.graph-title {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.contribution-graph {
    display: grid;
    grid-template-columns: repeat(53, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.graph-box {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.graph-box:hover {
    transform: scale(1.3);
}

.graph-box.level-0 { background: rgba(34, 197, 94, 0.06); }
.graph-box.level-1 { background: rgba(34, 197, 94, 0.25); }
.graph-box.level-2 { background: rgba(34, 197, 94, 0.45); }
.graph-box.level-3 { background: rgba(34, 197, 94, 0.65); }
.graph-box.level-4 { background: #16a34a; }

.legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-item {
    display: inline-block;
}

.legend-box {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

/* ===== WEEKLY STATS ===== */
.weekly-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 40px;
    border: 1px solid var(--border-primary);
}

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

.weekly-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.history-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.history-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

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

.weekly-stats-container {
    display: flex;
    gap: 12px;
    justify-content: space-around;
    padding: 20px 0;
}

.weekly-stats {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: space-around;
}

.weekly-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bar-fill {
    width: 28px;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    background: #22c55e;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
    min-height: 4px;
}

.bar-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.bar-count {
    font-size: 0.9rem;
    font-weight: bold;
    color: #22c55e;
    min-width: 24px;
    text-align: center;
}

/* ===== HISTORY MODAL ===== */
.history-popup {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 0;
    width: 92%;
    max-width: 720px;
    max-height: 78vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.35);
    border: 1px solid var(--border-primary);
    overflow: hidden;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-primary);
    gap: 8px;
}

.history-header h2 {
    margin: 0;
    font-size: 1.15rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.12s ease;
}

.close-btn:hover { opacity: 1; transform: scale(1.05); }

.history-content {
    overflow-y: auto;
    padding: 12px;
    flex: 1;
    background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
}

.history-body { padding: 8px 0; display:flex; flex-direction:column; gap:12px; }

.history-summary { display:flex; gap:12px; align-items:center; }
.history-summary .card { background: #f6ffef; border:1px solid rgba(34,197,94,0.12); padding:10px 14px; border-radius:10px; min-width:110px; text-align:center; }
.history-summary .card.incomplete { background: #fff6f6; border:1px solid rgba(239,68,68,0.08); }
.history-summary .card b { display:block; font-size:1.05rem; color:#0f5132; }
.history-summary .card.incomplete b { color:#7f1d1d; }

.history-graph { display:flex; gap:12px; align-items:end; height:160px; padding:8px 0; }

.history-list { display:flex; flex-direction:column; gap:8px; }
.history-item { padding:10px 12px; background: var(--bg-secondary); border-radius:8px; display:flex; justify-content:space-between; align-items:center; gap:12px; border:1px solid var(--border-primary); }
.history-item .left { display:flex; gap:12px; align-items:center; }
.history-item .meta { font-size:0.85rem; opacity:0.75; }

.history-task { font-size:0.95rem; font-weight:600; }
.history-section { font-size:0.85rem; opacity:0.6; }

.no-history { padding: 30px; text-align:center; opacity:0.7; }

/* date picker */
#historyDatePicker { padding:8px 10px; border-radius:8px; border:1px solid var(--border-primary); }
#historyDateBtn { padding:8px 10px; border-radius:8px; border:none; background:#22c55e; color:#fff; cursor:pointer; }
#historyDateBtn:hover{ opacity:0.95; transform:translateY(-2px);}

/* ===== SECTIONS CONTAINER ===== */
.sections-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.section-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    animation: zoomIn 0.5s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
    border-color: var(--accent-color);
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    font-size: 1.8rem;
}

.section-title h3 {
    font-size: 1.2rem;
    margin: 0;
}

.section-delete {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.section-delete:hover {
    transform: scale(1.2);
}

/* ===== SECTION BODY ===== */
.section-body form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.add-task-form {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border-primary);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.add-task-form:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.add-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
}

/* ===== TASKS LIST ===== */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(14, 165, 233, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.task-item:hover {
    background: rgba(14, 165, 233, 0.1);
}

.task-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0ea5e9;
}

.task-item.completed span {
    text-decoration: line-through;
    color: #999;
}

.task-delete {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin-left: auto;
}

.task-delete:hover {
    transform: scale(1.2);
}

/* ===== ADD SECTION BUTTON ===== */
.add-section-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.add-section-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(14, 165, 233, 0.3);
}

/* ===== MODALS WITH BLUR ===== */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.custom-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-popup,
.alert-popup {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 1001;
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(14, 165, 233, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

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

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

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content {
    margin-bottom: 20px;
}

/* ===== ICON PICKER ===== */
.icon-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.icon-option {
    padding: 10px;
    border: 2px solid var(--border-primary);
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    min-height: 50px;
}

.icon-option:hover {
    border-color: var(--accent-color);
    transform: scale(1.1);
}

.icon-option.selected {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border-color: var(--accent-color);
}

/* ===== MODAL ACTIONS ===== */
.modal-actions,
.alert-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn,
.alert-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-btn-primary,
.alert-btn:not(.alert-btn-cancel) {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border-color: var(--accent-color);
}

.modal-btn:hover,
.alert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
}

/* ===== ALERT POPUP ===== */
.alert-content {
    margin-bottom: 20px;
}

.alert-content p {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    border-top: 1px solid var(--border-primary);
    margin-top: 60px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }

    header {
        flex-direction: column;
        gap: 15px;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .sections-container {
        grid-template-columns: 1fr;
    }

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

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

    .contribution-graph {
        grid-template-columns: repeat(26, 1fr);
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 20px;
    }

    .modal-popup,
    .alert-popup {
        width: 95%;
        padding: 20px;
    }

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

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

    header {
        padding: 15px;
    }

    .user-info {
        gap: 8px;
    }

    .logout-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}
