/* Carrom Helper Styles - Touch-optimized & Minimalist Light Theme */

/* Line 1: Mode Selector & Action Buttons */
#helper-carrom .carrom-line-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

#helper-carrom .carrom-selectors-group {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

#helper-carrom .carrom-selectors-group .select-control {
    flex: 1;
    width: 100%;
    min-width: 0;
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    border-radius: var(--border-radius-sm);
    padding: 9px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

#helper-carrom .carrom-selectors-group .select-control:focus,
#helper-carrom .carrom-selectors-group .select-control:hover {
    border-color: var(--color-primary-accent, #4f46e5);
}

#helper-carrom .carrom-action-btns {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

#helper-carrom .carrom-action-btns .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    padding: 0 12px;
    height: 40px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Line 2: Stat Badges */
#helper-carrom .carrom-line-2 {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 20px;
    width: 100%;
}

#helper-carrom .stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-neutral-shaded, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 2px 4px;
    height: 40px;
    min-width: 0;
    flex: 1;
    box-sizing: border-box;
}

#helper-carrom .stat-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    line-height: 1.1;
    white-space: nowrap;
}

#helper-carrom .stat-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.1;
}

/* Carrom Board Canvas Container */
#helper-carrom .carrom-board-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

#helper-carrom #carrom-canvas {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    aspect-ratio: 1 / 1;
    background-color: #fdf6e3;
    border: 12px solid #8b5a2b;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), inset 0 0 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    cursor: crosshair;
    touch-action: none;
}

/* Mode Switcher Bar (Position vs Aim/Shoot) */
#helper-carrom .carrom-mode-bar {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    max-width: 520px;
    width: 100%;
}

#helper-carrom .btn-mode {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
}

#helper-carrom .btn-mode.active {
    background-color: var(--color-primary-accent, #4f46e5);
    color: #ffffff;
    border-color: var(--color-primary-accent, #4f46e5);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* Position Range Slider */
#helper-carrom .position-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    max-width: 520px;
    width: 100%;
    background-color: var(--color-neutral-shaded, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    box-sizing: border-box;
}

#helper-carrom .slider-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    white-space: nowrap;
    text-transform: uppercase;
}

#helper-carrom .slider-control {
    flex: 1;
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

/* Turn / Instruction Banner below board */
#helper-carrom .carrom-turn-banner {
    margin-top: 8px;
    padding: 8px 16px;
    background-color: var(--color-neutral-shaded, rgba(0, 0, 0, 0.04));
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: center;
    max-width: 520px;
    width: 100%;
    box-sizing: border-box;
}

/* Victory Modal Styling (Same as Sokoban & Rush Hour) */
.win-modal-content {
    max-width: 380px;
    width: 90%;
    margin: auto;
    text-align: center;
    padding: 32px 24px;
    box-sizing: border-box;
}

.win-icon-wrapper {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.win-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--color-text-primary);
}

.win-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.win-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.win-stat-box {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.win-stat-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-text-primary);
}

.win-stat-lbl {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.win-actions {
    display: flex;
    gap: 12px;
}

.win-actions .btn {
    flex: 1;
}
