/* System Bet Calculator Styles v1.0.0 */
/* Modern glass-card design for system bet calculators */

/* ============================================================================
   CSS VARIABLES - Green/Blue Color Scheme
   ============================================================================ */
.systembet {
    --pf-primary: #00ff88;
    --pf-electric: #00bfff;
    --pf-accent: #8b5cf6;

    /* Extended palette */
    --pf-primary-dark: #00cc6a;
    --pf-primary-glow: rgba(0, 255, 136, 0.3);
    --pf-electric-glow: rgba(0, 191, 255, 0.3);
    --pf-accent-glow: rgba(139, 92, 246, 0.3);

    /* Base colors */
    --pf-bg-dark: #0f172a;
    --pf-glass-bg: rgba(30, 41, 59, 0.7);
    --pf-glass-border: rgba(255, 255, 255, 0.08);
    --pf-glass-highlight: rgba(255, 255, 255, 0.05);

    /* Text colors */
    --pf-text-primary: #e2e8f0;
    --pf-text-secondary: #94a3b8;
    --pf-text-muted: #64748b;

    /* Status colors */
    --pf-success: #22c55e;
    --pf-success-glow: rgba(34, 197, 94, 0.3);
    --pf-warning: #f59e0b;
    --pf-danger: #ef4444;
    --pf-danger-glow: rgba(239, 68, 68, 0.3);

    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 3rem;
}

/* ============================================================================
   HEADER
   ============================================================================ */
.systembet .calculator-header {
    position: relative;
    margin-bottom: 2rem;
}

.systembet .header-content {
    text-align: center;
}

.systembet .calculator-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--pf-primary) 0%, var(--pf-electric) 50%, var(--pf-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.systembet .header-content .calculator-subtitle,
.systembet .calculator-subtitle {
    color: var(--pf-text-secondary);
    font-size: 1.0625rem;
    margin: 0 auto;
    text-align: center;
    max-width: none;
}

.systembet .meta-info {
    position: absolute;
    top: 0;
    right: 0;
}

.systembet .updated-date {
    font-size: 0.8125rem;
    color: var(--pf-text-muted);
}

/* ============================================================================
   GLASS CARD CALCULATOR
   ============================================================================ */
.systembet .glass-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.systembet .glass-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.systembet .glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--pf-glass-highlight), transparent);
}

/* ============================================================================
   CONTROLS BAR
   ============================================================================ */
.systembet .calculator-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1.5rem 2.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--pf-glass-border);
}

.systembet .control-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.systembet .control-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pf-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================================
   SEGMENTED CONTROL (Odds Format)
   ============================================================================ */
.systembet .segmented-control {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--pf-glass-border);
    border-radius: 10px;
    padding: 4px;
    position: relative;
    gap: 4px;
}

.systembet .segmented-control input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.systembet .segment-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--pf-text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    z-index: 1;
    white-space: nowrap;
}

.systembet .segmented-control input[type="radio"]:checked + .segment-btn {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 191, 255, 0.15) 100%);
    color: var(--pf-primary);
    box-shadow: 0 2px 8px var(--pf-primary-glow);
}

.systembet .segment-btn:hover {
    color: var(--pf-text-primary);
}

/* ============================================================================
   PLACE TERMS GROUP (Each-Way)
   ============================================================================ */
.systembet .place-terms-group {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.systembet .place-terms-group.visible {
    max-height: 100px;
    opacity: 1;
    margin-top: 0.5rem;
}

/* ============================================================================
   STAKE SECTION
   ============================================================================ */
.systembet .stake-section {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    flex: 1;
    min-width: 280px;
}

.systembet .stake-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pf-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.systembet .stake-calculator {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.systembet .stake-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--pf-glass-border);
    border-radius: 10px;
    padding: 4px 4px 4px 1rem;
    transition: all 0.3s ease;
}

.systembet .stake-input-wrapper:focus-within {
    border-color: var(--pf-electric);
    box-shadow: 0 0 0 3px var(--pf-electric-glow);
}

.systembet .currency-symbol {
    color: var(--pf-electric);
    font-size: 1.125rem;
    font-weight: 700;
}

.systembet .stake-input-wrapper input[type="number"] {
    background: rgba(15, 23, 42, 0.8);
    border: none;
    width: 90px;
    padding: 0.5rem 0.875rem;
    font-size: 1rem;
    color: var(--pf-text-primary);
    font-weight: 700;
    border-radius: 7px;
    margin-left: 0.625rem;
    text-align: center;
}

