:root {
    --bg: #030406; 
    --text-primary: #ffffff;
    --text-secondary: #8e8e93; 
    --accent: #ffffff; 
    --success: #30d158; 
    --danger: #ff453a; 
    --gold: #ffd60a; 
    --radius: 26px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
}

body {
    background-color: var(--bg);
    background-image: 
        radial-gradient(circle at 50% -10%, rgba(12, 18, 30, 0.35) 0%, transparent 60%),
        radial-gradient(circle at 10% 100%, rgba(6, 10, 18, 0.25) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    margin: 0;
    padding: 16px;
    padding-bottom: 150px; 
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0;
}
h1 { font-size: 1.25rem; margin-bottom: 12px; }
h2 { font-size: 1.05rem; margin-bottom: 10px; }
h3 { font-size: 0.90rem; margin-bottom: 8px; }
h4 { font-size: 0.80rem; margin-bottom: 6px; }

.app-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.screen { display: none; }
.screen.active {
    display: block;
    animation: simpleFade 0.25s ease-out forwards;
}
@keyframes simpleFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =========================================================
   STANDARD CARDS GLASS
========================================================= */
.liquid-glass {
    background: rgba(22, 22, 28, 0.45) !important; 
    backdrop-filter: blur(60px) saturate(340%) brightness(120%) contrast(115%) !important;
    -webkit-backdrop-filter: blur(60px) saturate(340%) brightness(120%) contrast(115%) !important;
    
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: backdrop-filter;

    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 25px 45px rgba(0,0,0,0.8), inset 0 1px 2px rgba(255,255,255,0.2) !important;
    border-radius: var(--radius);
    padding: 20px;
}

.login-card {
    max-width: 420px;
    margin: 40px auto 0 auto;
    text-align: center;
}

.login-tabs {
    display: flex;
    background: rgba(10, 10, 14, 0.6);
    border-radius: 14px;
    padding: 5px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.9);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.tab-btn.active {
    background: var(--accent);
    color: #000000; 
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
}

.tab-btn:nth-child(3).active {
    background: var(--success) !important;
    color: #000 !important;
    box-shadow: 0 4px 20px rgba(48, 209, 88, 0.4) !important;
}

.login-form { display: none; }
.login-form.active { display: block; }

/* =========================================================
   1. CONTROL PANEL (TOP HEADER) - CLEAN OUTLINE-FREE GLASS
   Harsh neon borders removed, soft seamless bezel added.
========================================================= */
.liquid-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 20px;
    margin: -16px -16px 20px -16px !important;
    width: calc(100% + 32px) !important;
    border-radius: 0 !important;
    
    background: rgba(16, 16, 22, 0.25) !important; 
    backdrop-filter: blur(75px) saturate(380%) brightness(125%) contrast(110%) !important;
    -webkit-backdrop-filter: blur(75px) saturate(380%) brightness(125%) contrast(110%) !important;
    
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: backdrop-filter;

    /* Clean subtle bottom border, zero harsh side outlines */
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.85) !important;
    box-sizing: border-box;
}

.liquid-header h1 {
    color: #ffffff !important;
    margin-bottom: 0 !important;
    text-shadow: 0 2px 10px rgba(255,255,255,0.3);
}

