/**
 * Labouchere System Calculator - Professional Styling
 * Matches Dyutam Neo-Brutal Theme
 * Version: 1.0.0
 */

.labouchere-calculator-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-2xl, 3rem) var(--space-md, 1rem);
}

/* Header */
.calculator-header {
    text-align: center;
    margin-bottom: var(--space-3xl, 4rem);
    padding-bottom: var(--space-2xl, 3rem);
    border-bottom: 3px solid var(--accent-electric, #00ff88);
}

.calculator-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md, 1rem);
    letter-spacing: -0.02em;
}

.calculator-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary, #a0a0a0);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Calculator Section */
.calculator-section {
    margin-bottom: var(--space-3xl, 4rem);
}

/* Warning Box */
.parlay-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
    border: 2px solid rgba(251, 191, 36, 0.4);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.warning-icon {
    flex-shrink: 0;
    color: #fbbf24;
}

.warning-content {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.6;
}

.warning-content strong {
    color: #fbbf24;
    display: block;
    margin-bottom: 0.25rem;
}

/* 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;
    }
}

/* Input Section */
.calculator-inputs,
.calculator-results {
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 12px;
    padding: var(--space-2xl, 3rem);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-md, 1rem);
}

.section-description {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.6;
    margin-bottom: var(--space-xl, 2rem);
}

/* Input Groups */
.input-group {
    margin-bottom: var(--space-lg, 1.5rem);
}

.input-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-sm, 0.5rem);
    font-size: 0.95rem;
}

.calculator-input {
    width: 100%;
    padding: var(--space-md, 1rem);
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 8px;
    color: var(--text-primary, #ffffff);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.calculator-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-tertiary, #666);
    margin-top: var(--space-xs, 0.25rem);
    font-style: italic;
}

/* Calculate Button */
.btn-calculate {
    width: 100%;
    padding: var(--space-md, 1rem) var(--space-xl, 2rem);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    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(16, 185, 129, 0.3);
}

.btn-calculate:active {
    transform: translateY(0);
}

/* Results Section */
.results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-lg, 1.5rem);
    padding-bottom: var(--space-md, 1rem);
    border-bottom: 2px solid var(--border-subtle, #333);
}

.result-card {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-md, 1rem);
    transition: all 0.3s ease;
}

.result-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
}

.result-card.highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.5);
}

.result-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, #a0a0a0);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs, 0.25rem);
}

.result-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-xs, 0.25rem);
}

.result-value.success {
    color: #22c55e;
}

.result-value.warning {
    color: #fbbf24;
}

.result-value.danger {
    color: #ef4444;
}

.result-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary, #666);
    font-style: italic;
}

/* Recommendation Box */
.recommendation-box {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
}

.recommendation-box h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-md, 1rem);
}

.recommendation-box h4.success {
    color: #22c55e;
}

.recommendation-box h4.warning {
    color: #fbbf24;
}

.recommendation-box h4.danger {
    color: #ef4444;
}

.recommendation-box p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.6;
    margin-bottom: var(--space-md, 1rem);
}

.recommendation-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommendation-box ul li {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.8;
    padding-left: 1.5rem;
    position: relative;
}

.recommendation-box ul li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #10b981;
    font-weight: bold;
}

.recommendation-box ul li strong {
    color: var(--text-primary, #ffffff);
}

/* Educational Sections */
.info-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 12px;
}

.info-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: 1rem;
}

