/* ==========================================================================
   HabitTrophy Design System & Stylesheet
   Theme: Futuristic Dark Neon & Neo-Glassmorphism
   ========================================================================== */

/* 1. Global Variables & Themes */
:root {
    /* Color Palette */
    --bg-darker: #08090d;
    --bg-dark: #0f111a;
    --bg-light: #161926;
    
    /* Neon Aura Colors */
    --neon-blue: #00f2fe;
    --neon-blue-glow: rgba(0, 242, 254, 0.3);
    --neon-purple: #9d4edd;
    --neon-purple-glow: rgba(157, 78, 221, 0.35);
    --neon-pink: #ff007f;
    --neon-pink-glow: rgba(255, 0, 127, 0.3);
    --neon-emerald: #05fa95;
    --neon-emerald-glow: rgba(5, 250, 149, 0.3);
    --neon-orange: #ff7b00;
    --neon-orange-glow: rgba(255, 123, 0, 0.3);
    
    /* Trophy Specific Colors */
    --trophy-gold: #ffd700;
    --trophy-gold-glow: rgba(255, 215, 0, 0.4);
    --trophy-silver: #e0e0e0;
    --trophy-silver-glow: rgba(224, 224, 224, 0.3);
    --trophy-bronze: #cd7f32;
    --trophy-bronze-glow: rgba(205, 127, 50, 0.35);
    
    /* Functional Colors */
    --text-primary: #f8f9fa;
    --text-muted: #8b9bb4;
    --text-dark: #0b0c10;
    --white-05: rgba(255, 255, 255, 0.05);
    --white-08: rgba(255, 255, 255, 0.08);
    --white-15: rgba(255, 255, 255, 0.15);
    --white-25: rgba(255, 255, 255, 0.25);
    
    /* Layout Tokens */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 2. Reset & Core Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(8, 9, 13, 0.5);
}
::-webkit-scrollbar-thumb {
    background: var(--white-15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--white-25);
}

/* Header typography */
h1, h2, h3, h4, .logo-emoji, .trophy-grade-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* 3. Aurora Background Lights (Animated) */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    filter: blur(100px);
}

.aurora {
    position: absolute;
    border-radius: 50%;
    opacity: 0.2;
    mix-blend-mode: screen;
    animation: rotateAurora 25s infinite alternate ease-in-out;
}

.aurora-1 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--neon-purple) 0%, transparent 70%);
    top: -10%;
    left: -10%;
}

.aurora-2 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--neon-blue) 0%, transparent 70%);
    bottom: -15%;
    right: -10%;
    animation-delay: -5s;
    animation-duration: 30s;
}

.aurora-3 {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--neon-pink) 0%, transparent 70%);
    top: 30%;
    left: 40%;
    animation-delay: -10s;
    animation-duration: 20s;
}

@keyframes rotateAurora {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(10%, 8%) rotate(180deg) scale(1.1);
    }
    100% {
        transform: translate(-5%, -5%) rotate(360deg) scale(0.95);
    }
}

/* 4. Glassmorphism Card Panels */
.glass-panel {
    background: rgba(22, 25, 38, 0.45);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--white-08);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: var(--white-15);
}

/* 5. App Layout & Architecture */
.app-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(8, 9, 13, 0.7);
    border-left: 1px solid var(--white-05);
    border-right: 1px solid var(--white-05);
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

@media (min-width: 481px) {
    .app-container {
        height: 850px;
        border-radius: var(--border-radius-xl);
        border: 1px solid var(--white-08);
    }
}

/* App Header */
.app-header {
    height: 70px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--white-05);
    background: rgba(8, 9, 13, 0.4);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo h1 {
    font-size: 20px;
    background: linear-gradient(135deg, #fff 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-emoji {
    font-size: 22px;
}

/* Icon Buttons */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white-05);
    border: 1px solid var(--white-08);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.icon-btn:hover {
    background: var(--white-15);
    transform: scale(1.05);
}

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

/* Main Content Area */
.app-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px 100px 20px; /* space for absolute floating buttons & bottom nav */
    position: relative;
}

/* App Screen Views */
.app-screen {
    display: none;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.app-screen.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}

.screen-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.challenge-count, .trophy-count {
    font-size: 14px;
    color: var(--text-muted);
    background: var(--white-08);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* 6. Dashboard (Challenge List) UI */
.challenges-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 250px;
}

/* Challenge Cards */
.challenge-card {
    padding: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: rgba(22, 25, 38, 0.5);
}

.challenge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--theme-color, var(--neon-blue));
    box-shadow: 2px 0 10px var(--theme-color-glow, var(--neon-blue-glow));
}

