*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #f4e9c1;
    background: #05030a;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Casino-style animated background */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse at top, #3d1a5c 0%, #1a0933 40%, #05030a 100%),
        repeating-linear-gradient(45deg, rgba(255, 215, 0, 0.02) 0 2px, transparent 2px 20px);
}

.bg-lights {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(255, 0, 128, 0.25) 0, transparent 8%),
        radial-gradient(circle at 85% 30%, rgba(255, 215, 0, 0.25) 0, transparent 8%),
        radial-gradient(circle at 25% 70%, rgba(0, 229, 255, 0.22) 0, transparent 8%),
        radial-gradient(circle at 75% 80%, rgba(124, 77, 255, 0.25) 0, transparent 8%),
        radial-gradient(circle at 50% 50%, rgba(255, 64, 129, 0.15) 0, transparent 10%);
    animation: bgFlash 4s ease-in-out infinite alternate;
}

@keyframes bgFlash {
    0%   { opacity: 0.6; filter: hue-rotate(0deg); }
    50%  { opacity: 1;   filter: hue-rotate(40deg); }
    100% { opacity: 0.7; filter: hue-rotate(-30deg); }
}

.hero {
    text-align: center;
    padding: 50px 20px 30px;
    position: relative;
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    margin: 0 0 10px;
    color: #ffd700;
    text-shadow:
        0 0 10px #ffd700,
        0 0 20px #ff00aa,
        0 0 40px #ff00aa;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 10px #ffd700, 0 0 20px #ff00aa, 0 0 40px #ff00aa; }
    to   { text-shadow: 0 0 20px #fff, 0 0 30px #ffd700, 0 0 60px #ffd700, 0 0 80px #ff00aa; }
}

.subtitle {
    color: #f4e9c1;
    font-size: 1.1rem;
    opacity: 0.9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Hero row - most recommended casino, wide layout */
.hero-row {
    margin-bottom: 30px;
}

.casino-hero {
    position: relative;
    display: grid;
    grid-template-columns: 200px 1fr auto;
    align-items: center;
    gap: 30px;
    padding: 32px 30px;
    border-radius: 18px;
    border: 3px solid #ffd700;
    background:
        linear-gradient(135deg, rgba(80, 20, 100, 0.95), rgba(20, 5, 50, 0.98)),
        radial-gradient(circle at top right, rgba(255, 215, 0, 0.2), transparent 60%);
    background-blend-mode: normal, overlay;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.55), 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: recGlow 2.2s ease-in-out infinite alternate;
    overflow: hidden;
}

.casino-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, rgba(255, 215, 0, 0.04) 0 10px, transparent 10px 20px);
    pointer-events: none;
}

.hero-rank {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #ffd700;
    color: #000;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 0 12px #ffd700;
    z-index: 2;
}

.hero-logo img {
    width: 200px;
    height: 200px;
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid rgba(255, 215, 0, 0.7);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    display: block;
}

.hero-content { min-width: 0; }

