/**
 * Training Modes - Shared Styles
 *
 * Common CSS for all training modes (drill, composition, index play, count)
 * Reduces duplication across template files.
 */

/* ============================================================================
   CARD STYLES
   ============================================================================ */

/**
 * Base card styling - common to all modes
 */
.card-base {
    display: inline-block;
    background: #fff;
    border-radius: 8px;
    margin: 0.5rem;
    font-weight: bold;
    color: #000;
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
    border: 3px solid;
}

/**
 * Red suits (hearts, diamonds)
 */
.card-base.red {
    color: #d00;
}

/**
 * Drill mode cards (SVG-based, so minimal CSS)
 */
.card-drill {
    /* Drill uses SVG cards, no additional styles needed */
}

/**
 * Composition mode cards
 */
.card-comp {
    display: inline-block;
    width: 80px;
    height: 112px;
    background: #fff;
    border: 3px solid #FFB000;
    border-radius: 6px;
    margin: 0.3rem;
    line-height: 112px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #000;
    text-align: center;
    box-shadow: 0 0 12px rgba(255, 176, 0, 0.4);
}

.card-comp.red {
    color: #d00;
}

/**
 * Index play mode cards
 */
.card-display {
    display: inline-block;
    width: 90px;
    height: 126px;
    background: #fff;
    border: 3px solid #FF00FF;
    border-radius: 8px;
    margin: 0.5rem;
    line-height: 126px;
    font-size: 2rem;
    font-weight: bold;
    color: #000;
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

.card-display.red {
    color: #d00;
}

/**
 * Count trainer cards
 */
.card-reveal {
    display: inline-block;
    width: 100px;
    height: 140px;
    background: #fff;
    border: 3px solid #FF00FF;
    border-radius: 10px;
    margin: 1rem;
    line-height: 140px;
    font-size: 2.5rem;
    font-weight: bold;
    color: #000;
    animation: cardFlip 0.3s ease-out;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

.card-reveal.red {
    color: #d00;
}

@keyframes cardFlip {
    0% {
        transform: rotateY(90deg) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }
}

/* ============================================================================
   STATS PANEL STYLES
   ============================================================================ */

/**
 * Stats panel container
 */
.stat-panel {
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    border: 3px solid;
    padding: 1.5rem;
    border-radius: 12px;
}

/**
 * Stats panel with holographic corners
 */
.stat-panel.holo-corners {
    position: relative;
}

/**
 * Stat label (small text above value)
 */
.stat-label {
    font-size: 0.65rem;
    color: #00AA2E;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-family: var(--font-terminal);
    text-transform: uppercase;
}

/**
 * Stat value (large number/percentage)
 */
.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    font-family: var(--font-display);
}

/**
 * Professional stat value (enhanced version)
 */
.stat-value-pro {
    font-size: 2rem;
    font-weight: 900;
    font-family: var(--font-display);
    text-shadow: 0 0 10px currentColor;
}

/**
 * Stats grid layout
 */
.stats-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/**
 * Stats grid with 3 columns
 */
.stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/**
 * Stats grid with 4 columns
 */
.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/**
 * Stats grid with 5 columns
 */
.stats-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

/**
 * Stats bar (horizontal layout)
 */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

/**
 * Individual stat box in bar
 */
.stat-box {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #FF00FF;
    padding: 1rem;
    text-align: center;
    border-radius: 8px;
}

/* ============================================================================
   ACTION BUTTON GRID
   ============================================================================ */

/**
 * Action grid - 2 columns
 */
.action-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

/**
 * Action grid - 3 columns
 */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

/* ============================================================================
   INPUT STYLES
   ============================================================================ */

/**
 * Count input (for count trainer)
 */
.count-input {
    width: 200px;
    padding: 1.5rem;
    font-size: 2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #FF00FF;
    color: #FF00FF;
    font-family: var(--font-terminal);
    font-weight: bold;
    border-radius: 8px;
}

.count-input:focus {
    outline: none;
    border-color: #00FFFF;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* ============================================================================
   HINT & FEEDBACK BOXES
   ============================================================================ */

/**
 * Hint box
 */
.hint-box {
    background: rgba(255, 255, 0, 0.1);
    border: 2px solid #FFFF00;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #FFFF00;
    display: none;
    border-radius: 8px;
}

/**
 * Explanation box (composition mode)
 */
.explanation-box {
    background: rgba(255, 176, 0, 0.1);
    border: 2px solid #FFB000;
    padding: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #FFB000;
    display: none;
    border-radius: 8px;
}

/* ============================================================================
   CATEGORY/SELECTION BUTTONS
   ============================================================================ */

/**
 * Category button (for mode selection)
 */
.category-btn {
    padding: 1.5rem 1rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.category-btn.selected {
    opacity: 1;
}

/**
 * Total button (composition mode)
 */
.total-btn {
    padding: 1rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.total-btn.selected {
    opacity: 1;
}

/* ============================================================================
   SPECIALIZED DISPLAYS
   ============================================================================ */

/**
 * True count display (index play)
 */
.true-count-display {
    font-size: 4rem;
    font-weight: 900;
    font-family: var(--font-display);
    color: #00FFFF;
    text-shadow: 0 0 20px #00FFFF;
    margin: 1.5rem 0;
}

/**
 * EV comparison grid (composition mode)
 */
.ev-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

/**
 * EV box
 */
.ev-box {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid;
    padding: 1.5rem;
    text-align: center;
    border-radius: 12px;
}

.ev-box.basic {
    border-color: #00FFFF;
}

.ev-box.composition {
    border-color: #FFB000;
}

/**
 * Removal indicator (composition mode)
 */
.removal-indicator {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 176, 0, 0.2);
    border: 1px solid #FFB000;
    margin: 0.5rem;
    font-size: 0.8rem;
    font-family: var(--font-terminal);
    border-radius: 4px;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .stats-grid,
    .stats-grid-3,
    .stats-grid-4,
    .stats-grid-5,
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-grid,
    .action-grid-2 {
        grid-template-columns: 1fr;
    }

    .ev-comparison {
        grid-template-columns: 1fr;
    }

    .card-display,
    .card-comp,
    .card-reveal {
        width: 70px;
        height: 98px;
        font-size: 1.5rem;
        line-height: 98px;
    }
}