.systembet .stake-input-wrapper input[type="number"]:focus {
    outline: none;
    background: var(--pf-electric);
    color: #0f172a;
}

.systembet .stake-multiply {
    font-size: 1rem;
    color: var(--pf-text-primary);
    font-weight: 700;
}

.systembet .stake-equals {
    font-size: 1.125rem;
    color: var(--pf-text-muted);
}

.systembet .stake-total {
    font-size: 1.125rem;
    color: var(--pf-primary);
    font-weight: 700;
    text-shadow: 0 0 20px var(--pf-primary-glow);
}

.systembet .stake-breakdown {
    font-size: 0.8125rem;
    color: var(--pf-text-muted);
    margin-left: 0.5rem;
}

/* ============================================================================
   SELECTIONS SECTION
   ============================================================================ */
.systembet .selections-section {
    margin: 2rem 0;
}

.systembet .section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--pf-text-primary);
    margin: 0 0 1.25rem;
}

/* Remove underline decoration from section titles */
.systembet .section-title::after,
.systembet .selections-section h2::after {
    display: none !important;
    content: none !important;
}

.systembet .selections-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Selection Card */
.systembet .selection-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--pf-glass-border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.systembet .selection-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--pf-electric) 0%, var(--pf-accent) 100%);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.systembet .selection-card:hover {
    border-color: rgba(0, 191, 255, 0.3);
    transform: translateY(-2px);
}

.systembet .selection-card:hover::before {
    opacity: 1;
}

/* Selection Card Result States */
.systembet .selection-card.result-win {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.02) 100%);
    border-color: rgba(34, 197, 94, 0.35);
}

.systembet .selection-card.result-win::before {
    background: var(--pf-success);
    opacity: 1;
}

.systembet .selection-card.result-win .selection-label {
    color: var(--pf-success);
}

.systembet .selection-card.result-loss {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.02) 100%);
    border-color: rgba(239, 68, 68, 0.35);
}

.systembet .selection-card.result-loss::before {
    background: var(--pf-danger);
    opacity: 1;
}

.systembet .selection-card.result-loss .selection-label {
    color: var(--pf-danger);
}

/* Placed result state (amber/orange) - for Each-Way betting */
.systembet .selection-card.result-placed {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.02) 100%);
    border-color: rgba(245, 158, 11, 0.35);
}

.systembet .selection-card.result-placed::before {
    background: var(--pf-warning);
    opacity: 1;
}

.systembet .selection-card.result-placed .selection-label {
    color: var(--pf-warning);
}

/* Void result state (gray/muted) - for non-runners */
.systembet .selection-card.result-void {
    background: linear-gradient(145deg, rgba(100, 116, 139, 0.1) 0%, rgba(100, 116, 139, 0.02) 100%);
    border-color: rgba(100, 116, 139, 0.35);
    opacity: 0.7;
}

.systembet .selection-card.result-void::before {
    background: var(--pf-text-muted);
    opacity: 1;
}

.systembet .selection-card.result-void .selection-label {
    color: var(--pf-text-muted);
}

/* Selection Card Header */
.systembet .selection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.systembet .selection-label {
    font-weight: 700;
    color: var(--pf-electric);
    font-size: 1rem;
    transition: color 0.3s;
}

/* Selection Card Inputs */
.systembet .selection-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
}

