/* --- calculator-base.css --- */
/* Base Calculator Styles - Shared across all sports betting calculators */

/* Base Page Container */
.calculator-page {
    padding: var(--space-lg, 1.5rem) 0;
}

/* Header */
.calculator-header {
    text-align: center;
    margin-bottom: var(--space-2xl, 2.5rem);
    padding-bottom: var(--space-xl, 2rem);
    border-bottom: 3px solid var(--border-color, #2d3548);
}

.calculator-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-sm, 0.5rem);
}

.calculator-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary, #94a3b8);
}

/* Sections */
.calculator-section,
.info-section {
    background: var(--bg-surface, #232838);
    border: 3px solid var(--border-color, #2d3548);
    border-radius: 4px;
    padding: var(--space-2xl, 2.5rem);
    margin-bottom: var(--space-2xl, 2.5rem);
}

.warning-section {
    border-color: #eab308;
    background: rgba(234, 179, 8, 0.05);
}

/* Odds Format Selector */
.odds-format-selector {
    margin-bottom: var(--space-xl, 2rem);
}

.odds-format-selector label {
    display: block;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-md, 1rem);
    font-size: 1.125rem;
}

.format-buttons {
    display: flex;
    gap: var(--space-md, 1rem);
    flex-wrap: wrap;
}

.format-btn {
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    min-height: 48px;
}

.format-btn:hover {
    border-color: var(--accent-primary, #3b82f6);
}

.format-btn.active {
    background: var(--accent-primary, #3b82f6);
    border-color: var(--accent-primary, #3b82f6);
    color: white;
}

/* Stake Input */
.stake-input-group {
    margin-bottom: var(--space-xl, 2rem);
}

.stake-input-group label {
    display: block;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-sm, 0.5rem);
    font-size: 1.125rem;
}

.stake-input-group input,
.stake-input-group select {
    width: 100%;
    max-width: 300px;
    padding: var(--space-md, 1rem);
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    color: var(--text-primary, #ffffff);
    font-size: 1.25rem;
    font-weight: 700;
    min-height: 48px;
}

.stake-input-group input:focus,
.stake-input-group select:focus {
    outline: none;
    border-color: var(--accent-primary, #3b82f6);
}

/* Calculator Form Grid (2-column layout) */
.calculator-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
}

/* Select Elements */
.calculator-select,
select {
    padding: var(--space-md, 1rem);
    background: var(--bg-surface, #232838);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    color: var(--text-primary, #ffffff);
    font-size: 1rem;
    min-height: 48px;
}

/* Bet Input Groups */
.bet-input-group {
    display: flex;
    flex-direction: column;
}

.bet-input-group label {
    font-size: 0.9375rem;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: var(--space-xs, 0.25rem);
    font-weight: 600;
}

.bet-input-group input,
.bet-input-group select {
    padding: var(--space-md, 1rem);
    background: var(--bg-surface, #232838);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    color: var(--text-primary, #ffffff);
    font-size: 1.0625rem;
    min-height: 48px;
}

.bet-input-group input:focus,
.bet-input-group select:focus {
    outline: none;
    border-color: var(--accent-primary, #3b82f6);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: var(--space-md, 1rem);
    flex-wrap: wrap;
}

.calculate-btn {
    flex: 2;
    min-width: 200px;
    padding: var(--space-lg, 1.5rem);
    background: linear-gradient(135deg, var(--accent-primary, #3b82f6), var(--accent-secondary, #8b5cf6));
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    min-height: 48px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Validation Errors */
.validation-errors {
    background: #fee2e2;
    border: 2px solid #ef4444;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    display: none;
}

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

.validation-errors strong {
    color: #dc2626;
    display: block;
    margin-bottom: 0.5rem;
}

.validation-errors ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #dc2626;
}

.validation-errors li {
    margin-bottom: 0.25rem;
}

.error-field {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.field-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

/* Results Container */
.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-top: var(--space-xl, 2rem);
}

.result-card {
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    padding: var(--space-lg, 1.5rem);
    text-align: center;
}

.result-card.primary {
    border-color: var(--accent-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
}

.result-card.full-width {
    grid-column: 1 / -1;
    text-align: left;
}

.result-label {
    font-size: 0.9375rem;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm, 0.5rem);
    font-weight: 600;
}

.result-value {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-xs, 0.25rem);
    white-space: nowrap;
    word-break: keep-all;
}

.result-subtext {
    font-size: 0.9375rem;
    color: var(--text-tertiary, #64748b);
}

/* Leg Breakdown */
.leg-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 0.5rem);
    margin-top: var(--space-md, 1rem);
}

.leg-item {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: var(--space-md, 1rem);
    padding: var(--space-md, 1rem);
    background: var(--bg-surface, #232838);
    border-radius: 4px;
    align-items: center;
}

.leg-desc {
    color: var(--text-primary, #ffffff);
    font-weight: 600;
}

.leg-odds {
    color: var(--text-secondary, #94a3b8);
    font-family: 'Courier New', monospace;
}

.leg-prob {
    color: var(--accent-primary, #3b82f6);
    font-weight: 700;
    text-align: right;
}

/* Info Box */
.info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid var(--accent-primary, #3b82f6);
    border-radius: 4px;
    padding: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
    color: var(--text-primary, #ffffff);
}

/* Formula Box */
.formula-box {
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--accent-primary, #3b82f6);
    border-radius: 4px;
    padding: var(--space-xl, 2rem);
    margin-top: var(--space-lg, 1.5rem);
}

.formula-box h3 {
    color: var(--accent-primary, #3b82f6);
    margin-bottom: var(--space-md, 1rem);
}

.formula-box p {
    color: var(--text-secondary, #94a3b8);
    margin-bottom: var(--space-sm, 0.5rem);
    line-height: 1.6;
}

.formula-box .example {
    font-family: 'Courier New', monospace;
    color: var(--text-tertiary, #64748b);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
}

.info-card {
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    padding: var(--space-lg, 1.5rem);
}

.info-card h3 {
    color: var(--accent-primary, #3b82f6);
    margin-bottom: var(--space-md, 1rem);
    font-size: 1.25rem;
}

.info-card p {
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
    margin-bottom: var(--space-sm, 0.5rem);
    font-size: 1rem;
}

.info-card .note {
    font-size: 0.9375rem;
    color: var(--text-tertiary, #64748b);
    font-style: italic;
    margin-top: var(--space-sm, 0.5rem);
}

/* Risk Grid */
.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
}

.risk-card {
    background: var(--bg-card, #1a1f2e);
    border: 2px solid #eab308;
    border-radius: 4px;
    padding: var(--space-lg, 1.5rem);
}

.risk-card h4 {
    color: #eab308;
    margin-bottom: var(--space-md, 1rem);
}

.risk-card p {
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
    margin-bottom: var(--space-sm, 0.5rem);
}

/* Strategy Box */
.strategy-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
}

.strategy {
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    padding: var(--space-lg, 1.5rem);
}

.strategy.good {
    border-color: #28a745;
}

.strategy.bad {
    border-color: #dc3545;
}

.strategy h4 {
    margin-bottom: var(--space-md, 1rem);
}

.strategy.good h4 {
    color: #28a745;
}

.strategy.bad h4 {
    color: #dc3545;
}

.strategy ul {
    list-style-position: inside;
    color: var(--text-secondary, #94a3b8);
}

.strategy li {
    margin-bottom: var(--space-sm, 0.5rem);
}

/* Math Examples */
.math-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
}

.math-example {
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--accent-secondary, #8b5cf6);
    border-radius: 4px;
    padding: var(--space-lg, 1.5rem);
}

.math-example h4 {
    color: var(--accent-secondary, #8b5cf6);
    margin-bottom: var(--space-md, 1rem);
}

.math-example p {
    color: var(--text-secondary, #94a3b8);
    margin-bottom: var(--space-xs, 0.25rem);
    font-family: 'Courier New', monospace;
    line-height: 1.8;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
}

.tip-card {
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--accent-primary, #3b82f6);
    border-radius: 4px;
    padding: var(--space-lg, 1.5rem);
}

.tip-card h4 {
    color: var(--accent-primary, #3b82f6);
    margin-bottom: var(--space-md, 1rem);
}

.tip-card p {
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
}

.tooltip {
    cursor: help;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .calculator-form-grid {
        grid-template-columns: 1fr;
    }

    .results-container {
        grid-template-columns: 1fr;
    }

    .leg-item {
        grid-template-columns: 1fr;
        gap: var(--space-xs, 0.25rem);
    }

    .leg-prob {
        text-align: left;
    }

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

    .calculate-btn {
        min-width: unset;
    }
}


/* --- advanced-calculators.css --- */
/* Advanced Calculators Shared Styles */

.advanced-calculator-page {
    padding: var(--space-xl, 2rem) 0;
}

.calculator-header {
    text-align: center;
    margin-bottom: var(--space-3xl, 4rem);
}

.calculator-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--pf-text-primary, #f5f5f5);
    margin-bottom: var(--space-md, 1rem);
    letter-spacing: -0.02em;
}

.calculator-subtitle {
    font-size: 1.125rem;
    color: var(--pf-text-secondary, #c4c4c4);
    max-width: 600px;
    margin: 0 auto;
}

/* Calculator Grid Layout */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl, 3rem);
    margin-bottom: var(--space-3xl, 4rem);
}

@media (max-width: 968px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

/* Inputs Section */
.calculator-inputs {
    background: var(--pf-bg-card, #1e2330);
    border: 2px solid var(--pf-border, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: var(--space-2xl, 3rem);
}

.section-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pf-text-primary, #f5f5f5);
    margin-bottom: var(--space-md, 1rem);
}

.section-description {
    font-size: 0.95rem;
    color: var(--pf-text-secondary, #c4c4c4);
    margin-bottom: var(--space-xl, 2rem);
    line-height: 1.6;
}

.input-group {
    margin-bottom: var(--space-lg, 1.5rem);
}

.input-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pf-text-primary, #f5f5f5);
    margin-bottom: var(--space-xs, 0.5rem);
}

.calculator-input {
    width: 100%;
    padding: var(--space-md, 1rem);
    background: var(--pf-bg-primary, #1a1d29);
    border: 2px solid var(--pf-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    color: var(--pf-text-primary, #f5f5f5);
    font-size: 1rem;
    font-family: var(--font-body, 'Inter', sans-serif);
    transition: all 0.2s ease;
}

.calculator-input:focus {
    outline: none;
    border-color: var(--pf-primary, #00ff88);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.input-hint {
    display: block;
    font-size: 0.875rem;
    color: var(--pf-text-muted, #9ca3af);
    margin-top: var(--space-xs, 0.5rem);
}

.btn-calculate {
    width: 100%;
    padding: var(--space-md, 1rem) var(--space-xl, 2rem);
    background: linear-gradient(135deg, var(--pf-primary, #00ff88) 0%, var(--pf-electric, #00bfff) 100%);
    color: var(--pf-bg-primary, #0a0a0a);
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: var(--space-lg, 1.5rem);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 255, 136, 0.3);
}

/* Results Section */
.calculator-results {
    background: var(--pf-bg-card, #1e2330);
    border: 2px solid var(--pf-border, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: var(--space-2xl, 3rem);
}

.results-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pf-text-primary, #f5f5f5);
    margin-bottom: var(--space-lg, 1.5rem);
}

.result-card {
    background: var(--pf-bg-elevated, #2d3348);
    border: 1px solid var(--pf-border, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-md, 1rem);
}

.result-card.highlight {
    border: 2px solid var(--pf-primary, #00ff88);
    background: rgba(0, 255, 136, 0.05);
}

.result-label {
    font-size: 0.875rem;
    color: var(--pf-text-secondary, #c4c4c4);
    margin-bottom: var(--space-xs, 0.5rem);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 2rem;
    font-weight: 800;
    color: var(--pf-text-primary, #f5f5f5);
    line-height: 1.2;
}

.result-value.success {
    color: var(--pf-primary, #00ff88);
}

.result-value.positive {
    color: var(--pf-primary, #00ff88);
}

.result-value.danger {
    color: var(--accent-danger, #ef4444);
}

.result-value.negative {
    color: var(--accent-danger, #ef4444);
}

.result-value.warning {
    color: var(--accent-warning, #f59e0b);
}

.result-value.extreme {
    color: #ff0066;
}

.result-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--pf-text-muted, #9ca3af);
    margin-top: var(--space-xs, 0.5rem);
}

/* Recommendation Box */
.recommendation-box {
    background: var(--pf-bg-elevated, #2d3348);
    border: 2px solid var(--pf-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    padding: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
}

.recommendation-box h4 {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-md, 1rem);
}

.recommendation-box h4.success {
    color: var(--pf-primary, #00ff88);
}

.recommendation-box h4.warning {
    color: var(--accent-warning, #f59e0b);
}

.recommendation-box h4.danger {
    color: var(--accent-danger, #ef4444);
}

.recommendation-box ul {
    margin: var(--space-md, 1rem) 0;
    padding-left: var(--space-xl, 2rem);
}

.recommendation-box li {
    margin-bottom: var(--space-sm, 0.75rem);
    color: var(--pf-text-secondary, #c4c4c4);
}

/* Visualizations */
.risk-visualization,
.variance-info,
.bonus-breakdown,
.significance-info {
    background: var(--pf-bg-primary, #1a1d29);
    border: 1px solid var(--pf-border, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
}

.risk-visualization h4,
.variance-info h4,
.bonus-breakdown h4,
.significance-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pf-text-primary, #f5f5f5);
    margin-bottom: var(--space-md, 1rem);
}

.risk-bar {
    display: flex;
    width: 100%;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin: var(--space-md, 1rem) 0;
}

.risk-bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    transition: all 0.3s ease;
}

.risk-bar-segment.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.risk-bar-segment.success {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
}

.risk-legend {
    display: flex;
    gap: var(--space-lg, 1.5rem);
    margin-top: var(--space-md, 1rem);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs, 0.5rem);
    font-size: 0.875rem;
    color: var(--pf-text-secondary, #c4c4c4);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.danger {
    background: #ef4444;
}

.legend-color.success {
    background: #00ff88;
}

/* Breakdown Table */
.breakdown-table {
    margin-top: var(--space-md, 1rem);
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm, 0.75rem) 0;
    border-bottom: 1px solid var(--pf-border, rgba(255, 255, 255, 0.08));
}

.breakdown-row.total {
    border-top: 2px solid var(--pf-primary, #00ff88);
    border-bottom: none;
    margin-top: var(--space-sm, 0.75rem);
    padding-top: var(--space-md, 1rem);
}

/* Fallacy Demonstrator Specific */
.fallacy-simulator {
    background: var(--pf-bg-card, #1e2330);
    border: 2px solid var(--pf-border, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: var(--space-2xl, 3rem);
    margin-bottom: var(--space-3xl, 4rem);
}

.simulator-header {
    text-align: center;
    margin-bottom: var(--space-xl, 2rem);
}

.simulator-controls {
    display: flex;
    gap: var(--space-md, 1rem);
    justify-content: center;
    margin-bottom: var(--space-xl, 2rem);
    flex-wrap: wrap;
}

.simulator-results {
    margin-top: var(--space-2xl, 3rem);
}

.result-display {
    text-align: center;
    margin-bottom: var(--space-2xl, 3rem);
}

.flip-result {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-md, 1rem);
    border-radius: 50%;
    background: var(--pf-bg-elevated, #2d3348);
    border: 4px solid var(--pf-border, rgba(255, 255, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--pf-text-primary, #f5f5f5);
    transition: all 0.3s ease;
}

.flip-result.heads {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    border-color: #00ff88;
    color: #0a0a0a;
}

.flip-result.tails {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    color: white;
}

.statistics-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-md, 1rem);
    margin-bottom: var(--space-xl, 2rem);
}

.stat-item {
    background: var(--pf-bg-elevated, #2d3348);
    border: 1px solid var(--pf-border, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: var(--space-md, 1rem);
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--pf-text-secondary, #c4c4c4);
    margin-bottom: var(--space-xs, 0.5rem);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pf-text-primary, #f5f5f5);
}

.stat-percentage {
    font-size: 0.9rem;
    color: var(--pf-text-muted, #9ca3af);
    margin-top: var(--space-xs, 0.5rem);
}

.flip-history {
    margin-top: var(--space-xl, 2rem);
}

.history-items {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: var(--space-md, 1rem);
}

.history-item {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.history-item.heads {
    background: #00ff88;
    color: #0a0a0a;
}

.history-item.tails {
    background: #ef4444;
}

.fallacy-truth {
    margin-top: var(--space-2xl, 3rem);
    padding-top: var(--space-2xl, 3rem);
    border-top: 2px solid var(--pf-border, rgba(255, 255, 255, 0.1));
}

.truth-box {
    background: rgba(0, 255, 136, 0.05);
    border: 2px solid var(--pf-primary, #00ff88);
    border-radius: 8px;
    padding: var(--space-xl, 2rem);
}

.truth-box .highlight {
    color: var(--pf-primary, #00ff88);
}

.truth-box .big-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--pf-primary, #00ff88);
    text-align: center;
    margin: var(--space-md, 1rem) 0;
}

/* Fallacy Examples */
.fallacy-examples {
    margin-top: var(--space-3xl, 4rem);
}

.fallacy-examples h2 {
    text-align: center;
    margin-bottom: var(--space-2xl, 3rem);
}

.fallacy-card {
    background: var(--pf-bg-card, #1e2330);
    border: 2px solid var(--pf-border, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: var(--space-xl, 2rem);
    margin-bottom: var(--space-lg, 1.5rem);
}

.fallacy-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md, 1rem);
}

.fallacy-myth {
    color: var(--accent-danger, #ef4444);
    margin-bottom: var(--space-md, 1rem);
}

.fallacy-truth {
    color: var(--pf-primary, #00ff88);
}

/* Crypto Tax Calculator Specific */
.transaction-entry,
.transaction-history,
.tax-summary {
    background: var(--pf-bg-card, #1e2330);
    border: 2px solid var(--pf-border, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: var(--space-2xl, 3rem);
    margin-bottom: var(--space-xl, 2rem);
}

.transaction-form {
    margin-top: var(--space-lg, 1.5rem);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-lg, 1.5rem);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg, 1.5rem);
}

.history-actions {
    display: flex;
    gap: var(--space-md, 1rem);
}

.transactions-table {
    overflow-x: auto;
}

.transactions-table table {
    width: 100%;
    border-collapse: collapse;
}

.transactions-table th,
.transactions-table td {
    padding: var(--space-md, 1rem);
    text-align: left;
    border-bottom: 1px solid var(--pf-border, rgba(255, 255, 255, 0.08));
}

.transactions-table th {
    font-weight: 700;
    color: var(--pf-text-primary, #f5f5f5);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.type-badge.positive {
    background: rgba(0, 255, 136, 0.2);
    color: var(--pf-primary, #00ff88);
}

.type-badge.negative {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger, #ef4444);
}

.btn-delete {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--accent-danger, #ef4444);
    color: var(--accent-danger, #ef4444);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: var(--accent-danger, #ef4444);
    color: white;
}

.no-data {
    text-align: center;
    padding: var(--space-2xl, 3rem);
    color: var(--pf-text-muted, #9ca3af);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-xl, 2rem);
}

.summary-card {
    background: var(--pf-bg-elevated, #2d3348);
    border: 1px solid var(--pf-border, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: var(--space-lg, 1.5rem);
    text-align: center;
}

.summary-card.highlight {
    border: 2px solid var(--pf-primary, #00ff88);
    background: rgba(0, 255, 136, 0.05);
}

.summary-label {
    font-size: 0.875rem;
    color: var(--pf-text-secondary, #c4c4c4);
    margin-bottom: var(--space-sm, 0.75rem);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--pf-text-primary, #f5f5f5);
}

.tax-notes {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--accent-danger, #ef4444);
    border-radius: 8px;
    padding: var(--space-lg, 1.5rem);
    margin-top: var(--space-xl, 2rem);
}

.tax-notes h3 {
    color: var(--accent-danger, #ef4444);
    margin-bottom: var(--space-md, 1rem);
}

/* Alternatives Grid */
.alternatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md, 1rem);
    margin: var(--space-lg, 1.5rem) 0;
}

.alt-card {
    background: var(--pf-bg-elevated, #2d3348);
    border: 2px solid var(--pf-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    padding: var(--space-lg, 1.5rem);
    text-align: center;
}

.alt-label {
    font-size: 0.8rem;
    color: var(--pf-text-secondary, #c4c4c4);
    margin-bottom: var(--space-xs, 0.5rem);
    text-transform: uppercase;
}

.alt-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pf-primary, #00ff88);
    margin-bottom: var(--space-xs, 0.5rem);
}

.alt-gain {
    font-size: 1rem;
    color: var(--pf-text-primary, #f5f5f5);
    margin-bottom: var(--space-sm, 0.75rem);
}

.alt-desc {
    font-size: 0.875rem;
    color: var(--pf-text-muted, #9ca3af);
}

.alternatives-note {
    margin-top: var(--space-md, 1rem);
    font-size: 0.9rem;
    color: var(--pf-text-secondary, #c4c4c4);
    text-align: center;
}

/* Sample Size Table */
.sample-size-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg, 1.5rem) 0;
}

.sample-size-table th,
.sample-size-table td {
    padding: var(--space-md, 1rem);
    text-align: left;
    border-bottom: 1px solid var(--pf-border, rgba(255, 255, 255, 0.08));
}

.sample-size-table th {
    font-weight: 700;
    color: var(--pf-text-primary, #f5f5f5);
    background: var(--pf-bg-elevated, #2d3348);
}

/* Utility Classes */
.warning-text {
    color: var(--accent-warning, #f59e0b);
}

/* Calculator Info Sections - Educational Content */
.calculator-info {
    background: var(--pf-bg-card, #1e2330);
    border: 2px solid var(--pf-border, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: var(--space-2xl, 3rem);
    margin-top: var(--space-3xl, 4rem);
}

.calculator-info:first-of-type {
    margin-top: var(--space-3xl, 4rem);
}

.info-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--pf-text-primary, #f5f5f5);
    margin-bottom: var(--space-xl, 2rem);
    text-align: center;
    position: relative;
    padding-bottom: var(--space-md, 1rem);
}

.info-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--pf-primary, #00ff88) 0%, var(--pf-electric, #00bfff) 100%);
    border-radius: 2px;
}

.info-section {
    margin-bottom: var(--space-2xl, 3rem);
    padding: var(--space-xl, 2rem);
    background: var(--pf-bg-elevated, #2d3348);
    border-left: 4px solid var(--pf-primary, #00ff88);
    border-radius: 8px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pf-primary, #00ff88);
    margin-bottom: var(--space-md, 1rem);
}

.info-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--pf-text-secondary, #c4c4c4);
    margin-bottom: var(--space-md, 1rem);
}

.info-section p:last-child {
    margin-bottom: 0;
}

.info-section ul,
.info-section ol {
    margin: var(--space-md, 1rem) 0;
    padding-left: var(--space-xl, 2rem);
}

.info-section li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--pf-text-secondary, #c4c4c4);
    margin-bottom: var(--space-sm, 0.75rem);
}

.info-section li strong {
    color: var(--pf-text-primary, #f5f5f5);
    font-weight: 600;
}

.info-section ol {
    counter-reset: item;
    padding-left: var(--space-lg, 1.5rem);
}

.info-section ol li {
    counter-increment: item;
    position: relative;
    padding-left: var(--space-md, 1rem);
}

.info-section ol li::before {
    content: counter(item);
    position: absolute;
    left: calc(-1 * var(--space-xl, 2rem));
    top: 0;
    background: var(--pf-primary, #00ff88);
    color: var(--pf-bg-primary, #0a0a0a);
    font-weight: 700;
    font-size: 0.875rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Mobile Responsiveness for Info Sections */
@media (max-width: 768px) {
    .calculator-info {
        padding: var(--space-xl, 2rem) var(--space-lg, 1.5rem);
        margin-top: var(--space-2xl, 3rem);
    }

    .info-title {
        font-size: 1.5rem;
    }

    .info-section {
        padding: var(--space-lg, 1.5rem);
    }

    .info-section h3 {
        font-size: 1.125rem;
    }
}

/* ============================================================================
   UNIFIED FAQ SECTION - Professional Accordion Style
   ============================================================================ */
.faq-section {
    margin-top: 4rem;
}

.faq-section .section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.faq-section .section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--tools-text, #f8fafc);
    margin: 0;
}

.pf-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.pf-accordion-item {
    border-bottom: 1px solid var(--tools-border, rgba(255, 255, 255, 0.08));
}

.pf-accordion-item:first-child {
    border-top: 1px solid var(--tools-border, rgba(255, 255, 255, 0.08));
}

.pf-accordion-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: all 0.2s ease;
}

.pf-accordion-summary::-webkit-details-marker {
    display: none;
}

.pf-accordion-summary:hover {
    color: var(--pf-primary, #00ff88);
}

.pf-accordion-summary:hover .pf-accordion-icon {
    stroke: var(--pf-primary, #00ff88);
}

.pf-accordion-question {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tools-text, #f8fafc);
    line-height: 1.4;
}

.pf-accordion-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    stroke: var(--tools-muted, rgba(255, 255, 255, 0.65));
    transition: all 0.3s ease;
}

.pf-accordion-item[open] .pf-accordion-icon {
    transform: rotate(45deg);
}

.pf-accordion-content {
    padding: 0 0 1.5rem 0;
    color: var(--tools-muted, rgba(255, 255, 255, 0.65));
    line-height: 1.7;
}

.pf-accordion-content p {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.pf-accordion-content p:last-child {
    margin-bottom: 0;
}

/* ============================================================================
   UNIFIED RELATED TOOLS SECTION - Professional Card Grid
   ============================================================================ */
.related-tools-section {
    margin-top: 4rem;
    padding: 3rem 0;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.related-tools-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--tools-text, #f8fafc);
    margin: 0 0 0.75rem;
}

.related-tools-header p {
    color: var(--tools-muted, rgba(255, 255, 255, 0.65));
    font-size: 1.05rem;
    margin: 0;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.related-tool-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(145deg, rgba(13, 17, 26, 0.8) 0%, rgba(15, 21, 32, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.related-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--pf-primary, #00ff88) 0%, var(--pf-electric, #00bfff) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-tool-card:hover {
    background: linear-gradient(145deg, rgba(13, 17, 26, 1) 0%, rgba(15, 21, 32, 1) 100%);
    border-color: rgba(56, 189, 248, 0.25);
    transform: translateX(6px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.related-tool-card:hover::before {
    opacity: 1;
}

.tool-card-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 191, 255, 0.1) 100%);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tool-card-icon svg {
    stroke: var(--pf-primary, #00ff88);
    transition: all 0.3s ease;
}

.related-tool-card:hover .tool-card-icon {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 191, 255, 0.2) 100%);
    border-color: rgba(0, 255, 136, 0.4);
    transform: scale(1.05);
}

.related-tool-card:hover .tool-card-icon svg {
    stroke: var(--pf-electric, #00bfff);
}

.tool-card-content {
    flex: 1;
    min-width: 0;
}

.tool-card-content h3 {
    color: var(--tools-text, #f8fafc);
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.related-tool-card:hover .tool-card-content h3 {
    color: var(--pf-primary, #00ff88);
}

.tool-card-content p {
    color: var(--tools-muted, rgba(255, 255, 255, 0.65));
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.5;
    opacity: 0.85;
}

.tool-card-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.tool-card-arrow svg {
    stroke: var(--tools-muted, rgba(255, 255, 255, 0.65));
    transition: all 0.3s ease;
    opacity: 0.5;
}

.related-tool-card:hover .tool-card-arrow {
    background: rgba(0, 255, 136, 0.15);
    transform: translateX(4px);
}

.related-tool-card:hover .tool-card-arrow svg {
    stroke: var(--pf-primary, #00ff88);
    opacity: 1;
}

/* Responsive for FAQ and Related Tools */
@media (max-width: 768px) {
    .related-tools-grid {
        grid-template-columns: 1fr;
    }

    .related-tool-card {
        padding: 1.25rem 1.5rem;
    }

    .tool-card-icon {
        width: 46px;
        height: 46px;
    }

    .tool-card-arrow {
        display: none;
    }

    .pf-accordion-question {
        font-size: 1rem;
    }
}