.challenge-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.challenge-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.challenge-card-resolution {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.challenge-card-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
}

/* Custom Checklist UI for Cards */
.card-checklist-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
}

.achievement-rate {
    font-size: 13px;
    color: var(--theme-color, var(--neon-blue));
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-color, var(--neon-blue)), rgba(255,255,255,0.8));
    width: 0%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 8px var(--theme-color-glow, var(--neon-blue-glow));
}

.card-check-today-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--white-15);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-bounce);
}

.card-check-today-btn.checked {
    background: var(--theme-color, var(--neon-emerald));
    border-color: var(--theme-color, var(--neon-emerald));
    color: var(--text-dark);
    box-shadow: 0 0 15px var(--theme-color-glow, var(--neon-emerald-glow));
}

.card-check-today-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.card-check-today-btn.checked:hover {
    background: var(--theme-color, var(--neon-emerald));
    transform: scale(1.05);
}

/* 7. Challenge Detail Screen UI */
.detail-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.icon-btn-back {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.icon-btn-back:hover {
    color: var(--text-primary);
    transform: translateX(-3px);
}

.btn-delete-challenge {
    background: rgba(255, 0, 127, 0.1);
    border: 1px solid rgba(255, 0, 127, 0.2);
    color: var(--neon-pink);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-smooth);
}

.btn-delete-challenge:hover {
    background: rgba(255, 0, 127, 0.25);
    transform: scale(1.02);
}

.challenge-detail-card {
    padding: 24px;
    border-top: 4px solid var(--theme-color, var(--neon-blue));
}

.detail-days-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.detail-days-row span strong {
    color: var(--text-primary);
    font-size: 18px;
}

/* 30-Day Grid System */
.grid-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.grid-section-header h3 {
    font-size: 16px;
}

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

.days-grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    background: rgba(8, 9, 13, 0.5);
    border: 1px solid var(--white-05);
    padding: 16px;
    border-radius: var(--border-radius-lg);
}

/* Trophy Modal Compact Grid View */
.days-grid-container.trophy-grid-view {
    gap: 6px;
    padding: 12px;
    border-radius: var(--border-radius-md);
    background: rgba(0, 0, 0, 0.15);
}

.trophy-grid-view .day-cell {
    font-size: 11px;
    border-radius: 8px;
}

.day-cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--white-08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    position: relative;
    cursor: not-allowed;
    transition: var(--transition-bounce);
    user-select: none;
}

/* Past Day - Unchecked (Missed) */
.day-cell.missed {
    background: rgba(255, 0, 127, 0.03);
    border-color: rgba(255, 0, 127, 0.15);
    color: rgba(255, 0, 127, 0.5);
    cursor: pointer;
}

.day-cell.missed:hover {
    transform: scale(1.08);
    background: rgba(255, 0, 127, 0.08);
    border-color: rgba(255, 0, 127, 0.4);
}

.day-cell.missed::after {
    content: '×';
    font-size: 12px;
    position: absolute;
    bottom: 2px;
}

/* Past/Current Day - Checked (Completed) */
.day-cell.completed {
    background: var(--theme-color, var(--neon-emerald));
    border-color: var(--theme-color, var(--neon-emerald));
    color: var(--text-dark);
    box-shadow: 0 0 12px var(--theme-color-glow, var(--neon-emerald-glow));
    cursor: pointer;
}

.day-cell.completed:hover {
    transform: scale(1.08);
    filter: brightness(1.1);
    box-shadow: 0 0 16px var(--theme-color-glow, var(--neon-emerald-glow));
}

.day-cell.completed::after {
    content: '✓';
    font-size: 10px;
    position: absolute;
    bottom: 2px;
    font-weight: 800;
}

/* Selected Day Highlight */
.day-cell.selected {
    border: 2px solid #fff !important;
    box-shadow: 0 0 15px var(--theme-color-glow, var(--neon-blue-glow)), 0 0 0 1px #fff;
    transform: scale(1.08);
    z-index: 2;
}

/* Current Day - Checkable (Today) */
.day-cell.today {
    background: rgba(255, 255, 255, 0.06);
    border: 2px dashed var(--theme-color, var(--neon-blue));
    color: var(--theme-color, var(--neon-blue));
    cursor: pointer;
    animation: pulseBorder 2s infinite ease-in-out;
}

.day-cell.today:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

@keyframes pulseBorder {
    0% {
        box-shadow: 0 0 0 0 var(--theme-color-glow, var(--neon-blue-glow));
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 10px 2px var(--theme-color-glow, var(--neon-blue-glow));
        transform: scale(1.03);
    }
    100% {
        box-shadow: 0 0 0 0 var(--theme-color-glow, var(--neon-blue-glow));
        transform: scale(1);
    }
}