.systembet .input-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.systembet .input-group label {
    font-size: 0.8125rem;
    color: var(--pf-text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.systembet .optional-label {
    color: var(--pf-text-muted);
    font-weight: 400;
}

/* Input Wrapper with Border Label (Kelly Style) */
.systembet .input-wrapper {
    position: relative;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.systembet .input-wrapper:focus-within {
    border-color: var(--pf-electric);
    box-shadow: 0 0 0 2px var(--pf-electric-glow);
}

.systembet .input-label {
    position: absolute;
    top: 0;
    left: 1rem;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #cbd5e1;
    background: #1e293b;
    padding: 0 0.5rem;
    z-index: 10;
    font-weight: 500;
    pointer-events: none;
    line-height: 1;
    transition: color 0.2s ease;
}

.systembet .input-wrapper:focus-within .input-label {
    color: var(--pf-electric);
}

.systembet .input-wrapper input,
.systembet .input-wrapper select {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1rem 1.25rem;
    color: var(--pf-text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    outline: none;
    font-family: inherit;
}

.systembet .input-wrapper input::placeholder {
    color: var(--pf-text-muted);
    font-weight: 400;
}

/* Info Tooltip Button */
.systembet .info-tooltip-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--pf-text-muted);
    cursor: help;
    opacity: 0.8;
    transition: all 0.2s;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.systembet .info-tooltip-btn:hover {
    opacity: 1;
    color: #fff;
    background: var(--pf-electric);
}

/* Legacy input-group styling (for non-wrapper inputs) */
.systembet .input-group input,
.systembet .input-group select {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--pf-glass-border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--pf-text-primary);
    transition: all 0.2s;
    min-height: 48px;
}

.systembet .input-group input:focus,
.systembet .input-group select:focus {
    outline: none;
    border-color: var(--pf-electric);
    box-shadow: 0 0 0 3px var(--pf-electric-glow);
}

.systembet .input-group input::placeholder {
    color: var(--pf-text-muted);
}

/* ============================================================================
   VALIDATION ERRORS
   ============================================================================ */
.systembet .field-error {
    display: none;
    color: var(--pf-danger);
    font-size: 0.8125rem;
    margin-top: 0.375rem;
    font-weight: 500;
    padding: 0.375rem 0.625rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
    border-left: 3px solid var(--pf-danger);
}

.systembet .field-error.show {
    display: block;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.systembet .input-error {
    border-color: var(--pf-danger) !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.systembet .validation-errors {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    color: #fca5a5;
    display: none;
}

.systembet .validation-errors.show {
    display: block;
}

.systembet .validation-errors ul {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
}

.systembet .validation-errors li {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

/* ============================================================================
   AUTO-CALCULATE INDICATOR
   ============================================================================ */
.systembet .auto-calc-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--pf-text-muted);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.systembet .auto-calc-dot {
    width: 8px;
    height: 8px;
    background: var(--pf-success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

.systembet .auto-calc-indicator.calculating .auto-calc-dot {
    animation: pulse 0.5s ease-in-out infinite;
    background: var(--pf-electric);
    box-shadow: 0 0 8px var(--pf-electric-glow);
}

/* ============================================================================
   ACTION BUTTONS
   ============================================================================ */
.systembet .action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.systembet .calculate-btn {
    flex: 1;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--pf-primary) 0%, var(--pf-electric) 100%);
    border: none;
    border-radius: 12px;
    color: #0f172a;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px var(--pf-primary-glow);
}

.systembet .calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--pf-primary-glow);
}

.systembet .reset-btn {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pf-glass-border);
    border-radius: 12px;
    color: var(--pf-text-secondary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.systembet .reset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--pf-text-primary);
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */
.systembet .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 2rem;
    background: rgba(15, 23, 42, 0.3);
    border: 1px dashed var(--pf-glass-border);
    border-radius: 16px;
}

.systembet .empty-state svg {
    color: var(--pf-text-muted);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.systembet .empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--pf-text-secondary);
    margin: 0 0 0.5rem;
}

.systembet .empty-state-desc {
    font-size: 0.875rem;
    color: var(--pf-text-muted);
    margin: 0;
}

/* ============================================================================
   RESULTS CONTAINER
   ============================================================================ */
.systembet .results-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--pf-glass-border);
}

.systembet .results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.systembet .results-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--pf-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.systembet .results-header h2::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--pf-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--pf-primary);
}

/* Results Summary Grid */
.systembet .results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.systembet .result-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.systembet .result-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 191, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Primary Result Card - Now inline, not full-width */
.systembet .result-card.primary {
    background: linear-gradient(145deg, rgba(0, 255, 136, 0.08) 0%, rgba(0, 191, 255, 0.04) 100%);
    border-color: rgba(0, 255, 136, 0.2);
}

.systembet .result-card.primary .result-value {
    font-size: 2rem;
    color: var(--pf-primary);
    text-shadow: 0 0 20px var(--pf-primary-glow);
}

