﻿/* ================= GLOBAL ================= */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #111;
    color: white;
}

button {
    padding: 8px 18px;
    font-size: 14px;
}

/* ================= TRAINING WRAP ================= */
#centerWrap {
    max-width: 800px;
    margin: 8px auto;
    padding: 10px 20px;
}

/* ================= TOP BAR ================= */
#topBar {
    text-align: center;
    margin-top: 6px;
}

#appTitle {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 12px;
}

#controlBar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

    #controlBar button {
        padding: 8px 14px;
        border-radius: 8px;
        border: none;
        background: #222;
        color: #ccc;
        font-weight: bold;
        font-size: 13px;
    }

/* ================= SECTION ================= */
.sectionBlock {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
    background: #151515;
}

.sectionHeaderBox {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #aaa;
    margin-bottom: 10px;
    padding: 6px 0;
    border-radius: 8px;
    background: #1a1a1a;
}

/* ================= GRID ================= */
.selectRow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.focusRow {
    grid-template-columns: repeat(3, 1fr);
}
    /* ================= BUTTONS ================= */
    .selectRow button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        aspect-ratio: 3 / 1; /* 🔥 rectangular */
        width: 100%;
        gap: 6px;
        padding: 8px;
        border-radius: 14px;
        border: none;
        background: #222;
        color: #aaa;
        font-weight: 600;
        font-size: 12px;
        text-transform: uppercase;
        transition: all 0.2s ease;
        opacity: 0.5;
    }

        /* ACTIVE */
        .selectRow button.active {
            opacity: 1;
            background: linear-gradient(135deg, #4CAF50, #2ecc71);
            color: white;
        }

/* DISABLED */
.focusBtn.disabled {
    opacity: 0.1;
    pointer-events: none;
}

/* ICON */
.icon {
    font-size: 20px; /* 🔥 fixed */
}

/* ================= DRILL ================= */
.highlightBlock {
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    padding: 10px;
    margin-top: 14px;
}

#selectedDrill {
    font-size: 20px;
    text-align: center;
    font-weight: 600;
}

/* ================= COACH ================= */
#coachBox {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #101820;
    border: 1px solid #1f2f3a;
    text-align: center;
}

#coachTitle {
    font-size: 12px;
    color: #888;
}

#coachText {
    font-size: 15px;
    color: #ccc;
}

/* ================= BUTTONS ================= */
#trainingView > button {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#startDrillBtn {
    width: 100%;
    max-width: 320px;
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #2196F3, #00bcd4);
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.secondaryBtn {
    width: 100%;
    max-width: 320px;
    margin: 10px auto 0;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #222;
    color: #888;
}

/* ================= GRIP ================= */
#gripStatus {
    margin-top: 6px;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 12px;
    background: #151515;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gripLabel {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.gripBar.horizontal {
    width: 100%;
    max-width: 320px;
    height: 18px;
    display: flex;
    gap: 4px;
}

    .gripBar.horizontal .led {
        flex: 1;
        height: 100%;
        border-radius: 3px;
    }

/* ================= LED COLORS ================= */
.led {
    background: #1f5f78;
}

    .led.active.low {
        background: #ffeb3b;
    }

    .led.active.mid {
        background: #ff9800;
    }

    .led.active.high {
        background: #f44336;
    }

/* ================= SESSION VIEW ================= */

#sessionView {
    max-width: 600px;
    margin: 10px auto;
    padding: 10px;
}

/* HEADER */
.sessionHeader {
    text-align: center;
    font-size: 18px;
    margin-bottom: 10px;
    color: #aaa;
}

/* BIG SCORE */
#sessionScore {
    text-align: center;
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* COACH */
#sessionCoach {
    text-align: center;
    font-size: 16px;
    color: #ccc;
    margin-bottom: 12px;
}

/* BLOCKS */
.sessionBlock {
    background: #151515;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
}

/* DEV PANEL */
#devPanel {
    margin-top: 15px;
    padding: 10px;
    background: #0f1a22;
    border-radius: 10px;
}

.devGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

/* STOP BUTTON */
#stopSessionBtn {
    width: 100%;
    margin-top: 15px;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #e53935;
    color: white;
    font-size: 16px;
}
#sessionGripWrap {
    display: flex;
    flex-direction: column;
    align-items: center; /* 🔥 centers grip bar */
}
/* ================= WAVE GRID FIX ================= */
.waveRow {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 10px;
}

.waveBox {
    width: 100%;
    height: 180px;
}