:root {
    /* === CORE BACKGROUND === */
    --bg-main: #0b0c0e;
    --bg-soft: #121417;

    /* === GLASS === */
    --glass: rgba(255,255,255,0.045);
    --border: rgba(255,255,255,0.10);

    /* === GOLD (TIME) === */
    --gold-main: #e6b65c;
    --gold-soft: #f4d27a;
    --gold-muted: #bfa15a;
    --gold-glow: rgba(230,182,92,0.35);

    /* === DUST (WASTED TIME) === */
    --dust-main: #7a5a3a;
    --dust-muted: #5c4632;

    /* === TEXT === */
    --text: #e8e6e3;
    --muted: #9a948c;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(230,182,92,0.08), transparent 55%),
        linear-gradient(180deg, #0b0c0e, #070809);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    justify-content: center;
    padding: 24px 16px;
}
/*body::after {*/
/*    content: "";*/
/*    position: fixed;*/
/*    inset: 0;*/
    background-image: url("dust.png"); /* optional subtle noise */
/*    opacity: 0.03;*/
/*    pointer-events: none;*/
/*}*/

canvas {
    filter: drop-shadow(0 0 18px rgba(245,197,122,0.08));
}

.logo {
    width: 180px;
    margin-bottom: 8px;
    filter: drop-shadow(0 10px 30px rgba(230,182,92,0.3));
}

/* === CONTAINER === */
.container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}


/* === HEADER === */
.top-header {
    text-align: center;
}

.top-header h1 {
    font-family: "Cinzel", serif;
    font-weight: 500;
    letter-spacing: 0.08em;
    margin: 0;
}

.subtitle {
    margin-top: 6px;
    font-size: 1rem;
    color: var(--muted);
}

/* === CARDS (AGED GLASS) === */
.card {
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.045),
        rgba(255,255,255,0.015)
    );
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow:
        0 25px 60px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.card.muted {
    opacity: 0.55;
}

/* === TIMER === */
.timer-card {
    text-align: center;
}

.timer-label {
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.timer-display {
    font-size: 3.6rem;
    font-weight: 700;
    margin: 18px 0;
    font-variant-numeric: tabular-nums;
    color: var(--gold-main);
    text-shadow: 0 0 18px rgba(230,182,92,0.25);
}

.status-msg {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--muted);
}

/* === BUTTONS === */
.btn {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    border: none;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn.start {
    background: linear-gradient(135deg, var(--gold-soft), var(--gold-main));
    color: #1a1408;
    box-shadow: 0 0 30px var(--gold-glow);
}

.btn.stop {
    background: transparent;
    border: 1px solid var(--dust-main);
    color: var(--dust-main);
}

.btn:hover {
    transform: translateY(-1px);
}

/* === HEADERS === */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: "Cinzel", serif;
}

/* === BADGES === */
.badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 999px;
}

.badge.danger {
    background: rgba(122,90,58,0.25);
    color: var(--dust-main);
}

/* === STATS === */
.stat-highlight {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--dust-main);
    margin-bottom: 14px;
}

/* === SESSIONS === */
.session-list {
    max-height: 180px;
    overflow-y: auto;
}

.session-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}

/* === TABLE === */
.week-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.week-table th {
    text-align: left;
    color: var(--muted);
    font-weight: 400;
    padding-bottom: 8px;
}

.week-table td {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

/* === AUTH PAGES === */
.auth-card {
    padding: 28px;
}

.auth-title {
    text-align: center;
    margin: 0;
    font-family: "Cinzel", serif;
}

.auth-subtitle {
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 22px;
}

/* === INPUTS === */
.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-group input {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
}

.input-group input:focus {
    border-color: var(--gold-main);
    box-shadow: 0 0 0 3px rgba(230,182,92,0.15);
}

/* === HEADER ACTIONS === */
.header-actions {
    margin-top: 12px;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    cursor: pointer;
}

.icon-btn:hover {
    border-color: var(--gold-main);
    color: var(--gold-main);
}

.icon-btn.danger {
    border-color: var(--dust-main);
    color: var(--dust-main);
}

.timer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

/* HOURGLASS CONTAINER */
.hourglass {
    position: relative;
    width: 42px;
    height: 88px;
    filter: drop-shadow(0 0 18px rgba(255,215,140,0.12));
}

/* GLASS SHAPE */
.glassy {
    position: absolute;
    width: 100%;
    height: 42%;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.15);
}

.glassy.top {
    top: 0;
}

.glassy.bottom {
    bottom: 0;
}

/* NECK */
.neck {
    position: absolute;
    top: 44%;
    left: 50%;
    width: 6px;
    height: 10px;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.25);
    border-radius: 999px;
}

/* GOLD (TOP) */
.gold {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(255,215,140,0.95),
        rgba(245,197,122,0.65)
    );
    transition: height 0.8s ease;
}

/* DUST (BOTTOM) */
.dust {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(
        180deg,
        rgba(139,107,74,0.9),
        rgba(92,70,50,0.95)
    );
    transition: height 0.8s ease;
}

/* FALLING STREAM */
.sand-stream {
    position: absolute;
    top: 46%;
    left: 50%;
    width: 2px;
    height: 0;
    background: linear-gradient(
        180deg,
        rgba(255,215,140,0.9),
        rgba(139,107,74,0.8)
    );
    transform: translateX(-50%);
    opacity: 0;
}


.hourglass.running .sand-stream {
    height: 45px;
    opacity: 1;
    animation: fall 0.6s linear infinite;
}

@keyframes fall {
    0% { opacity: 0.3; }
    50% { opacity: 0.4; }
    100% { opacity: 0.3; }
}