.systembet .result-card .result-label {
    font-size: 0.75rem;
    color: var(--pf-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.systembet .result-card .result-value-group {
    display: flex;
    align-items: baseline;
    gap: 2px;
    justify-content: center;
}

.systembet .result-card.primary .result-value-group {
    justify-content: center;
}

.systembet .result-card .result-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--pf-text-primary);
    line-height: 1.1;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.systembet .result-card .result-value.highlight {
    color: var(--pf-primary);
    text-shadow: 0 0 20px var(--pf-primary-glow);
}

.systembet .result-card .result-value.profit {
    color: var(--pf-success);
}

.systembet .result-card .result-value.loss {
    color: var(--pf-danger);
}

.systembet .result-card .currency-symbol,
.systembet .result-card .unit {
    font-size: 1.25rem;
    color: var(--pf-text-muted);
    font-weight: 600;
}

.systembet .result-card .result-subtext {
    font-size: 0.875rem;
    color: var(--pf-electric);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Value Change Animation (Kelly Style) */
@keyframes valueUpdate {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.systembet .result-value.value-changed {
    animation: valueUpdate 0.4s ease;
}

.systembet .result-value.animated {
    animation: valueUpdate 0.3s ease-out;
}

/* ============================================================================
   BREAKDOWN CONTROLS
   ============================================================================ */
.systembet .breakdown-controls {
    display: inline-flex;
    gap: 0;
    margin-bottom: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    padding: 4px;
    border: 1px solid var(--pf-glass-border);
}

.systembet .breakdown-control-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    color: var(--pf-text-muted);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.systembet .breakdown-control-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--pf-text-primary);
    transform: translateY(-1px);
}

.systembet .breakdown-control-btn:active {
    background: var(--pf-primary);
    color: #0f172a;
    transform: translateY(0);
}

.systembet .breakdown-control-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--pf-electric-glow);
}

.systembet .breakdown-control-btn svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.systembet .breakdown-control-btn:hover svg {
    opacity: 1;
}

/* ============================================================================
   COLLAPSIBLE SECTIONS
   ============================================================================ */
.systembet .bet-breakdown-section {
    margin-top: 1rem;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--pf-glass-border);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.systembet .collapsible-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--pf-text-primary);
    transition: background 0.3s ease;
}

.systembet .collapsible-header:hover {
    background: rgba(0, 255, 136, 0.08);
}

.systembet .collapsible-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.systembet .collapsible-title h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pf-text-primary);
}

.systembet .bet-count-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: rgba(0, 191, 255, 0.15);
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pf-electric);
}

.systembet .collapsible-chevron {
    transition: transform 0.3s ease;
    color: var(--pf-text-muted);
    flex-shrink: 0;
}

.systembet .bet-breakdown-section.expanded .collapsible-chevron {
    transform: rotate(180deg);
}

/* Summary Stats */
.systembet .collapsible-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.systembet .summary-stats {
    color: var(--pf-text-secondary);
}

.systembet .summary-stats .stat-win {
    color: var(--pf-success);
    font-weight: 600;
}

.systembet .summary-stats .stat-loss {
    color: var(--pf-danger);
    font-weight: 600;
}

.systembet .summary-stats .stat-pending {
    color: var(--pf-text-muted);
}

.systembet .summary-return {
    color: var(--pf-primary);
    font-weight: 700;
    white-space: nowrap;
}

/* Collapsible Content */
.systembet .collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 1.25rem;
}

.systembet .bet-breakdown-section.expanded .collapsible-content {
    max-height: 2000px;
    padding: 0 1.25rem 1.25rem;
    transition: max-height 0.5s ease-in, padding 0.3s ease-in;
}

/* Bet Items */
.systembet .bet-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.systembet .bet-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr;
    gap: 1rem;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--pf-glass-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.systembet .bet-item:hover {
    border-color: rgba(0, 191, 255, 0.3);
    background: rgba(15, 23, 42, 0.6);
}

.systembet .bet-item.bet-win {
    border-left: 4px solid var(--pf-success);
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.1) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.systembet .bet-item.bet-loss {
    border-left: 4px solid var(--pf-danger);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.systembet .bet-item.bet-pending {
    border-left: 4px solid var(--pf-text-muted);
}

.systembet .bet-selections {
    color: var(--pf-text-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.systembet .bet-odds {
    color: var(--pf-electric);
    font-weight: 600;
    text-align: center;
    font-size: 0.875rem;
}

.systembet .bet-stake {
    color: var(--pf-text-secondary);
    text-align: center;
    font-size: 0.8125rem;
}

.systembet .bet-return {
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
}

.systembet .bet-return.win {
    color: var(--pf-success);
}

.systembet .bet-return.loss {
    color: var(--pf-danger);
}

.systembet .bet-return.pending {
    color: var(--pf-text-muted);
}

/* Status Badges */
.systembet .bet-status {
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    white-space: nowrap;
}

.systembet .bet-status.status-win {
    background: rgba(34, 197, 94, 0.15);
    color: var(--pf-success);
}

.systembet .bet-status.status-loss {
    background: rgba(239, 68, 68, 0.15);
    color: var(--pf-danger);
}

.systembet .bet-status.status-pending {
    background: rgba(100, 116, 139, 0.15);
    color: var(--pf-text-muted);
}

.systembet .bet-status.status-placed {
    background: rgba(245, 158, 11, 0.15);
    color: var(--pf-warning);
}

.systembet .bet-item.bet-placed {
    border-left: 4px solid var(--pf-warning);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.systembet .bet-return.placed {
    color: var(--pf-warning);
}

.systembet .bet-status.status-void {
    background: rgba(100, 116, 139, 0.15);
    color: var(--pf-text-muted);
}

.systembet .bet-item.bet-void {
    border-left: 4px solid var(--pf-text-muted);
    background: linear-gradient(90deg, rgba(100, 116, 139, 0.1) 0%, rgba(15, 23, 42, 0.4) 100%);
    opacity: 0.7;
}

.systembet .bet-return.void {
    color: var(--pf-text-muted);
}

/* Six-Fold Highlight */
.systembet .six-fold-section {
    margin-top: 1rem;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.02) 100%);
}

.systembet .six-fold-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.systembet .six-fold-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pf-text-primary);
}