/* Future Day - Locked */
.day-cell.locked {
    opacity: 0.4;
    color: var(--text-muted);
}

.day-cell.locked::after {
    content: '🔒';
    font-size: 8px;
    position: absolute;
    bottom: 2px;
    opacity: 0.5;
}

/* 8. Daily Memo Sheet / History Timeline */
.memo-logs-section {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.memo-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.memo-input-container textarea {
    width: 100%;
    height: 70px;
    background: rgba(8, 9, 13, 0.5);
    border: 1px solid var(--white-15);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    resize: none;
    outline: none;
    transition: var(--transition-smooth);
}

.memo-input-container textarea:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue-glow);
}

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

.char-counter {
    font-size: 11px;
    color: var(--text-muted);
}

/* Timeline history */
.memo-history-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
    border-left: 1px dashed var(--white-15);
    padding-left: 14px;
    margin-left: 6px;
    position: relative;
}

.memo-timeline-item {
    position: relative;
    font-size: 13px;
    line-height: 1.4;
}

.memo-timeline-item::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--theme-color, var(--neon-blue));
    box-shadow: 0 0 6px var(--theme-color-glow, var(--neon-blue-glow));
}

.memo-time-badge {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.memo-text-content {
    margin-top: 2px;
    color: var(--text-primary);
}

/* 9. Trophy Room UI (3D-Style Gallery) */
.trophy-room-shelf {
    position: relative;
}

.trophy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 10px 5px 20px 5px;
    min-height: 300px;
}

/* 3D Rotating Trophy Card */
.trophy-card {
    height: 170px;
    background: rgba(22, 25, 38, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--white-08);
    border-radius: var(--border-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    cursor: pointer;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: var(--transition-bounce);
}

.trophy-card::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 60%;
    height: 4px;
    border-radius: 50%;
    background: var(--grade-color-glow, var(--trophy-gold-glow));
    filter: blur(4px);
    opacity: 0.8;
}

/* Hover rotation effects */
.trophy-card:hover {
    transform: translateY(-8px) rotateY(15deg);
    border-color: var(--grade-color, var(--trophy-gold));
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--grade-color-glow, var(--trophy-gold-glow));
}

.trophy-model-glow {
    font-size: 45px;
    margin-bottom: 10px;
    transform: translateZ(25px);
    transition: var(--transition-bounce);
    filter: drop-shadow(0 0 8px var(--grade-color-glow, var(--trophy-gold-glow)));
}

.trophy-card:hover .trophy-model-glow {
    transform: translateZ(40px) scale(1.1);
    filter: drop-shadow(0 0 15px var(--grade-color, var(--trophy-gold)));
}

.trophy-card-title {
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.trophy-card-grade {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--grade-color, var(--trophy-gold));
    margin-top: 4px;
}

/* Gold/Silver/Bronze Color Modifiers */
.gold-grade {
    --grade-color: var(--trophy-gold);
    --grade-color-glow: var(--trophy-gold-glow);
}
.silver-grade {
    --grade-color: var(--trophy-silver);
    --grade-color-glow: var(--trophy-silver-glow);
}
.bronze-grade {
    --grade-color: var(--trophy-bronze);
    --grade-color-glow: var(--trophy-bronze-glow);
}

/* 10. Bottom Navigation Bar Style */
.app-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(8, 9, 13, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--white-08);
    padding: 0 10px 10px 10px; /* offset padding for safe area on phone */
    z-index: 10;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    width: 80px;
    height: 100%;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item.active {
    color: var(--text-primary);
}

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

/* Floating FAB for Navigation */
.nav-fab {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-05);
    box-shadow: 0 5px 15px rgba(0, 242, 254, 0.4);
    transform: translateY(-12px);
    transition: var(--transition-bounce);
}

.nav-fab i {
    color: var(--bg-darker);
    width: 24px;
    height: 24px;
}

.nav-fab:hover {
    transform: translateY(-16px) scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.6), 0 0 10px var(--neon-purple-glow);
}

.nav-fab:active {
    transform: translateY(-10px) scale(0.95);
}

/* 11. Modal Overlay & Anim Content */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Mobile Bottom Sheet Style default */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    background: rgba(22, 25, 38, 0.9);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    border-bottom: none;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