.compact-tag {
    display: inline-block;
    font-size: 0.55rem !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

/* BUTTONS */
.btn {
    background-color: var(--accent);
    color: #000000;
    border: none;
    padding: 14px 20px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
    font-weight: 800;
    text-transform: uppercase;
}
.btn:active { transform: scale(0.96); }

.btn-danger {
    background-color: rgba(255, 69, 58, 0.2);
    color: var(--danger);
    border: 1px solid rgba(255, 69, 58, 0.3);
    box-shadow: 0 0 15px rgba(255, 69, 58, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15) !important; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { text-align: center; padding: 16px 10px; }
.stat-card h3 { margin: 0 0 6px 0; font-size: 0.65rem !important; color: var(--text-secondary); }
.stat-card p { margin: 0; font-size: 1.5rem; font-weight: 700; text-shadow: 0 2px 10px rgba(255,255,255,0.3); }

.controls { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }

input, select {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--text-primary) !important;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    outline: none;
    width: 100%;
}
input:focus, select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.filter-box {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}
.filter-box option { background: #111; color: var(--text-primary); font-size: 0.8rem; }

.password-wrapper { position: relative; width: 100%; }
.password-wrapper input { width: 100%; padding-right: 60px; }
.eye-btn {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; cursor: pointer;
    font-size: 0.75rem; font-weight: 800; color: var(--text-secondary);
    padding: 4px; z-index: 10; text-transform: uppercase;
}
.eye-btn:hover { color: var(--text-primary); }

.drum-picker {
    background: rgba(25, 25, 30, 0.4) !important;
    backdrop-filter: blur(40px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    width: 190px; height: 52px; 
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    overflow: hidden; touch-action: none; user-select: none; cursor: ns-resize;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5); position: relative;
}
.drum-item { font-weight: 800; text-transform: uppercase; white-space: nowrap; line-height: 1.2; position: absolute; width: 100%; text-align: center; }
.drum-item.prev { font-size: 0.6rem; color: var(--text-secondary); opacity: 0.3; top: 2px; }
.drum-item.active { color: var(--gold); opacity: 1; top: 50%; transform: translateY(-50%); text-shadow: 0 0 12px rgba(255,214,10,0.8); }
.drum-item.next { font-size: 0.6rem; color: var(--text-secondary); opacity: 0.3; bottom: 2px; }

input::placeholder { text-transform: uppercase; font-size: 0.75rem; font-weight: 700; color: #666; letter-spacing: 0.5px; }

.slider-container { padding: 16px; margin-bottom: 16px; }
.slider-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.slider-label { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.slider-badge { background: #333; color: white; padding: 4px 10px; border-radius: 12px; font-size: 0.85rem; font-weight: 700; text-shadow: 0 0 10px rgba(255,255,255,0.6); }

input[type="range"] { -webkit-appearance: none; width: 100%; height: 8px; background: rgba(255,255,255,0.12); border-radius: 4px; outline: none; padding: 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--text-primary); cursor: pointer; box-shadow: 0 0 15px rgba(255,255,255,0.8); }

.member-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.member-card { 
    padding: 20px; 
    transition: transform 0.1s, border-color 0.2s; 
    cursor: pointer; 
    user-select: none;
}
.member-card:active { transform: scale(0.98); }
.member-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; pointer-events: none; }
.member-name-highlight { font-weight: 800; text-transform: uppercase; font-size: 1rem; letter-spacing: 0.5px; color: var(--text-primary); text-shadow: 0 2px 10px rgba(255,255,255,0.3); }

.badge { 
    padding: 5px 12px; 
    border-radius: 12px; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    font-weight: 800; 
    backdrop-filter: blur(25px) saturate(350%) brightness(120%);
    -webkit-backdrop-filter: blur(25px) saturate(350%) brightness(120%);
}
.badge-active { 
    background-color: rgba(48, 209, 88, 0.28) !important; 
    color: var(--success); 
    border: 1px solid rgba(48, 209, 88, 0.5);
    box-shadow: 0 0 15px rgba(48, 209, 88, 0.3);
    text-shadow: 0 0 10px rgba(48, 209, 88, 0.6);
}
.badge-expired { 
    background-color: rgba(255, 69, 58, 0.28) !important; 
    color: var(--danger); 
    border: 1px solid rgba(255, 69, 58, 0.5);
    box-shadow: 0 0 15px rgba(255, 69, 58, 0.3);
    text-shadow: 0 0 10px rgba(255, 69, 58, 0.6);
}

.member-details { display: none; flex-direction: column; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 16px; background: rgba(0, 0, 0, 0.45); padding: 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.06); }
.member-details.expanded { display: flex; animation: slideDown 0.2s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.detail-row { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.04); padding-bottom: 6px; }
.detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.detail-row span { color: var(--text-primary); font-weight: 600; }

.lock-screen { text-align: center; padding: 40px 20px; max-width: 500px; margin: 40px auto; }
.routine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }
.routine-card { padding: 22px; }
.routine-card h3 { color: var(--text-primary); font-weight: 800; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; }
.routine-card ul { padding-left: 20px; color: var(--text-secondary); margin-bottom: 0; }
.routine-card li { margin-bottom: 10px; font-size: 0.9rem; line-height: 1.4; }

.goal-instruction-box { padding: 20px; margin-bottom: 24px; }
.goal-instruction-box p { margin: 0; font-size: 0.95rem; color: var(--text-primary); line-height: 1.5; }

.leaderboard-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 10px; }
.leaderboard-card { padding: 22px; }
.leaderboard-card h3 { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; display: flex; align-items: center; gap: 8px; color: var(--gold); }
.leaderboard-table-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; font-size: 0.72rem; font-weight: 800; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px dashed rgba(255, 255, 255, 0.1); margin-bottom: 8px; }
.rank-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; margin-bottom: 8px; background: rgba(255, 255, 255, 0.05); border-radius: 16px; font-size: 0.95rem; }
.rank-pos { font-weight: 800; color: var(--text-primary); min-width: 50px; text-align: left; }
.rank-name { font-weight: 800; text-transform: uppercase; flex: 1; padding-left: 12px; }
.rank-score { font-weight: 800; color: var(--success); text-align: right; min-width: 80px; text-shadow: 0 0 12px rgba(48,209,88,0.6); }

.member-view-pane, .admin-pane { display: none; }
.member-view-pane.active, .admin-pane.active { display: block; }

/* =========================================================
   2. NAVIGATION CAPSULE (BOTTOM DOCK) - CLEAN OUTLINE-FREE GLASS
   Harsh side outlines removed, sleek minimalist water lens capsule.
========================================================= */
.liquid-dock {
    position: fixed !important;
    bottom: 25px !important;
    left: 0 !important; right: 0 !important; margin: 0 auto !important;
    width: calc(100% - 32px);
    max-width: 420px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 14px 10px;
    z-index: 999999 !important; 
    
    background: rgba(16, 16, 22, 0.3) !important; 
    backdrop-filter: blur(75px) saturate(380%) brightness(125%) contrast(110%) !important;
    -webkit-backdrop-filter: blur(75px) saturate(380%) brightness(125%) contrast(110%) !important;
    
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: backdrop-filter;

    /* Clean minimal border, no heavy neon outlines */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-top: 1.5px solid rgba(255, 255, 255, 0.3) !important;
    
    border-radius: 40px !important; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.85), inset 0 1px 2px rgba(255,255,255,0.25) !important;
}

.nav-item {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #8e8e93; 
    cursor: pointer;
    flex: 1;
    transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.5px;
}
.nav-item.active {
    color: #ffffff; 
    transform: scale(1.08); 
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
}

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); justify-content: center; align-items: center; padding: 16px; z-index: 100000; }
.modal-content { padding: 28px; width: 100%; max-width: 720px; max-height: 90vh; overflow-y: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.78rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 800; }

@media (max-width: 480px) {
    .modal-content, .support-card { padding: 20px; max-height: 85vh; }
    h1 { font-size: 1.15rem; }
    h2 { font-size: 1rem; }
    .stat-card p { font-size: 1.3rem; }
    .liquid-dock { width: calc(100% - 24px); bottom: 15px !important; }
    body { padding-bottom: 110px; }
}
