/* DO habit-score app -- dark theme, 3 sticky zones */

:root {
    --bg: #0a0a0a;
    --card-bg: #16181d;
    --card-border: #23262e;
    --text: #e6e6e6;
    --text-dim: #8a8f98;

    --zone-red: #dc2626;
    --zone-orange: #ea7a1d;
    --zone-blue: #2563eb;
    --zone-green: #16a34a;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* ---- Sticky top: score ---- */
.score-zone {
    flex: 0 0 auto;
    /* respect notch / status bar when running fullscreen */
    padding: calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right))
             12px calc(12px + env(safe-area-inset-left));
}

.score-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 96px;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 800;
    font-size: 3.5rem;
    line-height: 1;
    user-select: none;
    transition: background-color 0.25s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.score-btn.zone-red    { background: var(--zone-red); }
.score-btn.zone-orange { background: var(--zone-orange); }
.score-btn.zone-blue   { background: var(--zone-blue); }
.score-btn.zone-green  { background: var(--zone-green); }

/* Highlight while a card hovers over the drop zone */
.score-btn.drop-hover {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.55) inset;
    transform: scale(1.01);
}

/* Brief pulse when points are added */
.score-btn.bump {
    animation: bump 0.3s ease;
}
@keyframes bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}

/* ---- Scrollable middle: activity cards ---- */
.activities {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 4px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Hide scrollbar but keep scrolling */
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* old Edge/IE */
    touch-action: pan-y;            /* allow vertical scroll on touch */
}
.activities::-webkit-scrollbar { width: 0; height: 0; display: none; }

.hint {
    color: var(--text-dim);
    text-align: center;
    padding: 24px 0;
    font-size: 0.95rem;
}

.card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}

.card .card-title {
    flex: 1 1 auto;
    font-size: 0.85rem;
    line-height: 1.25;
    color: var(--text);
    overflow-wrap: anywhere;
}

.card .card-points {
    flex: 0 0 auto;
    font-size: 4.25rem;   /* ~5x the title */
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
}

/* Source card while being dragged */
.card.dragging-src { opacity: 0.4; }

/* Floating drag ghost */
.drag-ghost {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.95;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transform: translate(-50%, -50%);
    will-change: transform;
}

/* ---- Sticky bottom: actions ---- */
.actions {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    /* respect home indicator / rounded corners when running fullscreen */
    padding: 12px calc(12px + env(safe-area-inset-right))
             calc(12px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
    border-top: 1px solid var(--card-border);
    background: var(--bg);
}

.action-btn {
    flex: 1 1 0;
    padding: 16px 8px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}
.action-btn:active { background: #1f222a; }