.hero-name {
    margin: 0 0 6px;
    color: #ffd700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.hero-tagline {
    color: #ff4081;
    font-weight: bold;
    letter-spacing: 1px;
    font-size: 0.95rem;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero-bonus {
    background: rgba(0, 0, 0, 0.55);
    border: 1px dashed rgba(255, 215, 0, 0.6);
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 12px;
}

.hero-bonus .bonus-label {
    color: #ffd700;
    letter-spacing: 1.5px;
}

.hero-bonus .bonus-text {
    font-size: 1.15rem;
}

.hero-cta {
    text-align: center;
}

.btn-hero {
    padding: 20px 34px;
    font-size: 1.2rem;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 0 25px rgba(255, 0, 128, 0.8);
}

.hero-cta-sub {
    margin-top: 10px;
    color: #f4e9c1;
    font-size: 0.8rem;
    opacity: 0.85;
}

@media (max-width: 800px) {
    .casino-hero {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
    .hero-logo img { width: 160px; height: 160px; }
    .hero-rank { top: 10px; left: 10px; }
}

/* Alternatives grid - 4 columns for the rest */
.alternatives {
    display: grid;
    gap: 22px;
    margin-bottom: 60px;
}

.alternatives.four-col {
    grid-template-columns: repeat(4, 1fr);
}

.alternatives.five-col {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1200px) {
    .alternatives.five-col { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1000px) {
    .alternatives.four-col,
    .alternatives.five-col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .alternatives.four-col,
    .alternatives.five-col { grid-template-columns: 1fr; }
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    color: #f4e9c1;
    padding: 40px 20px;
    font-size: 1.1rem;
    opacity: 0.8;
}

.load-error {
    text-align: center;
    color: #ff5a5f;
    padding: 20px;
    font-weight: bold;
}

/* Clickable logo + name */
.brand-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: transform 0.18s, filter 0.18s;
    cursor: pointer;
}
.brand-link:hover {
    transform: scale(1.04);
    filter: brightness(1.15) drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}
.casino-name a.brand-link:hover,
.hero-name a.brand-link:hover,
.rec-info h3 a.brand-link:hover {
    color: #ffe066;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}
a.brand-link.logo,
a.brand-link.hero-logo {
    display: block;
}

/* Win CTA - appears under games when player wins */
.win-cta {
    margin-top: 28px;
    text-align: center;
    padding: 24px 20px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(0, 60, 25, 0.85), rgba(0, 30, 15, 0.95));
    border: 3px dashed #00ff66;
    box-shadow: 0 0 30px rgba(0, 255, 102, 0.5);
}

.win-cta.hidden { display: none; }

.cta-pop { animation: ctaPop 0.5s cubic-bezier(0.25, 1.4, 0.5, 1); }

@keyframes ctaPop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.win-cta-text {
    color: #00ff88;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 14px;
    text-shadow: 0 0 12px rgba(0, 255, 102, 0.8);
}

.win-cta-sub {
    margin-top: 12px;
    color: #b6ffd1;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-win-real {
    display: inline-block;
    background: linear-gradient(90deg, #00c853, #00e676, #76ff03, #00e676, #00c853);
    background-size: 300% 100%;
    color: #02110a;
    padding: 22px 44px;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 2px;
    border-radius: 38px;
    text-decoration: none;
    text-transform: uppercase;
}

.flashing-green {
    animation: greenFlash 0.85s ease-in-out infinite, greenSlide 3s linear infinite;
}

@keyframes greenFlash {
    0%, 100% {
        box-shadow: 0 0 25px rgba(0, 255, 102, 0.7), 0 0 50px rgba(0, 200, 80, 0.4);
        transform: scale(1);
        filter: brightness(1.05);
    }
    50% {
        box-shadow: 0 0 55px rgba(0, 255, 102, 1), 0 0 90px rgba(0, 230, 118, 0.8);
        transform: scale(1.06);
        filter: brightness(1.35);
    }
}

@keyframes greenSlide {
    from { background-position: 0% 50%; }
    to   { background-position: 300% 50%; }
}

@media (max-width: 600px) {
    .btn-win-real { padding: 18px 28px; font-size: 1.1rem; letter-spacing: 1.2px; }
}

.casino-card {
    background: linear-gradient(160deg, rgba(40, 10, 70, 0.92), rgba(15, 5, 30, 0.95));
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 14px;
    padding: 22px 18px;
    text-align: center;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.6);
}

.casino-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.35);
}

.casino-card.recommended {
    border: 3px solid #ffd700;
    background: linear-gradient(160deg, rgba(80, 20, 100, 0.95), rgba(40, 10, 60, 0.98));
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
    animation: recGlow 2.2s ease-in-out infinite alternate;
}

@keyframes recGlow {
    from { box-shadow: 0 0 25px rgba(255, 215, 0, 0.4), 0 0 10px rgba(255, 0, 170, 0.4); }
    to   { box-shadow: 0 0 50px rgba(255, 215, 0, 0.9), 0 0 25px rgba(255, 0, 170, 0.7); }
}

.badge-recommended {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #ff0080, #ffd700, #ff0080);
    background-size: 200% 100%;
    color: #000;
    font-weight: bold;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    white-space: nowrap;
    animation: badgeSlide 3s linear infinite;
}

@keyframes badgeSlide {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}

.rank {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ffd700;
    color: #000;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 0 10px #ffd700;
}

.logo img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    margin: 10px auto 14px;
    border-radius: 10px;
    display: block;
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.rec-logo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #ffd700;
    max-width: none;
}

.casino-name {
    font-size: 1.2rem;
    margin: 0 0 10px;
    color: #ffd700;
}

