/* Mines Calculator Demo - Polished UI/UX */

:root {
    --tools-bg: #05080f;
    --tools-card: #0d111a;
    --tools-card-alt: #0f1520;
    --tools-border: rgba(255, 255, 255, 0.08);
    --tools-muted: rgba(255, 255, 255, 0.65);
    --tools-highlight: #38bdf8;
    --tools-accent: #22d3ee;
    --tools-success: #4ade80;
    --tools-warning: #fbbf24;
    --tools-danger: #f87171;
    --tools-text: #f8fafc;
}

/* Page Container */
.mines-calculator-page {
    padding: 1.5rem 1.5rem;
    color: var(--tools-text);
    max-width: 1600px;
    margin: 0 auto;
}

/* Header Section */
.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.calculator-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--pf-primary, #00ff88) 0%, var(--pf-electric, #00bfff) 50%, var(--pf-accent, #8b5cf6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-lg, 1.5rem);
    letter-spacing: -0.02em;
}

.calculator-subtitle {
    font-size: 1.05rem;
    color: var(--tools-muted);
    max-width: 100%;
    margin: 0;
    line-height: 1.6;
}

/* Quick Calculator Section */
.quick-calculator {
    margin-bottom: 3rem;
}

.quick-calc-container {
    background: linear-gradient(145deg, #0d111a 0%, #0f1520 100%);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 24px;
    padding: 0;
    display: grid;
    grid-template-columns: 380px 1fr;
    overflow: hidden;
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(56, 189, 248, 0.08);
}

.quick-calc-inputs {
    padding: 2.5rem;
    background: rgba(15, 21, 32, 0.5);
    border-right: 1px solid rgba(56, 189, 248, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.input-row label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--tools-muted);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    min-width: 120px;
}

.input-row label svg {
    stroke: var(--tools-highlight);
    opacity: 0.8;
    flex-shrink: 0;
}

.input-row input {
    width: 140px;
    background: var(--tools-card);
    border: 2px solid rgba(56, 189, 248, 0.2);
    color: var(--tools-text);
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s ease;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.input-row input:focus {
    outline: none;
    border-color: var(--tools-highlight);
    background: rgba(56, 189, 248, 0.05);
    box-shadow:
        0 0 0 4px rgba(56, 189, 248, 0.15),
        0 4px 16px rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

/* Input validation error animation */
.input-error {
    animation: shakeInput 0.5s ease;
    border-color: var(--tools-danger) !important;
    background: rgba(248, 113, 113, 0.1) !important;
}

@keyframes shakeInput {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.input-row input:hover:not(:focus) {
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.03);
}

.quick-calc-results {
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.quick-calc-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.result-main {
    text-align: center;
    position: relative;
    z-index: 1;
}

.result-multiplier {
    font-size: 4.5rem;
    font-weight: 900;
    font-family: 'SF Mono', 'Monaco', monospace;
    background: linear-gradient(135deg, var(--tools-success) 0%, #22c55e 50%, var(--tools-highlight) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 20px rgba(74, 222, 128, 0.6));
    letter-spacing: -0.02em;
}

.result-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tools-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.result-secondary {
    display: flex;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.result-sec-item {
    text-align: center;
}

.result-sec-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--tools-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.result-sec-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--tools-text);
    font-family: 'SF Mono', 'Monaco', monospace;
}

/* Interactive Simulator - Unified Card */
.interactive-simulator-card {
    background: linear-gradient(145deg, #0d111a 0%, #0f1520 100%);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 4rem;
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(56, 189, 248, 0.08);
}

.simulator-header {
    text-align: center;
    padding: 2.5rem 2.5rem 2rem;
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.03) 0%, transparent 100%);
}

.simulator-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    color: var(--tools-text);
    margin: 0 0 0.5rem;
}

.simulator-header p {
    color: var(--tools-muted);
    font-size: 1.05rem;
    margin: 0;
}

.simulator-body {
    display: grid;
    grid-template-columns: 1fr 380px 280px;
    gap: 2.5rem;
    padding: 2.5rem;
    align-items: start;
}

/* Grid Section */
.simulator-grid-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 21, 32, 0.4);
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.08);
}

.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.06), rgba(34, 211, 238, 0.06));
    padding: 18px;
    border-radius: 20px;
    border: 2px solid rgba(56, 189, 248, 0.2);
    box-shadow:
        inset 0 2px 12px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(56, 189, 248, 0.1);
}

.grid-hint {
    text-align: center;
    color: var(--tools-muted);
    font-size: 0.9rem;
    margin: 1.25rem 0 0;
    opacity: 0.8;
}

