:root {
    --bg-dark: #0F172A; /* Deep Blue-Black */
    --card-bg: rgba(255, 255, 255, 0.03);
    
    /* Specific Palettes */
    --primary-yellow: #FBBF24;
    --silver: #E5E7EB;
    --silver-dark: #9CA3AF;
    --danger-red: #EF4444;
    --success-green: #10B981;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Outfit', sans-serif; }

body {
    background-color: #0b0f19;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--silver);
}

.mobile-app {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: linear-gradient(180deg, #1E293B 0%, var(--bg-dark) 100%);
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    overflow-x: hidden;
    overflow-y: auto;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo { font-size: 24px; font-weight: 900; letter-spacing: -0.5px; }
.logo span { color: var(--primary-yellow); }

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.led { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.led-grey { background-color: var(--silver-dark); }
.led-green { background-color: var(--success-green); box-shadow: 0 0 8px var(--success-green); }

/* View Switching */
.view-scene { display: none; padding: 24px; animation: fadeIn 0.4s ease-out; }
.view-scene.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Idle View Elements */
.hero-box { margin-bottom: 40px; text-align: center; }

/* Gradient Aura Text (Purple, Blue, Yellow) */
.aura-text {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #A855F7, #3B82F6, #FBBF24);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: flowGradient 4s linear infinite;
    text-shadow: 0px 4px 20px rgba(168, 85, 247, 0.4);
}

@keyframes flowGradient {
    0% { background-position: 0% center; text-shadow: 0 4px 20px rgba(168, 85, 247, 0.5); }
    50% { background-position: 100% center; text-shadow: 0 4px 20px rgba(59, 130, 246, 0.6); }
    100% { background-position: 0% center; text-shadow: 0 4px 20px rgba(168, 85, 247, 0.5); }
}

.hero-box p { font-size: 15px; color: var(--silver-dark); line-height: 1.5; }

.input-form {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 24px;
    border-radius: 28px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--silver); }

.pill-selector {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 5px;
    scroll-behavior: smooth;
}
.pill-selector::-webkit-scrollbar { display: none; }
.pill-selector .pill {
    flex-shrink: 0;
    padding: 12px 20px;
    border-radius: 9999px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--silver-dark);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pill-selector .pill.active {
    background: var(--primary-yellow);
    color: #000;
    border-color: var(--primary-yellow);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.disclaimer { 
    font-size: 13px; 
    color: var(--danger-red); 
    background: rgba(239, 68, 68, 0.12); 
    padding: 16px; 
    border-radius: 16px; 
    margin-bottom: 30px; 
    line-height: 1.5; 
    border: none; 
    display: flex;
    align-items: center;
}

.btn { width: 100%; padding: 18px; border-radius: 9999px; border: none; font-size: 15px; font-weight: 800; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); text-transform: uppercase; letter-spacing: 0.5px; display: flex; justify-content: center; align-items: center; text-align: center; line-height: 1.3;}
.btn:active { transform: scale(0.95); }

/* Glowing Power Button */
.power-btn {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #111; /* Dark aesthetic baseline */
    border: 5px solid #00ffaa;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 
        0 0 15px rgba(0, 255, 170, 0.5), 
        0 0 35px rgba(0, 255, 170, 0.6),
        inset 0 0 20px rgba(0, 255, 170, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-family: inherit;
}

.power-btn:hover {
    transform: scale(1.03);
    box-shadow: 
        0 0 25px rgba(0, 255, 170, 0.7), 
        0 0 50px rgba(0, 255, 170, 0.8),
        inset 0 0 30px rgba(0, 255, 170, 1);
}

.power-btn:active, .power-btn.clicked {
    transform: scale(0.95);
    opacity: 0.5;
    transition: 0.1s;
}

.power-btn span {
    position: relative;
    z-index: 2;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
}

/* Footer Box Symmetry */
.footer-box {
    margin-top: 40px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    font-size: 13.5px;
    color: var(--silver-dark);
    line-height: 1.6;
    box-shadow: inset 0 10px 30px rgba(0,0,0,0.2);
    font-style: italic;
    letter-spacing: 0.2px;
}

.btn-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger-red); border: 1px solid rgba(239, 68, 68, 0.2); margin-top: 30px; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); transform: translateY(-2px); }

/* Cybernetic Ring / Active Scene */
.ring-container { display: flex; justify-content: center; align-items: center; margin: 20px 0 40px; }
.cyber-ring { position: relative; width: 220px; height: 220px; display: flex; justify-content: center; align-items: center; }
.cyber-ring svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-content { text-align: center; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,0.2); width: 156px; height: 156px; border-radius: 50%; box-shadow: inset 0 0 20px rgba(0,0,0,0.5); }
.ring-label { font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--silver-dark); margin-bottom: 5px; }
.ring-timer { font-size: 42px; font-weight: 900; color: #fff; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Grid Info */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 30px; }
.stat-card { background: var(--card-bg); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 15px 10px; text-align: center; }
.stat-title { font-size: 11.5px; color: var(--silver-dark); font-weight: 600; margin-bottom: 8px; letter-spacing: -0.2px; }
.stat-val { font-size: 16px; color: #fff; font-weight: 800; }

/* Timeline List */
.timeline-box { background: var(--card-bg); border-radius: 16px; padding: 20px; border: 1px solid rgba(255,255,255,0.05); }
.timeline-title { font-size: 14px; font-weight: 700; margin-bottom: 15px; color: white; }
.alarm-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.alarm-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: rgba(0,0,0,0.3); border-radius: 10px; font-size: 14px; font-weight: 600; border-left: 3px solid var(--silver-dark); transition: 0.3s; }
.alarm-list li.done { opacity: 0.4; border-left-color: var(--silver-dark); }
.alarm-list li.pending { border-left-color: var(--primary-yellow); color: white; }
.alarm-list li.active { border-left-color: var(--danger-red); background: rgba(239, 68, 68, 0.1); color: var(--danger-red); animation: pulse 2s infinite; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Modal Popup */
.modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); z-index: 999; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s; }
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal { background: #1E293B; width: 85%; padding: 30px; border-radius: 24px; text-align: center; border: 1px solid rgba(239,68,68,0.3); box-shadow: 0 20px 50px rgba(0,0,0,0.5); transform: translateY(20px); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal-overlay.show .modal { transform: translateY(0); }

/* Theme Toggle Button */
.btn-theme {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 32px; height: 32px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display:flex; justify-content:center; align-items:center;
    transition: 0.3s;
}
.btn-theme:hover { background: rgba(255,255,255,0.15); transform: scale(1.1); }

/* LIGHT MODE OVERRIDES */
body.light-mode { background-color: #f1f5f9; color: #334155; }
body.light-mode .mobile-app { background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%); box-shadow: 0 0 50px rgba(0,0,0,0.1); }
body.light-mode .app-header { background: rgba(255,255,255, 0.6); border-bottom: 1px solid rgba(0,0,0,0.05); }
body.light-mode .logo { color: #0f172a; }
body.light-mode .status-indicator { background: rgba(0,0,0,0.05); color: #0f172a; }
body.light-mode .btn-theme { background: #fff; border-color: #cbd5e1; color: #000; }
body.light-mode .btn-theme:hover { background: #f1f5f9; }

body.light-mode .input-form { background: rgba(255,255,255, 0.7); border-color:#cbd5e1; }
body.light-mode .form-group label { color: #334155; }
body.light-mode .pill-selector .pill { background: #fff; border-color: #cbd5e1; color: #64748b; }
body.light-mode .pill-selector .pill.active { background: var(--primary-yellow); color: #000; border-color: var(--primary-yellow); }
body.light-mode .hero-box p { color: #64748b; }

body.light-mode .footer-box { background: rgba(255,255,255,0.7); border-color: #cbd5e1; color: #475569; }
body.light-mode .footer-box a { color: #334155 !important; }

body.light-mode .power-btn { 
    background: #f8fafc; border: 5px solid #059669; 
    box-shadow: 0 0 15px rgba(5, 150, 105, 0.2), inset 0 0 20px rgba(5, 150, 105, 0.1); 
}
body.light-mode .power-btn:hover { box-shadow: 0 0 25px rgba(5, 150, 105, 0.4), inset 0 0 30px rgba(5, 150, 105, 0.3); }
body.light-mode .power-btn span { color: #022c22; font-weight: 700; }

body.light-mode .stat-card { background: rgba(255,255,255,0.8); border-color: #cbd5e1; }
body.light-mode .stat-title { color: #64748b; }
body.light-mode .stat-val { color: #0f172a; }

body.light-mode .ring-content { background: rgba(255,255,255,0.9); box-shadow: inset 0 0 20px rgba(0,0,0,0.05); }
body.light-mode .ring-label { color: #64748b; }
body.light-mode .ring-timer { color: #d97706; } /* Golden Yellow color for Light Mode Timer */
body.light-mode circle[stroke="rgba(255, 255, 255, 0.05)"] { stroke: rgba(0,0,0,0.1); }
body.light-mode #progressCircle { stroke: #059669; } /* Green progress instead of yellow in light mode */

body.light-mode .timeline-box { background: rgba(255,255,255,0.8); border-color: #cbd5e1; }
body.light-mode .timeline-title { color: #0f172a; }
body.light-mode .alarm-list li { background: #f8fafc; border-color: #cbd5e1; color:#334155; }
body.light-mode .alarm-list li.pending { background: #fff; border-left-color: #059669; color:#000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
body.light-mode .alarm-list li.done { border-left-color: #cbd5e1; opacity: 0.5; }
body.light-mode .alarm-list li.active { border-left-color: var(--danger-red); background: rgba(239, 68, 68, 0.1); }

body.light-mode .modal { background: #f8fafc; color: #0f172a; border-color: var(--danger-red); }
body.light-mode .modal p { color: #334155 !important; }