.rating {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.star.full {
    color: #00e676;
    text-shadow: 0 0 6px rgba(0, 230, 118, 0.8);
}
.star.half {
    color: #00e676;
    opacity: 0.65;
    text-shadow: 0 0 6px rgba(0, 230, 118, 0.6);
}
.star.empty { color: #444; }

.rating-num {
    color: #fff;
    font-size: 0.9rem;
    margin-left: 6px;
}

.bonus {
    background: rgba(0, 0, 0, 0.45);
    border: 1px dashed rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 14px;
    min-height: 70px;
}

.bonus-label {
    display: block;
    color: #ff4081;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.bonus-text {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.15s;
}

.btn:hover { transform: scale(1.05); }
.btn:active { transform: scale(0.98); }

.btn-claim {
    background: linear-gradient(90deg, #ff0080, #ff4081);
    color: #fff;
    width: 100%;
}

.btn-play {
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    color: #000;
    font-size: 1.1rem;
    padding: 16px 30px;
}

.btn-spin {
    background: linear-gradient(90deg, #00e5ff, #7c4dff);
    color: #fff;
    padding: 14px 36px;
    font-size: 1.1rem;
}

.flashing {
    animation: btnFlash 1.1s ease-in-out infinite;
    box-shadow: 0 0 18px rgba(255, 0, 128, 0.8);
}

@keyframes btnFlash {
    0%, 100% {
        box-shadow: 0 0 18px rgba(255, 0, 128, 0.8), 0 0 30px rgba(255, 215, 0, 0.6);
        filter: brightness(1.05);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 215, 0, 1), 0 0 55px rgba(255, 0, 128, 0.9);
        filter: brightness(1.3);
    }
}

/* Section titles */
.section-title {
    text-align: center;
    color: #ffd700;
    font-size: 2rem;
    margin: 10px 0 25px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

/* Games section */
.games-section {
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 30px 20px;
    margin-bottom: 50px;
}

.game-switcher {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.switch-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #f4e9c1;
    border: 2px solid rgba(255, 215, 0, 0.4);
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.switch-btn.active {
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    color: #000;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.game-panel.hidden { display: none; }

/* Roulette */
.roulette-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.wheel-container {
    position: relative;
    width: 340px;
    height: 340px;
}

.wheel-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 28px solid #ffd700;
    z-index: 3;
    filter: drop-shadow(0 0 6px #ffd700);
}

#rouletteWheel {
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.8);
    transition: transform 4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.roulette-controls {
    text-align: center;
    width: 100%;
    max-width: 380px;
}

.result-display {
    font-size: 1.3rem;
    color: #ffd700;
    margin-bottom: 12px;
    min-height: 40px;
    font-weight: bold;
}

.bet-section { margin-bottom: 14px; }
.bet-section-label {
    color: #ffd700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.bet-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 4px;
}

.bet-amounts {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bet-btn, .amount-btn, .slot-amount-btn {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 2px solid rgba(255, 215, 0, 0.4);
    padding: 8px 10px;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: transform 0.12s, background 0.15s;
}

.bet-btn small {
    display: block;
    font-size: 0.7rem;
    opacity: 0.75;
    margin-top: 2px;
}

.bet-btn:hover, .amount-btn:hover, .slot-amount-btn:hover { transform: translateY(-1px); }

.bet-btn.red-bet { background: rgba(193, 18, 31, 0.7); border-color: #ff5a5f; }
.bet-btn.black-bet { background: rgba(20, 20, 20, 0.9); border-color: #666; }

.bet-btn.selected {
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    color: #000;
    border-color: #ffd700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

.amount-btn.active, .slot-amount-btn.active {
    background: linear-gradient(90deg, #00e5ff, #7c4dff);
    color: #fff;
    border-color: #00e5ff;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.8);
}

.paytable {
    margin-top: 18px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px dashed rgba(255, 215, 0, 0.4);
    border-radius: 10px;
    width: 100%;
    max-width: 420px;
}
.paytable-title {
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 1px;
    font-size: 0.85rem;
}
.paytable-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    font-size: 0.85rem;
    color: #f4e9c1;
}
.paytable-grid span {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 6px;
    border-radius: 6px;
    text-align: center;
}

.balance {
    margin-top: 12px;
    color: #f4e9c1;
    font-size: 1rem;
}
.balance span {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Slots */
.slots-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.slot-machine {
    display: flex;
    gap: 10px;
    background: linear-gradient(180deg, #4a1a6b, #1a0933);
    padding: 20px;
    border-radius: 12px;
    border: 4px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.slot-reel {
    width: 90px;
    height: 110px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border: 3px solid #ffd700;
}

.slot-symbol {
    font-size: 4rem;
    line-height: 1;
    transition: transform 0.1s linear;
}

.slot-reel.spinning .slot-symbol {
    animation: reelSpin 0.08s linear infinite;
}

@keyframes reelSpin {
    from { transform: translateY(-100%); }
    to   { transform: translateY(100%); }
}

.slots-result {
    font-size: 1.3rem;
    color: #ffd700;
    font-weight: bold;
    min-height: 30px;
}

/* Game recommendation */
.game-recommendation {
    margin-bottom: 40px;
}

.rec-card {
    background: linear-gradient(135deg, rgba(80, 20, 100, 0.95), rgba(20, 5, 40, 0.98));
    border: 3px solid #ffd700;
    border-radius: 16px;
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
    animation: recGlow 2.2s ease-in-out infinite alternate;
}


.rec-info {
    flex: 1 1 200px;
    min-width: 200px;
}

.rec-info h3 {
    margin: 0 0 8px;
    color: #ffd700;
    font-size: 1.6rem;
}

.rec-bonus {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Footer */
.footer {
    text-align: center;
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #aaa;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

@media (max-width: 600px) {
    .wheel-container { width: 280px; height: 280px; }
    #rouletteWheel { width: 280px; height: 280px; }
    .slot-reel { width: 70px; height: 90px; }
    .slot-symbol { font-size: 3rem; }
    .rec-card { flex-direction: column; text-align: center; }
}