.info-section p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.info-section p strong {
    color: var(--text-primary, #ffffff);
}

/* Formula Box - Pattern A */
.formula-box {
    background: var(--bg-elevated, #242424);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.formula-box h3 {
    font-size: 1.1rem;
    color: #10b981;
    margin-bottom: 0.75rem;
}

.formula-box p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.formula-box p strong {
    color: var(--text-primary, #ffffff);
}

.formula-box ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.formula-box ul li {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.8;
    padding-left: 1.5rem;
    position: relative;
}

.formula-box ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #10b981;
}

.formula-box p.example {
    font-style: italic;
    color: var(--text-tertiary, #666);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle, #333);
}

/* Info Card Grid - Pattern B */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 968px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: #10b981;
    transform: translateY(-2px);
}

.info-card h3 {
    font-size: 1.2rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.info-card p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.info-card p strong {
    color: var(--text-primary, #ffffff);
}

.info-card p.note {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-tertiary, #666);
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle, #333);
}

/* Risk Grid - Pattern C */
.warning-section h2 {
    color: #fbbf24;
}

.risk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .risk-grid {
        grid-template-columns: 1fr;
    }
}

.risk-card {
    background: var(--bg-elevated, #242424);
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
}

.risk-card h4 {
    font-size: 1.1rem;
    color: #fbbf24;
    margin-bottom: 0.75rem;
}

.risk-card p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
}

/* Strategy Box - Pattern D (Good vs Bad) */
.strategy-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .strategy-box {
        grid-template-columns: 1fr;
    }
}

.strategy {
    background: var(--bg-elevated, #242424);
    border-radius: 10px;
    padding: 1.5rem;
}

.strategy h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.strategy ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.strategy ul li {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.8;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.strategy.good {
    border: 2px solid rgba(34, 197, 94, 0.4);
}

.strategy.good h4 {
    color: #22c55e;
}

.strategy.good ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

.strategy.bad {
    border: 2px solid rgba(239, 68, 68, 0.4);
}

.strategy.bad h4 {
    color: #ef4444;
}

.strategy.bad ul li::before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: bold;
}

/* Math Examples - Pattern E */
.math-examples {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 968px) {
    .math-examples {
        grid-template-columns: 1fr;
    }
}

.math-example {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.math-example:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.math-example h4 {
    font-size: 1rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.math-example p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.math-example p strong {
    color: var(--text-primary, #ffffff);
}

/* Tips Grid - Pattern F */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 968px) {
    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

.tip-card {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tip-card:hover {
    border-color: #10b981;
    transform: translateY(-2px);
}

.tip-card h4 {
    font-size: 1rem;
    color: #10b981;
    margin-bottom: 0.75rem;
}

.tip-card p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* FAQ Section */
.faq-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 12px;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header .section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
}

.pf-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pf-accordion-item {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pf-accordion-item:hover {
    border-color: rgba(16, 185, 129, 0.4);
}

.pf-accordion-item[open] {
    border-color: #10b981;
}

.pf-accordion-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.pf-accordion-summary::-webkit-details-marker {
    display: none;
}

.pf-accordion-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    flex: 1;
}

.pf-accordion-icon {
    flex-shrink: 0;
    color: #10b981;
    transition: transform 0.3s ease;
    margin-left: 1rem;
}

.pf-accordion-item[open] .pf-accordion-icon {
    transform: rotate(45deg);
}

.pf-accordion-content {
    padding: 0 1.5rem 1.25rem;
}

.pf-accordion-content p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
    margin: 0;
}

/* Related Tools Section */
.related-tools-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 12px;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 2rem;
}

.related-tools-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: 0.5rem;
}

.related-tools-header p {
    color: var(--text-secondary, #a0a0a0);
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}

.related-tool-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-tool-card:hover {
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.tool-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    color: #10b981;
}

.tool-card-content {
    flex: 1;
}

.tool-card-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 0.25rem;
}

.tool-card-content p {
    font-size: 0.85rem;
    color: var(--text-secondary, #a0a0a0);
    margin: 0;
}

.tool-card-arrow {
    flex-shrink: 0;
    color: var(--text-tertiary, #666);
    transition: all 0.3s ease;
}

.related-tool-card:hover .tool-card-arrow {
    color: #10b981;
    transform: translateX(4px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .labouchere-calculator-page {
        padding: var(--space-xl, 2rem) var(--space-md, 1rem);
    }

    .calculator-header {
        margin-bottom: var(--space-2xl, 3rem);
        padding-bottom: var(--space-xl, 2rem);
    }

    .calculator-title {
        font-size: 1.75rem;
    }

    .calculator-subtitle {
        font-size: 1rem;
    }

    .info-section,
    .faq-section,
    .related-tools-section {
        padding: 1.5rem;
    }

    .info-section h2,
    .section-header .section-title {
        font-size: 1.5rem;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 1.5rem;
    }

    .result-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .parlay-warning-box {
        flex-direction: column;
        text-align: center;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 1.25rem;
    }
}