.mine-tile {
    background: linear-gradient(145deg, #0f1520, #0d111a);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    padding: 0;
    outline: none;
    font-size: 0;
    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mine-tile:hover:not(.revealed) {
    transform: translateY(-6px) scale(1.05);
    border-color: var(--tools-highlight);
    box-shadow:
        0 12px 32px rgba(56, 189, 248, 0.4),
        0 0 0 4px rgba(56, 189, 248, 0.1);
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.18), rgba(34, 211, 238, 0.18));
}

.mine-tile:active:not(.revealed) {
    transform: translateY(-3px) scale(0.98);
}

.mine-tile.revealed {
    background: linear-gradient(145deg, rgba(74, 222, 128, 0.25), rgba(34, 197, 94, 0.25));
    border-color: var(--tools-success);
    border-width: 3px;
    transform: scale(0.96);
    box-shadow:
        0 8px 28px rgba(74, 222, 128, 0.35),
        inset 0 2px 12px rgba(74, 222, 128, 0.15),
        0 0 0 4px rgba(74, 222, 128, 0.1);
}

.mine-tile.revealed::after {
    content: '💎';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.4rem;
    filter: drop-shadow(0 4px 16px rgba(74, 222, 128, 0.6));
    animation: gemReveal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gemReveal {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% {
        transform: translate(-50%, -50%) scale(1.25) rotate(20deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Controls Section */
.simulator-controls-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Stats Section */
.simulator-stats-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stats-card {
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.04), rgba(34, 211, 238, 0.04));
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stats-card:hover {
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.08), rgba(34, 211, 238, 0.08));
    border-color: rgba(56, 189, 248, 0.25);
    transform: translateX(4px);
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--tools-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.stat-value-large {
    font-size: 2.8rem;
    font-weight: 900;
    font-family: 'SF Mono', 'Monaco', monospace;
    background: linear-gradient(135deg, var(--tools-success), #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 3px 12px rgba(74, 222, 128, 0.5));
    line-height: 1;
}

.stat-value-med {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--tools-text);
    font-family: 'SF Mono', 'Monaco', monospace;
    line-height: 1;
}

.control-group {
    margin-bottom: 1.75rem;
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.control-label {
    font-weight: 700;
    color: var(--tools-text);
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.control-value {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    color: var(--tools-highlight);
    font-weight: 700;
    font-size: 1.2rem;
    padding: 0.4rem 1rem;
    background: rgba(56, 189, 248, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.1);
}

/* Range Inputs */
.range-input-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.range-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 12px;
    background: linear-gradient(to right, rgba(56, 189, 248, 0.18) 0%, rgba(56, 189, 248, 0.4) 100%);
    border-radius: 6px;
    outline: none;
    border: 1px solid rgba(56, 189, 248, 0.25);
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--tools-highlight), var(--tools-accent));
    border-radius: 50%;
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow:
        0 4px 16px rgba(56, 189, 248, 0.6),
        0 0 0 6px rgba(56, 189, 248, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.25);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    box-shadow:
        0 6px 24px rgba(56, 189, 248, 0.8),
        0 0 0 8px rgba(56, 189, 248, 0.2);
}

.range-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.15);
}

.range-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--tools-highlight), var(--tools-accent));
    border-radius: 50%;
    cursor: grab;
    border: 3px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.6);
}

.number-input {
    width: 85px;
    background: var(--tools-card-alt);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--tools-text);
    padding: 0.7rem 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.number-input:focus {
    outline: none;
    border-color: var(--tools-highlight);
    box-shadow:
        0 0 0 4px rgba(56, 189, 248, 0.2),
        0 4px 12px rgba(56, 189, 248, 0.3);
}

.number-input.input-error {
    animation: shakeInput 0.5s ease;
    border-color: var(--tools-danger) !important;
    background: rgba(248, 113, 113, 0.15) !important;
}

/* Preset Buttons */
.preset-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.preset-btn {
    background: linear-gradient(145deg, #0f1520, #0d111a);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--tools-muted);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 55px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.preset-btn:hover {
    border-color: var(--tools-highlight);
    color: var(--tools-text);
    background: rgba(56, 189, 248, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.3);
}

.preset-btn.active {
    border-color: var(--tools-highlight);
    color: #0a0f1a;
    background: linear-gradient(135deg, var(--tools-highlight), var(--tools-accent));
    box-shadow:
        0 8px 24px rgba(56, 189, 248, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Bet Amount Input */
.control-input {
    background: var(--tools-card-alt);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--tools-text);
    padding: 1.15rem 1.75rem;
    border-radius: 14px;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.control-input-full {
    width: 100%;
}

.control-input:focus {
    outline: none;
    border-color: var(--tools-highlight);
    box-shadow:
        0 0 0 4px rgba(56, 189, 248, 0.2),
        0 4px 12px rgba(56, 189, 248, 0.3);
}

/* Reset Button */
.reset-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(145deg, rgba(248, 113, 113, 0.15), rgba(248, 113, 113, 0.1));
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--tools-muted);
    padding: 1.15rem 2rem;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 3px 12px rgba(248, 113, 113, 0.2);
}

.reset-btn svg {
    stroke: currentColor;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reset-btn:hover {
    background: linear-gradient(145deg, rgba(248, 113, 113, 0.25), rgba(248, 113, 113, 0.18));
    border-color: var(--tools-danger);
    color: var(--tools-danger);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(248, 113, 113, 0.4);
}

.reset-btn:hover svg {
    transform: rotate(-360deg);
}

.reset-btn:active {
    transform: translateY(-2px);
}

/* Stats Display */
.current-stats {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(56, 189, 248, 0.2);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.06), rgba(34, 211, 238, 0.06));
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.stat-row:hover {
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.1), rgba(34, 211, 238, 0.1));
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.2);
}

