/* ===== Matik Slot - Kumarhane / Neon Estetik ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --gold: #ffd23f;
    --gold-deep: #f4a800;
    --red: #ff3b5c;
    --green-felt: #0b3d2e;
    --green-felt2: #08291f;
    --neon-blue: #2de2e6;
    --neon-pink: #ff2e97;
    --panel: rgba(0, 0, 0, 0.45);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at 50% 0%, #15533f 0%, var(--green-felt) 40%, var(--green-felt2) 100%);
    min-height: 100vh;
    color: #fff;
    padding: 0 14px 40px;
    overflow-x: hidden;
}

/* Header */
.game-header {
    position: fixed; top: 0; left: 0; right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 15px 20px; display: flex; justify-content: center; align-items: center;
    z-index: 10000; box-shadow: 0 2px 18px rgba(0,0,0,0.5);
    border-bottom: 2px solid var(--gold);
}
.header-logo {
    font-size: 1.8rem; color: var(--gold); letter-spacing: 2px;
    text-decoration: none; font-weight: 900;
    text-shadow: 0 0 12px var(--gold-deep), 0 0 24px rgba(255,210,63,0.4);
    transition: transform .3s;
}
.header-logo:hover { transform: scale(1.05); }

/* Disclaimer */
.disclaimer-bar {
    max-width: 760px; margin: 0 auto 18px; padding: 12px 18px;
    background: rgba(255, 210, 63, 0.1);
    border: 1px solid rgba(255, 210, 63, 0.4);
    border-radius: 12px; text-align: center; font-size: 0.86rem; line-height: 1.5;
    color: #ffe9a8;
}
.disclaimer-bar strong { color: var(--gold); }

.game-container { max-width: 760px; margin: 0 auto; }

/* Top panel */
.top-panel { display: flex; gap: 12px; margin-bottom: 22px; justify-content: center; flex-wrap: wrap; }
.stat-box {
    background: var(--panel); backdrop-filter: blur(8px);
    padding: 12px 26px; border-radius: 14px; text-align: center;
    border: 2px solid rgba(255,255,255,0.12); min-width: 110px;
}
.stat-box.chips { border-color: var(--gold); box-shadow: 0 0 16px rgba(255,210,63,0.25); }
.stat-box.streak { border-color: var(--red); }
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.85); margin-bottom: 4px; }
.stat-value { font-size: 1.9rem; font-weight: 900; }
.chips .stat-value { color: var(--gold); }
.streak .stat-value { color: var(--red); }
.stat-value.pop { animation: pop .4s ease; }
@keyframes pop { 0%{transform:scale(1)} 50%{transform:scale(1.35)} 100%{transform:scale(1)} }