@media (min-width: 481px) {
    .modal-overlay {
        align-items: center; /* Centered modal on desktop */
    }
    .modal-content {
        border-radius: var(--border-radius-lg);
        border: 1px solid var(--white-15);
        transform: scale(0.85);
        transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .modal-overlay.active .modal-content {
        transform: scale(1);
    }
}

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

.modal-header h3 {
    font-size: 20px;
}

.icon-btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

/* Forms UI inside Modal */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.inline-group {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

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

.form-help {
    font-size: 11px;
    color: var(--text-muted);
    max-width: 80%;
}

.form-group input[type="text"], 
.form-group input[type="time"] {
    background: rgba(8, 9, 13, 0.6);
    border: 1px solid var(--white-15);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input[type="text"]:focus,
.form-group input[type="time"]:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue-glow);
}

.color-picker-palette {
    display: flex;
    gap: 12px;
    padding: 4px 0;
}

.color-option {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid transparent;
    transition: var(--transition-bounce);
}

.color-option input[type="radio"]:checked + .color-swatch {
    transform: scale(1.15);
    border-color: #fff;
    box-shadow: 0 0 12px var(--theme-color-glow, var(--white-25));
}

/* Modifiers for Radio Swatch glows */
.color-blue .color-swatch { --theme-color-glow: var(--neon-blue-glow); }
.color-purple .color-swatch { --theme-color-glow: var(--neon-purple-glow); }
.color-pink .color-swatch { --theme-color-glow: var(--neon-pink-glow); }
.color-emerald .color-swatch { --theme-color-glow: var(--neon-emerald-glow); }
.color-orange .color-swatch { --theme-color-glow: var(--neon-orange-glow); }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}

/* Interactive Buttons */
.btn {
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    transition: var(--transition-bounce);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-blue) 0%, #00d2ff 100%);
    color: var(--bg-darker);
    box-shadow: 0 4px 15px var(--neon-blue-glow);
}

.btn-primary:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: var(--white-08);
    color: var(--text-primary);
    border: 1px solid var(--white-08);
}

.btn-secondary:hover {
    background: var(--white-15);
}

.btn-accent {
    background: linear-gradient(135deg, var(--neon-emerald) 0%, #05d97f 100%);
    color: var(--bg-darker);
    box-shadow: 0 4px 15px var(--neon-emerald-glow);
}

.btn-accent:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(5, 250, 149, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--neon-pink) 0%, #ff3399 100%);
    color: var(--text-primary);
    box-shadow: 0 4px 15px var(--neon-pink-glow);
}

.btn-danger:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 0, 127, 0.5);
}

.btn-danger:active {
    transform: scale(0.97);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--white-25);
}

.btn-outline:hover {
    background: var(--white-08);
    border-color: var(--white-25);
}

/* Trophy Modal Details */
.trophy-modal {
    background: rgba(8, 9, 13, 0.95);
    border-top: 4px solid var(--grade-color, var(--trophy-gold));
}

.trophy-detail-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    max-height: 380px;
    overflow-y: auto;
}

.trophy-glow-large {
    font-size: 70px;
    filter: drop-shadow(0 0 15px var(--grade-color-glow, var(--trophy-gold-glow)));
    animation: floatingTrophy 4s infinite ease-in-out;
}

@keyframes floatingTrophy {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.trophy-grade-label {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--grade-color, var(--trophy-gold));
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid var(--grade-color-glow, var(--trophy-gold-glow));
    text-transform: uppercase;
}

.trophy-detail-memos {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--white-08);
    border-radius: var(--border-radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trophy-detail-memos h4 {
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--white-08);
    padding-bottom: 6px;
}

/* Timeline in Trophy Details */
.trophy-memo-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.trophy-memo-item {
    font-size: 12px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
}

/* 12. Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    gap: 12px;
    width: 100%;
}

.empty-icon {
    font-size: 40px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 80%;
    margin-bottom: 8px;
}

/* 13. Fast-Forward Tester Block */
.fast-forward-tester {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: rgba(15, 17, 26, 0.9);
    border: 1px dashed var(--neon-pink);
    border-radius: var(--border-radius-md);
    padding: 10px;
    display: none; /* hidden on production, active conditionally */
    flex-direction: column;
    gap: 6px;
    z-index: 99;
    box-shadow: 0 5px 15px rgba(255, 0, 127, 0.2);
}

.fast-forward-tester.active {
    display: flex;
}

.tester-label {
    font-size: 10px;
    color: var(--neon-pink);
    font-weight: 700;
    text-align: center;
}

/* 14. Keyframes & Animation Utils */
@keyframes scaleUp {
    from {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.animated-scale-up {
    animation: scaleUp 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Particles/Fireworks Canvas integration */
.confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}