.stat-label {
    color: var(--tools-muted);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--tools-text);
    font-family: 'SF Mono', 'Monaco', monospace;
}

.stat-value.multiplier {
    font-size: 3.2rem;
    background: linear-gradient(135deg, var(--tools-success), #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 14px rgba(74, 222, 128, 0.5));
    font-weight: 900;
}

/* Risk Level Colors */
.risk-safe {
    color: var(--tools-success);
    text-shadow: 0 3px 12px rgba(74, 222, 128, 0.4);
}

.risk-moderate {
    color: var(--tools-warning);
    text-shadow: 0 3px 12px rgba(251, 191, 36, 0.4);
}

.risk-high {
    color: var(--tools-danger);
    text-shadow: 0 3px 12px rgba(248, 113, 113, 0.4);
}

/* Download Chart Box */
.chart-download-box {
    background: linear-gradient(145deg, #0d111a 0%, #0f1520 100%);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 24px;
    padding: 3rem 0 0 0;
    margin-bottom: 4rem;
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(56, 189, 248, 0.08);
    text-align: center;
    overflow: hidden;
}

.chart-download-box h2 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    color: var(--tools-text);
    margin: 0 0 1.5rem;
    padding: 0 2rem;
}

.chart-download-box .download-chart-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--tools-highlight), var(--tools-accent));
    color: #0a0f1a;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2.5rem;
}

.chart-download-box .download-chart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.5);
    background: linear-gradient(135deg, var(--tools-accent), var(--tools-highlight));
}

.chart-download-box .download-chart-btn:active {
    transform: translateY(-1px);
}

.chart-download-box .download-chart-btn svg {
    stroke: currentColor;
    flex-shrink: 0;
}

.chart-download-box .chart-image {
    width: 100%;
    height: auto;
    border-radius: 0 0 23px 23px;
    border-top: 1px solid rgba(56, 189, 248, 0.1);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
    display: block;
}

/* Payout Table Section */
.payout-table-section {
    margin-top: 4rem;
}

.payout-table-section > h2 {
    color: var(--tools-text);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 2rem;
}

.payout-table-title {
    color: white;
    margin-bottom: 1rem;
    text-align: center;
}

.payout-table-intro {
    text-align: center;
    color: var(--tools-muted);
    font-size: 1.05rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.highlight-multiplier {
    color: var(--tools-success);
    font-weight: 700;
}

.payout-table-container {
    overflow-x: auto;
    max-height: 700px;
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 24px;
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(56, 189, 248, 0.08);
    background: var(--tools-card);
}

.payout-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--tools-card);
}

.payout-table th,
.payout-table td {
    padding: 1.1rem 1rem;
    text-align: center;
    border-right: 1px solid var(--tools-border);
    border-bottom: 1px solid var(--tools-border);
    font-feature-settings: "tnum";
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.payout-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(145deg, #0f1520, #0d111a);
    color: var(--tools-muted);
    font-weight: 700;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
}

.payout-table tbody th {
    position: sticky;
    left: 0;
    z-index: 5;
    background: linear-gradient(145deg, #0f1520, #0d111a);
    color: var(--tools-text);
    font-weight: 700;
    border-right: 2px solid rgba(56, 189, 248, 0.2);
}

.payout-table thead th:first-child {
    left: 0;
    z-index: 15;
    background: linear-gradient(145deg, #0f1520, #0d111a);
    border-right: 2px solid rgba(56, 189, 248, 0.2);
}

.payout-table td {
    cursor: pointer;
    color: var(--tools-text);
    font-weight: 600;
}

.payout-table td:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(34, 211, 238, 0.25));
    color: var(--tools-highlight);
    font-weight: 800;
    transform: scale(1.1);
    z-index: 1;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

.payout-table td.active {
    background: linear-gradient(135deg, var(--tools-highlight), var(--tools-accent));
    color: #0a0f1a;
    font-weight: 900;
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.7);
    position: relative;
    z-index: 2;
}

.payout-table td.high-multiplier {
    background: rgba(251, 191, 36, 0.2);
    color: var(--tools-warning);
    font-weight: 700;
}

.payout-table td.ultra-multiplier {
    background: rgba(248, 113, 113, 0.2);
    color: var(--tools-danger);
    font-weight: 800;
}

/* Related Tools Section */
.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);
    margin: 0 0 0.75rem;
}