.systembet .six-fold-content {
    padding: 1.25rem;
}

/* Copy Button */
.systembet .copy-results-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pf-glass-border);
    border-radius: 8px;
    color: var(--pf-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.systembet .copy-results-btn:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.4);
    color: var(--pf-text-primary);
}

.systembet .copy-results-btn svg {
    width: 16px;
    height: 16px;
}

/* Copy Button Feedback */
.systembet .copy-results-btn.copied {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.4);
    color: var(--pf-primary);
}

.systembet .copy-results-btn.copied svg {
    stroke: var(--pf-primary);
}

/* ============================================================================
   INFO SECTIONS
   ============================================================================ */
.systembet .info-section {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6) 0%, rgba(30, 41, 59, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.systembet .info-section:hover {
    transform: translateY(-4px);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.systembet .info-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pf-text-primary);
    margin: 0 0 1rem;
}

.systembet .info-section p {
    color: var(--pf-text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

/* Formula Box */
.systembet .formula-box {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--pf-glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.25rem;
}

.systembet .formula-box h3 {
    color: var(--pf-text-primary);
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.875rem;
}

.systembet .formula-box p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--pf-text-secondary);
    margin: 0.5rem 0;
}

.systembet .formula-box .example {
    color: var(--pf-primary);
    font-weight: 600;
    margin-top: 0.75rem;
}

/* Tips Grid */
.systembet .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.systembet .tip-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.5) 0%, rgba(30, 41, 59, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.02);
}

.systembet .tip-card:hover {
    border-color: rgba(0, 255, 136, 0.25);
    transform: translateY(-4px);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.04);
}

.systembet .tip-card h4 {
    color: var(--pf-text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.systembet .tip-card p {
    color: var(--pf-text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
}

/* ============================================================================
   FAQ SECTION
   ============================================================================ */
.systembet .faq-section {
    margin-bottom: 2rem;
}

.systembet .faq-section .section-header {
    margin-bottom: 1.5rem;
}

.systembet .faq-section .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pf-text-primary);
    margin: 0;
}

/* ============================================================================
   RELATED TOOLS
   ============================================================================ */
.systembet .related-tools-section {
    margin-top: 2rem;
}

.systembet .related-tools-header {
    margin-bottom: 1.5rem;
}

.systembet .related-tools-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pf-text-primary);
    margin: 0 0 0.5rem;
}

.systembet .related-tools-header p {
    color: var(--pf-text-secondary);
    margin: 0;
}

.systembet .related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.systembet .related-tool-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--pf-glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    transition: all 0.3s;
}

.systembet .related-tool-card:hover {
    border-color: rgba(0, 255, 136, 0.4);
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.7);
}

.systembet .tool-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 191, 255, 0.15) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pf-electric);
    flex-shrink: 0;
}

.systembet .tool-card-content {
    flex: 1;
}