/* Slot Machine */
.slot-machine {
    position: relative;
    background: linear-gradient(160deg, #2a1a4a 0%, #1a1030 100%);
    border: 5px solid var(--gold);
    border-radius: 26px; padding: 26px 22px 30px; margin-bottom: 22px;
    box-shadow: 0 0 30px rgba(255,210,63,0.3), inset 0 0 40px rgba(0,0,0,0.5);
    overflow: hidden;
}
.marquee-lights {
    position: absolute; inset: 0; border-radius: 22px; pointer-events: none;
    background:
        repeating-linear-gradient(90deg, var(--gold) 0 8px, transparent 8px 22px) top/100% 4px no-repeat,
        repeating-linear-gradient(90deg, var(--red) 0 8px, transparent 8px 22px) bottom/100% 4px no-repeat;
    opacity: 0.6; animation: chase 1s linear infinite;
}
@keyframes chase { to { background-position-x: 22px, -22px; } }

/* Target */
.target-display { text-align: center; margin-bottom: 22px; position: relative; z-index: 2; }
.target-label { font-size: 0.95rem; letter-spacing: 3px; color: var(--neon-blue); }
.target-number {
    font-size: 4.2rem; font-weight: 900; line-height: 1; color: #fff;
    text-shadow: 0 0 16px var(--neon-blue), 0 0 32px rgba(45,226,230,0.5);
}
.jackpot-badge {
    display: none; margin-top: 8px; padding: 6px 16px; border-radius: 20px;
    background: linear-gradient(90deg, var(--red), var(--neon-pink));
    font-weight: 800; font-size: 0.85rem; animation: blink 0.7s infinite;
}
.slot-machine.jackpot .jackpot-badge { display: inline-block; }
.slot-machine.jackpot { border-color: var(--neon-pink); box-shadow: 0 0 40px rgba(255,46,151,0.6); }
@keyframes blink { 50% { opacity: 0.4; } }

/* Reels */
.reels { display: flex; gap: 14px; justify-content: center; position: relative; z-index: 2; }
.reel {
    width: 92px; height: 110px; border-radius: 14px;
    background: linear-gradient(180deg, #fffdf5 0%, #e8e0c8 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 6px 14px rgba(0,0,0,0.35), inset 0 -6px 14px rgba(0,0,0,0.25);
    border: 3px solid var(--gold-deep); overflow: hidden; position: relative;
}
.reel::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}
.reel-num { font-size: 3.4rem; font-weight: 900; color: #2a1a4a; }
.reel.spinning .reel-num { animation: spinFlash 0.08s linear infinite; }
@keyframes spinFlash { 0%{transform:translateY(-40%);opacity:.4} 100%{transform:translateY(40%);opacity:1} }
.reel.landed { animation: land .35s ease; }
@keyframes land { 0%{transform:scale(1.12)} 60%{transform:scale(0.94)} 100%{transform:scale(1)} }

/* Timer */
.timer-wrap {
    height: 12px; background: rgba(0,0,0,0.4); border-radius: 8px;
    margin-top: 22px; overflow: hidden; position: relative; z-index: 2;
    border: 1px solid rgba(255,255,255,0.15);
}
.timer-bar {
    height: 100%; width: 100%; border-radius: 8px;
    background: linear-gradient(90deg, #2de2e6, #ffd23f, #ff3b5c);
    transition: width 0.1s linear;
}

/* Result message */
.result-msg {
    text-align: center; min-height: 26px; margin-top: 14px;
    font-size: 1.15rem; font-weight: 800; position: relative; z-index: 2;
}
.result-msg.win { color: var(--gold); text-shadow: 0 0 12px rgba(255,210,63,0.6); }
.result-msg.lose { color: var(--red); }

/* Bet section */
.bet-section { text-align: center; margin-bottom: 18px; }
.bet-label { font-size: 0.9rem; opacity: 0.85; margin-bottom: 10px; }
.bet-options { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.bet-btn {
    width: 64px; height: 64px; border-radius: 50%; border: 3px dashed #fff;
    background: radial-gradient(circle at 30% 30%, var(--red), #b81f3c);
    color: #fff; font-weight: 900; font-size: 1.1rem; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4); transition: transform .15s, box-shadow .15s;
}
.bet-btn:hover { transform: translateY(-3px); }
.bet-btn.active {
    border-style: solid; border-color: var(--gold);
    background: radial-gradient(circle at 30% 30%, var(--gold), var(--gold-deep));
    color: #2a1a4a; box-shadow: 0 0 18px rgba(255,210,63,0.6);
}
.spin-btn {
    padding: 16px 50px; font-size: 1.4rem; font-weight: 900; letter-spacing: 2px;
    border: none; border-radius: 50px; cursor: pointer; color: #2a1a4a;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    box-shadow: 0 6px 0 #b87d00, 0 8px 20px rgba(0,0,0,0.4);
    transition: transform .1s, box-shadow .1s;
}
.spin-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b87d00; }
.spin-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Solve section */
.solve-section { display: none; margin-bottom: 18px; }
.solve-section.show { display: block; animation: fadeUp .3s ease; }
@keyframes fadeUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

.expression-display {
    background: rgba(0,0,0,0.5); border: 2px solid var(--neon-blue);
    border-radius: 14px; padding: 16px; text-align: center; margin-bottom: 16px;
    font-size: 2rem; font-weight: 800; min-height: 64px;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    box-shadow: inset 0 0 18px rgba(45,226,230,0.2);
}
.expr-text { color: #fff; letter-spacing: 2px; }
.expr-text.placeholder { color: rgba(255,255,255,0.4); font-size: 1.1rem; font-weight: 400; }
.expr-eq { color: var(--gold); }

.number-tiles { display: flex; gap: 12px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.num-tile {
    width: 72px; height: 72px; border-radius: 14px; border: none; cursor: pointer;
    background: linear-gradient(180deg, #fffdf5, #e0d7bd); color: #2a1a4a;
    font-size: 2rem; font-weight: 900; box-shadow: 0 4px 8px rgba(0,0,0,0.35);
    transition: transform .12s, opacity .2s;
}
.num-tile:hover:not(:disabled) { transform: translateY(-3px); }
.num-tile:disabled { opacity: 0.3; cursor: default; transform: scale(0.9); }

.operator-row { display: flex; gap: 12px; justify-content: center; margin-bottom: 14px; }
.op-btn {
    width: 64px; height: 64px; border-radius: 14px; cursor: pointer;
    border: 2px solid var(--neon-blue); background: rgba(45,226,230,0.12);
    color: var(--neon-blue); font-size: 1.8rem; font-weight: 900;
    transition: transform .12s, background .2s;
}
.op-btn:hover:not(:disabled) { transform: translateY(-3px); background: rgba(45,226,230,0.25); }
.op-btn:disabled { opacity: 0.3; cursor: default; }

.action-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.action-btn {
    padding: 13px 22px; border-radius: 12px; border: none; cursor: pointer;
    font-size: 1rem; font-weight: 700; color: #fff; transition: transform .12s, opacity .2s;
}
.action-btn:hover:not(:disabled) { transform: translateY(-2px); }
.action-btn.back { background: #555a7a; }
.action-btn.clear { background: #7a3b3b; }
.action-btn.submit { background: linear-gradient(135deg, #19c37d, #0f9d63); }
.action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Bottom controls */
.game-controls { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.btn {
    padding: 12px 22px; border: 2px solid rgba(255,255,255,0.25); border-radius: 12px;
    background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; font-size: 0.95rem;
    font-weight: 600; transition: background .2s, transform .12s;
}
.btn:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }

.best-score { text-align: center; opacity: 0.85; font-size: 0.95rem; }
.best-score span { color: var(--gold); font-weight: 800; }

/* Overlays */
.overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center; z-index: 20000; padding: 20px;
}
.overlay.show { display: flex; }
.menu-card {
    background: linear-gradient(160deg, #2a1a4a, #1a1030); border: 3px solid var(--gold);
    border-radius: 22px; padding: 34px 28px; max-width: 460px; width: 100%;
    text-align: center; box-shadow: 0 0 40px rgba(255,210,63,0.3); max-height: 90vh; overflow-y: auto;
}
.menu-card h1 { font-size: 2.2rem; color: var(--gold); text-shadow: 0 0 14px rgba(255,210,63,0.5); }
.info-block { background: rgba(255,255,255,0.07); border-radius: 12px; padding: 16px; margin: 16px 0; text-align: left; }
.info-block h3 { color: var(--gold); margin-bottom: 8px; }
.info-text div { line-height: 1.9; color: rgba(255,255,255,0.92); }
.btn-primary {
    margin-top: 12px; padding: 15px 36px; border: none; border-radius: 50px; cursor: pointer;
    font-size: 1.15rem; font-weight: 900; color: #2a1a4a;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    box-shadow: 0 5px 0 #b87d00; transition: transform .1s;
}
.btn-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 #b87d00; }

.win-stats { display: flex; gap: 14px; justify-content: center; margin: 20px 0; }
.win-stat { background: rgba(255,255,255,0.08); border-radius: 12px; padding: 14px 20px; }
.win-label { font-size: 0.8rem; opacity: 0.8; }
.win-value { font-size: 1.8rem; font-weight: 900; color: var(--gold); }

/* Confetti */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 19000; overflow: hidden; }
.confetti {
    position: absolute; width: 10px; height: 14px; top: -20px;
    animation: fall linear forwards;
}
@keyframes fall {
    to { transform: translateY(110vh) rotate(720deg); opacity: 0.2; }
}

/* SEO content */
.seo-content {
    max-width: 800px; margin: 40px auto 0; padding: 30px;
    background: rgba(0,0,0,0.35); border-radius: 15px; line-height: 1.8;
    border: 1px solid rgba(255,210,63,0.2);
}
.seo-content h2 { color: var(--gold); margin-bottom: 18px; }
.seo-content h3 { color: var(--neon-blue); margin: 22px 0 12px; }
.seo-content ul { padding-left: 22px; }
.seo-content li { margin-bottom: 6px; }

/* Mobile */
@media (max-width: 560px) {
    .reel { width: 78px; height: 96px; }
    .reel-num { font-size: 2.8rem; }
    .target-number { font-size: 3.4rem; }
    .num-tile { width: 62px; height: 62px; font-size: 1.6rem; }
    .op-btn { width: 56px; height: 56px; font-size: 1.5rem; }
    .bet-btn { width: 56px; height: 56px; }
    .spin-btn { padding: 14px 38px; font-size: 1.2rem; }
    .stat-box { min-width: 90px; padding: 10px 16px; }
}