.related-tools-header p {
    color: var(--tools-muted);
    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);
    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);
    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);
    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;
}

/* Content Section */
.content-section {
    max-width: 100%;
    margin: 4rem auto 0;
    color: var(--tools-muted);
    line-height: 1.8;
    padding: 0 1.5rem;
}

.content-section h2 {
    color: var(--tools-text);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 800;
}

.content-section h3 {
    color: var(--tools-text);
    margin-top: 2.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.content-section p {
    margin-bottom: 2rem;
    font-size: 1.08rem;
}

.content-section code {
    background: rgba(56, 189, 248, 0.15);
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', monospace;
    color: var(--tools-highlight);
    font-size: 0.92em;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

/* FAQ & How-To Sections - Unified Accordion */
.faq-section,
.howto-section {
    max-width: 100%;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

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

.section-header::after {
    display: none;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.6rem);
    margin: 0;
    color: var(--tools-text);
    font-weight: 800;
}

.pf-accordion {
    max-width: 100%;
    margin: 0 auto;
}

.pf-accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

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

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

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

.pf-accordion-summary:hover {
    color: var(--tools-text);
    padding-left: 1.25rem;
}

.pf-accordion-summary:hover .pf-accordion-icon {
    stroke: var(--tools-text);
}

.pf-accordion-question {
    flex: 1;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--tools-text);
    line-height: 1.4;
}

.pf-accordion-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    stroke: var(--tools-muted);
    transition: all 0.35s ease;
}

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

.pf-accordion-item[open] .pf-accordion-icon-horizontal {
    opacity: 0;
}

.pf-accordion-content {
    padding: 0 0 1.75rem 0;
    color: var(--tools-muted);
    line-height: 1.8;
    animation: slideDown 0.35s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.pf-accordion-content code {
    background: rgba(56, 189, 248, 0.15);
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', monospace;
    color: var(--tools-highlight);
    font-size: 0.92em;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .mines-calculator-page {
        padding: 1.25rem 1rem;
    }

    .calculator-header {
        margin-bottom: 1.5rem;
    }

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

    .quick-calc-inputs {
        border-right: none;
        border-bottom: 1px solid rgba(56, 189, 248, 0.1);
        padding: 2rem 1.5rem;
        gap: 1.25rem;
    }

    .input-row {
        flex-direction: row;
        gap: 1rem;
    }

    .input-row label {
        min-width: 100px;
        font-size: 0.9rem;
    }

    .input-row label svg {
        width: 18px;
        height: 18px;
    }

    .input-row input {
        width: 120px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .quick-calc-results {
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }

    .result-multiplier {
        font-size: 3rem;
    }

    .result-secondary {
        gap: 2rem;
    }

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

    .simulator-header {
        padding: 2rem 1.5rem 1.5rem;
    }

    .simulator-header h2 {
        font-size: 1.6rem;
    }

    .simulator-header p {
        font-size: 0.95rem;
    }

    .simulator-body {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }

    .simulator-grid-section {
        padding: 1.25rem;
    }

    .stats-card {
        padding: 1.25rem;
    }

    .stat-value-large {
        font-size: 2.2rem;
    }

    .stat-value-med {
        font-size: 1.4rem;
    }

    .chart-container {
        padding: 2rem 1.5rem;
    }

    .chart-image {
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }

    .download-chart-btn {
        padding: 0.85rem 1.75rem;
        font-size: 0.95rem;
        width: 100%;
        max-width: 300px;
    }

    .mines-grid {
        max-width: 100%;
        gap: 12px;
        padding: 16px;
    }

    .mine-tile.revealed::after {
        font-size: 2rem;
    }

    .stat-value.multiplier {
        font-size: 2.6rem;
    }

    .payout-table th,
    .payout-table td {
        padding: 0.85rem 0.6rem;
        font-size: 0.88rem;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }

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

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

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

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

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

    .pf-accordion-summary {
        padding: 1.75rem 0;
    }
}

@media (max-width: 480px) {
    .calculator-title {
        font-size: 1.6rem;
    }

    .calculator-subtitle {
        font-size: 1rem;
    }

    .preset-buttons {
        gap: 0.6rem;
    }

    .preset-btn {
        padding: 0.65rem 1.15rem;
        font-size: 0.88rem;
        min-width: 48px;
    }

    .stat-row {
        padding: 1.25rem 1.5rem;
    }

    .stat-value.multiplier {
        font-size: 2.2rem;
    }
}