.systembet .tool-card-content h3 {
    color: var(--pf-text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.systembet .tool-card-content p {
    color: var(--pf-text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.systembet .tool-card-arrow {
    color: var(--pf-text-muted);
    transition: transform 0.2s;
}

.systembet .related-tool-card:hover .tool-card-arrow {
    transform: translateX(4px);
    color: var(--pf-primary);
}

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

/* Desktop Enhancement (>= 1024px) */
@media (min-width: 1024px) {
    .systembet {
        max-width: 1400px;
    }

    .systembet .glass-card {
        padding: 2.5rem;
    }

    .systembet .results-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }

    .systembet .result-card.primary .result-value {
        font-size: 2.25rem;
    }

    .systembet .selection-inputs {
        gap: 1.5rem;
    }
}

/* Tablet & Mobile (< 768px) */
@media (max-width: 768px) {
    .systembet {
        padding: 0.75rem 0.75rem 2rem;
    }

    .systembet .calculator-header {
        position: static;
    }

    /* Hide updated date on mobile */
    .systembet .meta-info {
        display: none;
    }

    /* Hide subtitle on mobile - title is self-explanatory */
    .systembet .calculator-subtitle {
        display: none;
    }

    .systembet .glass-card {
        padding: 1.5rem 1rem;
    }

    .systembet .calculator-controls {
        flex-direction: column;
        gap: 1.25rem;
        align-items: stretch;
    }

    .systembet .control-group {
        align-items: flex-start;
    }

    /* Hide control labels on mobile - users understand from context */
    .systembet .control-label {
        display: none;
    }

    .systembet .segmented-control {
        width: 100%;
    }

    .systembet .segment-btn {
        flex: 1;
        text-align: center;
    }

    .systembet .stake-section {
        min-width: 100%;
        align-items: flex-start;
    }

    .systembet .stake-label {
        align-self: flex-start;
    }

    .systembet .stake-calculator {
        flex-wrap: wrap;
        width: 100%;
    }

    .systembet .stake-input-wrapper {
        flex: 0 0 auto;
    }

    .systembet .selection-inputs {
        grid-template-columns: 1fr;
    }

    .systembet .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .systembet .result-card .result-value {
        font-size: 1.5rem;
    }

    .systembet .result-card.primary .result-value {
        font-size: 1.75rem;
    }

    .systembet .bet-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }

    .systembet .bet-odds,
    .systembet .bet-stake,
    .systembet .bet-return {
        text-align: left;
    }

    /* Six-Fold Section Mobile - Add inline labels */
    .systembet .six-fold-content .bet-item {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
    }

    .systembet .six-fold-content .bet-odds,
    .systembet .six-fold-content .bet-stake,
    .systembet .six-fold-content .bet-return {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0;
    }

    .systembet .six-fold-content .bet-odds::before {
        content: 'Odds:';
        color: var(--pf-text-muted);
        font-size: 0.875rem;
        font-weight: 500;
    }

    .systembet .six-fold-content .bet-stake::before {
        content: 'Stake:';
        color: var(--pf-text-muted);
        font-size: 0.875rem;
        font-weight: 500;
    }

    .systembet .six-fold-content .bet-return::before {
        content: 'Return:';
        color: var(--pf-text-muted);
        font-size: 0.875rem;
        font-weight: 500;
    }

    /* Results Header Mobile */
    .systembet .results-header {
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }

    .systembet .results-header h2 {
        font-size: 1rem;
    }

    .systembet .action-buttons {
        flex-direction: column;
    }

    .systembet .calculate-btn,
    .systembet .reset-btn {
        width: 100%;
    }

    .systembet .info-section {
        padding: 1.5rem;
    }

    .systembet .collapsible-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.875rem 1rem;
    }

    .systembet .collapsible-summary {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-left: auto;
    }

    .systembet .collapsible-summary .section-count,
    .systembet .collapsible-summary .section-return {
        font-size: 0.8125rem;
    }

    .systembet .breakdown-controls {
        width: 100%;
    }

    .systembet .breakdown-control-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .systembet .results-grid {
        grid-template-columns: 1fr;
    }

    .systembet .result-card .result-value {
        font-size: 1.375rem;
    }

    .systembet .glass-card,
    .systembet .info-section {
        padding: 1.25rem;
        border-radius: 14px;
    }

    /* Ensure 48px minimum touch targets */
    .systembet .segment-btn,
    .systembet .breakdown-control-btn,
    .systembet .copy-results-btn {
        min-height: 48px;
    }

    .systembet .input-group input,
    .systembet .input-group select {
        font-size: 16px; /* Prevents iOS zoom */
        min-height: 50px;
    }

    .systembet .selection-card {
        padding: 1rem 1.25rem;
    }

    .systembet .bet-status {
        font-size: 0.625rem;
        padding: 0.1875rem 0.5rem;
    }
}

/* ============================================================================
   SCREEN READER ONLY
   ============================================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
