:root {
    --bg-dark: #0d0e12;
    --bg-card: rgba(30, 32, 45, 0.6);
    --border-card: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --color-primary: #a855f7; /* Purple */
    --color-primary-glow: rgba(168, 85, 247, 0.4);
    --color-secondary: #3b82f6; /* Blue */
    --color-secondary-glow: rgba(59, 130, 246, 0.4);
    --color-gold: #eab308; /* Gold */
    --color-gold-glow: rgba(234, 179, 8, 0.4);
    --color-red: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    user-select: none;
}

body {
    background: linear-gradient(rgba(13, 14, 18, 0.82), rgba(13, 14, 18, 0.88)), url('assets/istanbul_bg.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#app-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Background glow decorators */
.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    pointer-events: none;
    opacity: 0.15;
}

.bg-purple {
    background-color: var(--color-primary);
    top: -200px;
    left: -200px;
}

.bg-blue {
    background-color: var(--color-secondary);
    bottom: -200px;
    right: -200px;
}

/* Screens setup */
.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* 1. MENU SCREEN STYLING */
.app-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.logo-wrapper {
    display: inline-flex;
    gap: 0.5rem;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--border-card);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    margin-bottom: 1rem;
}

.logo-wrapper span {
    font-weight: 800;
}

.logo-wrapper .red {
    color: var(--color-red);
}

.app-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff 30%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(168, 85, 247, 0.2);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
    margin-top: 0.5rem;
}

.game-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    width: 100%;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    height: 380px; /* Fixed height for clean grid layout */
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Force content to bottom */
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    padding: 0; /* Remove padding to let bg-image expand fully */
}

.game-card:hover, .game-card.focused {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: 0 15px 45px var(--color-primary-glow);
}

.game-card.premium:hover, .game-card.premium.focused {
    border-color: var(--color-secondary);
    box-shadow: 0 15px 45px var(--color-secondary-glow);
}

.game-card.gold:hover, .game-card.gold.focused {
    border-color: var(--color-gold);
    box-shadow: 0 15px 45px var(--color-gold-glow);
}

.card-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
    top: -50px;
    right: -50px;
    pointer-events: none;
    z-index: 4; /* Keep glow above background */
}

.card-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.card-bg-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(13, 14, 18, 0.25) 0%, rgba(13, 14, 18, 0.95) 100%);
    z-index: 2;
}

.game-card:hover .card-bg-image {
    transform: scale(1.1); /* Parallax zoom effect */
}

.card-content {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 2.2rem 1.6rem;
    box-sizing: border-box;
}

.game-card.premium .card-glow {
    background: radial-gradient(circle, var(--color-secondary-glow) 0%, transparent 70%);
}

.game-card.gold .card-glow {
    background: radial-gradient(circle, var(--color-gold-glow) 0%, transparent 70%);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-secondary);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    letter-spacing: 1px;
}

.card-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.game-card.premium .card-icon {
    color: var(--color-secondary);
}

.game-card.gold .card-icon {
    color: var(--color-gold);
}

.game-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.game-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.play-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.8rem 2.5rem;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card.premium .play-btn {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #1d4ed8 100%);
}

.game-card.gold .play-btn {
    background: linear-gradient(135deg, var(--color-gold) 0%, #b45309 100%);
}

.play-btn:hover {
    transform: scale(1.05);
}

.menu-footer {
    position: absolute;
    bottom: 2rem;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
}

/* 2. PIŞTI GAME SCREEN STYLING */
.game-layout {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-card);
    backdrop-filter: blur(10px);
}

.back-to-menu-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.back-to-menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.game-title-info {
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.match-id-badge {
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 400;
}

.scoreboard {
    display: flex;
    gap: 1rem;
}

.score-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    position: relative;
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.score-val {
    font-size: 1.4rem;
    font-weight: 800;
}

.pisti-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--color-gold);
    color: black;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Board Table */
.board-table {
    flex-grow: 1;
    background: url('assets/bg_table_green_felt.webp') center center / cover no-repeat;
    border-radius: 30px;
    border: 6px solid #2d1a10; /* Wood border style */
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8), 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    position: relative;
}


.player-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    position: relative;
}

.player-area-bottom {
    flex-direction: row;
}

.opponent-area {
    flex-direction: row-reverse;
}

.player-info-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.75rem 1.2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 120px;
    position: absolute;
    right: 2rem;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
}

.opponent-area .avatar {
    border-color: var(--color-secondary);
}

.player-info-tag span {
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}

/* Hands and cards */
.hand-container {
    display: flex;
    gap: 0.75rem;
    min-height: 140px;
    align-items: center;
    justify-content: center;
}

/* Playing Cards */
.card-item {
    width: 85px;
    height: 125px;
    background: white;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.5rem;
    color: black;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    transform-style: preserve-3d;
}

.hand-container .card-item:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), 0 0 10px var(--color-primary);
}

.card-item.opponent-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(255,255,255,0.1);
    color: transparent;
    cursor: default;
}

.card-item.opponent-card .card-back {
    width: 100%;
    height: 100%;
    border: 2px dashed rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.card-suit-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-value {
    font-weight: 800;
    font-size: 1.1rem;
}

.card-suit-center {
    font-size: 2.2rem;
    align-self: center;
    margin-bottom: 0.2rem;
}

.suit-heart, .suit-diamond {
    color: var(--color-red);
}

.suit-spade, .suit-club {
    color: black;
}

/* Middle Pile / Deck Area */
.middle-arena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    flex-grow: 1;
}

.deck-pile {
    width: 85px;
    height: 125px;
    position: relative;
}

.deck-pile .card-back {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    border: 2px solid white;
    border-radius: 8px;
    box-shadow: 2px 2px 0 #333, 4px 4px 0 #222, 6px 6px 10px rgba(0,0,0,0.5);
}

.deck-count {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.table-pile-container {
    width: 120px;
    height: 150px;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.empty-pile-placeholder {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-pile-container .card-item {
    position: absolute;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 14, 18, 0.9);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
}

.overlay.active {
    display: flex;
}

.overlay-content {
    background: rgba(30, 32, 45, 0.95);
    border: 1px solid var(--border-card);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(168, 85, 247, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    margin: 0 auto 2rem;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn {
    border: none;
    color: white;
    font-weight: 700;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1.5rem;
    transition: transform 0.2s ease;
}

.btn-primary {
    background: var(--color-primary);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
}

.btn:hover {
    transform: scale(1.03);
}

.result-box h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--color-gold);
}

.result-scores {
    background: rgba(0,0,0,0.3);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.res-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.res-row:last-child {
    margin-bottom: 0;
}

/* 3. GOLBOL SCREEN STYLING */
.golbol-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255,255,255,0.03);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-card);
}

.golbol-instructions {
    text-align: center;
    max-width: 700px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.golbol-instructions h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

#golbol-canvas {
    background-color: #1e3a8a; /* Blue pitch */
    border: 4px solid #3b82f6;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: block;
}

.golbol-controls-ui {
    display: flex;
    gap: 1rem;
}

/* Card Throw Animations */
@keyframes throwToCenterPlayer {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-160px) scale(0.9) rotate(8deg);
        opacity: 0;
    }
}

@keyframes throwToCenterOpponent {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(160px) scale(0.9) rotate(-8deg);
        opacity: 0;
    }
}

.playing-anim-player {
    animation: throwToCenterPlayer 0.22s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
    pointer-events: none;
    z-index: 100;
}

.playing-anim-opponent {
    animation: throwToCenterOpponent 0.22s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
    pointer-events: none;
    z-index: 100;
}

/* Racon Fullscreen Card Showcase Overlay (6 Seconds) */
.racon-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.racon-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.racon-card-container {
    position: relative;
    transform: scale(0.1);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.racon-overlay.active .racon-card-container {
    transform: scale(1.8);
}

.racon-card-container img {
    width: 180px;
    height: 270px;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(234, 179, 8, 0.9); /* Gold glow */
    border: 4px solid var(--color-gold);
    display: block;
}

.racon-glow {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 16px;
    box-shadow: 0 0 60px rgba(168, 85, 247, 0.7); /* Purple pulse glow */
    z-index: -1;
    animation: pulseRaconGlow 1.5s infinite alternate;
}

@keyframes pulseRaconGlow {
    0% {
        box-shadow: 0 0 40px rgba(168, 85, 247, 0.5);
    }
    100% {
        box-shadow: 0 0 80px rgba(168, 85, 247, 0.9);
    }
}

/* Card Capture/Collect Animations (Sliding to Score Pile) */
@keyframes captureSlidePlayer {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-320px, 160px) scale(0.15) rotate(-20deg);
        opacity: 0;
    }
}

@keyframes captureSlideOpponent {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-320px, -160px) scale(0.15) rotate(20deg);
        opacity: 0;
    }
}

.captured-to-player {
    animation: captureSlidePlayer 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
    pointer-events: none;
    z-index: 99;
}

.captured-to-opponent {
    animation: captureSlideOpponent 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
    pointer-events: none;
    z-index: 99;
}

/* Keyboard Card Navigation Selection Styling */
.card-item.selected-card {
    border: 3.5px solid var(--color-gold) !important;
    box-shadow: 0 0 25px rgba(234, 179, 8, 0.95), 0 10px 15px rgba(0,0,0,0.4) !important;
    transform: translateY(-22px) scale(1.1) !important;
    z-index: 999;
}

/* Turn Timer Badge Styling & Pulsing Animations */
.timer-badge {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--color-red);
    color: var(--color-red);
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.timer-badge.warning {
    animation: timerPulse 0.5s infinite alternate;
}

@keyframes timerPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    }
    100% {
        transform: scale(1.08);
        box-shadow: 0 0 18px rgba(239, 68, 68, 0.8);
    }
}

#golbol-canvas.blurry {
    filter: blur(22px) brightness(0.65);
    transition: filter 0.4s ease;
}

/* 4. TÜRK RULETİ GAME STYLES */
.game-card.danger {
    border-color: rgba(239, 68, 68, 0.2);
}
.game-card.danger:hover {
    border-color: var(--color-red);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.25), inset 0 0 20px rgba(239, 68, 68, 0.1);
}
.game-card.danger .card-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-red);
}
.game-card.danger .play-btn {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.ruleti-turn-badge {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--color-red);
    color: var(--color-red);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.ruleti-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    position: relative;
    padding: 1.5rem;
    background: radial-gradient(circle at center, #2e080c 0%, #0d0102 100%);
    border-radius: 20px;
    border: 1px solid rgba(239, 68, 68, 0.15);
    overflow: hidden;
}

/* Flash Screen Effect */
.ruleti-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ef4444;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.05s ease-out;
}
.ruleti-flash.active {
    opacity: 0.95;
    animation: flashFade 0.4s ease-out forwards;
}
@keyframes flashFade {
    0% { opacity: 0.95; }
    100% { opacity: 0; }
}

/* Cylinder Stage positioning */
.cylinder-stage {
    position: relative;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.8rem; /* Creates a clean gap between avatars and cylinder */
    margin-top: 1rem;
}

.ruleti-player-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}
.ruleti-player-view.active-turn {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}
.ruleti-player-view.eliminated {
    opacity: 0.3;
    filter: grayscale(1);
}
.ruleti-player-view.eliminated .ruleti-status-tag {
    background: var(--color-red) !important;
}

.ruleti-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
}
.ruleti-player-view.active-turn .ruleti-avatar {
    background: var(--color-red);
}

.ruleti-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: white;
}
.ruleti-status-tag {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: #10b981;
    font-weight: 800;
}

/* Gun Cylinder Graphic in Center */
.gun-cylinder-container {
    width: 130px;
    height: 130px;
    position: relative;
    perspective: 800px;
}

.gun-cylinder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, #555 0%, #222 100%);
    border: 6px solid #444;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.gun-cylinder.spinning {
    animation: cylinderSpinFast 0.6s infinite linear;
}
@keyframes cylinderSpinFast {
    to { transform: rotate(360deg); }
}

/* Chambers */
.chamber {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #111;
    border: 2px solid #333;
    top: 50%;
    left: 50%;
    margin-top: -14px;
    margin-left: -14px;
}
.chamber.active-indicator {
    border-color: var(--color-gold);
    box-shadow: 0 0 10px var(--color-gold);
}
.chamber.bullet-inside {
    background: radial-gradient(circle, #fbbf24 0%, #d97706 70%, #111 100%);
    border-color: #fbbf24;
}

/* Position chambers in circle */
.dot-0 { transform: rotate(0deg) translateY(-40px); }
.dot-1 { transform: rotate(60deg) translateY(-40px); }
.dot-2 { transform: rotate(120deg) translateY(-40px); }
.dot-3 { transform: rotate(180deg) translateY(-40px); }
.dot-4 { transform: rotate(240deg) translateY(-40px); }
.dot-5 { transform: rotate(300deg) translateY(-40px); }

.cylinder-core {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #555;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
}

/* Dashboard styles */
.ruleti-dashboard {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.ruleti-chamber-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(0,0,0,0.5);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}
.indicator-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: rgba(255,255,255,0.5);
}
.dots-row {
    display: flex;
    gap: 0.5rem;
}
.dots-row .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    transition: all 0.3s ease;
}
.dots-row .dot.active {
    background: var(--color-gold);
    border-color: #f59e0b;
    box-shadow: 0 0 8px var(--color-gold);
}
.dots-row .dot.past {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}
.dots-row .dot.fired {
    background: var(--color-red);
    border-color: #b91c1c;
    box-shadow: 0 0 8px var(--color-red);
}

.ruleti-logs {
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    height: 90px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.85);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.log-entry {
    line-height: 1.35;
    border-left: 2px solid rgba(239, 68, 68, 0.4);
    padding-left: 6px;
}
.log-entry.safe {
    border-color: #60a5fa;
}
.log-entry.shot {
    border-color: var(--color-red);
    color: var(--color-red);
    font-weight: bold;
}
.log-entry.system {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.ruleti-actions {
    display: flex;
    gap: 1rem;
}
.btn-ruleti {
    flex-grow: 1;
    border: none;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}
.btn-ruleti:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    box-shadow: none !important;
}

.spin-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #1f2937;
}
.spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(251, 191, 36, 0.35);
}

.trigger-btn {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
}
.trigger-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.35);
}

#turk-ruleti-screen.shake {
    animation: cameraShake 0.4s ease-out;
}
@keyframes cameraShake {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-10px, 8px); }
    30% { transform: translate(12px, -6px); }
    50% { transform: translate(-8px, 10px); }
    70% { transform: translate(10px, -4px); }
    90% { transform: translate(-4px, 2px); }
    100% { transform: translate(0, 0); }
}

/* Neon SVG Icons & Float Animations */
.neon-svg-icon {
    width: 75px;
    height: 75px;
    margin-bottom: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.game-card:hover .neon-svg-icon {
    transform: scale(1.12) rotate(4deg);
}

/* Dynamic Aurora Background Blobs */
@keyframes floatAurora {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, -60px) scale(1.15); }
    100% { transform: translate(0, 0) scale(1); }
}
.glow-bg {
    animation: floatAurora 18s ease-in-out infinite alternate;
}
.bg-blue {
    animation-delay: -6s;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 900px) {
    .game-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto; /* Allow viewport scrolling on small mobile screens */
    }
    
    #app-container {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    
    .screen {
        padding: 0.5rem;
        height: auto;
        min-height: 100vh;
        position: relative;
    }
    
    /* Landing/Menu Screen */
    .app-header h1 {
        font-size: 2.2rem;
    }
    .logo-wrapper {
        font-size: 1.2rem;
        padding: 0.3rem 1rem;
    }
    .game-cards-container {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        max-width: 400px;
    }
    .game-card {
        height: 320px; /* Shorter card height for mobile */
    }
    
    /* Pişti Screen Board Adjustments */
    .board-table {
        padding: 0.8rem;
        border-radius: 16px;
        border-width: 3px;
        gap: 1rem;
    }
    .game-header {
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.6rem;
        text-align: center;
    }
    .game-title-info {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        align-items: center;
    }
    .scoreboard {
        width: 100%;
        justify-content: center;
        gap: 0.8rem;
    }
    .score-box {
        padding: 0.3rem 0.8rem;
        min-width: 80px;
    }
    .player-area {
        gap: 0.5rem;
    }
    .player-info-tag {
        min-width: 80px;
        padding: 0.4rem 0.8rem;
    }
    .avatar {
        width: 36px;
        height: 36px;
    }
    .hand-container {
        min-height: 110px;
        gap: 0.4rem;
    }
    .middle-arena {
        gap: 1.5rem; /* Compress middle space */
    }
    .player-hand {
        gap: 0.25rem;
        padding: 0.3rem;
        justify-content: center;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    /* Global card resizing for board, hand, and deck */
    .card-item, .deck-pile, .table-pile .card-item {
        width: 62px !important;
        height: 92px !important;
        font-size: 0.95rem !important;
        padding: 0.3rem !important;
    }
    .card-suit-top {
        font-size: 0.7rem !important;
    }
    .card-suit-bottom {
        font-size: 0.7rem !important;
    }
    .card-suit-center {
        font-size: 1.6rem !important;
    }
    .card-value {
        font-size: 0.85rem !important;
    }
    
    /* Golbol Responsive adjustments */
    #golbol-canvas {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1000 / 600;
        border-radius: 12px;
    }
    .golbol-instructions {
        display: none; /* Hide instructions to maximize space on mobile */
    }
    
    /* Turk Ruleti mobile adaptations */
    .ruleti-arena {
        padding: 0.8rem;
    }
    .cylinder-stage {
        gap: 1rem;
    }
    .gun-cylinder-container {
        width: 100px;
        height: 100px;
    }
    .gun-cylinder {
        transform: scale(0.75);
    }
    .ruleti-player-view {
        padding: 0.4rem 0.8rem;
    }
    .ruleti-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    .ruleti-name {
        font-size: 0.7rem;
    }
    .ruleti-logs {
        height: 60px;
        font-size: 0.65rem;
    }
    .btn-ruleti {
        padding: 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Overlay responsiveness */
    .overlay-content {
        width: 92vw;
        padding: 1.2rem;
    }
    .result-box h1 {
        font-size: 2rem !important;
    }
}

/* Keyboard Navigation Focused States (Neon Style) */
.game-card.focused {
    transform: translateY(-18px) scale(1.04) !important;
    border-color: #fff !important;
    box-shadow: 
        0 0 10px #fff, 
        0 0 20px #fff, 
        0 0 35px var(--color-primary), 
        0 0 50px var(--color-primary), 
        0 0 70px var(--color-primary) !important;
    z-index: 10;
}

.game-card.premium.focused {
    border-color: #fff !important;
    box-shadow: 
        0 0 10px #fff, 
        0 0 20px #fff, 
        0 0 35px var(--color-secondary), 
        0 0 50px var(--color-secondary), 
        0 0 70px var(--color-secondary) !important;
}

.game-card.gold.focused {
    border-color: #fff !important;
    box-shadow: 
        0 0 10px #fff, 
        0 0 20px #fff, 
        0 0 35px var(--color-gold), 
        0 0 50px var(--color-gold), 
        0 0 70px var(--color-gold) !important;
}

.game-card.danger.focused {
    border-color: #fff !important;
    box-shadow: 
        0 0 10px #fff, 
        0 0 20px #fff, 
        0 0 35px var(--color-red), 
        0 0 50px var(--color-red), 
        0 0 70px var(--color-red) !important;
}

.game-card.focused::before {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border: 3px solid #fff;
    border-radius: 22px;
    pointer-events: none;
    z-index: 10;
    animation: neonPulse 1.2s infinite alternate;
}

@keyframes neonPulse {
    from { 
        opacity: 0.6; 
        box-shadow: inset 0 0 10px rgba(255,255,255,0.4);
    }
    to { 
        opacity: 1; 
        box-shadow: inset 0 0 20px rgba(255,255,255,0.8);
    }
}

.game-card.focused .card-bg-image {
    transform: scale(1.15) !important;
}

.game-card.focused .play-btn {
    transform: scale(1.1) !important;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.8) !important;
}

/* Google Login & Profile UI */
.login-google-btn {
    background: white;
    color: #1f2937;
    border: none;
    padding: 0.7rem 1.5rem;
    font-weight: 700;
    border-radius: 50px;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 15px rgba(255,255,255,0.1), 0 0 10px rgba(255,255,255,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 2rem;
}

.login-google-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255,255,255,0.25), 0 0 15px rgba(255,255,255,0.25);
}

.profile-bar {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    gap: 0.8rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.profile-score {
    font-size: 0.75rem;
    color: var(--color-gold);
    font-weight: 600;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.2rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.logout-btn:hover {
    color: var(--color-red);
    transform: scale(1.1);
}

/* Login Prompt Panel styling */
.login-prompt-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 3rem 2rem;
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.login-prompt-panel h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.login-prompt-panel p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

@keyframes spinRadar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes flashFade {
    0% { opacity: 0; transform: translateY(5px); }
    100% { opacity: 1; transform: translateY(0); }
}

.lobby-glow-avatar {
    position: relative;
}
.lobby-glow-avatar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.6);
    animation: avatarPulse 2s infinite;
}

@keyframes avatarPulse {
    0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(168, 85, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}

/* Gaddar Radio Player Styling */
.radio-player-panel {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, rgba(24, 24, 37, 0.9) 0%, rgba(13, 14, 18, 0.95) 100%);
    border: 1.5px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.2), inset 0 0 15px rgba(168, 85, 247, 0.1);
    padding: 0.6rem 1.4rem;
    border-radius: 20px;
    gap: 0.6rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.radio-player-panel:hover {
    box-shadow: 0 0 35px rgba(168, 85, 247, 0.35);
    border-color: rgba(168, 85, 247, 0.5);
}

.radio-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

.radio-pulse-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    position: relative;
}

.radio-pulse-dot.active::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #ef4444;
    border-radius: 50%;
    animation: pulse-ring 1.2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.equalizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
    width: 25px;
}

.eq-bar {
    width: 3px;
    height: 100%;
    background: #a855f7;
    border-radius: 1px;
    transform-origin: bottom;
    transform: scaleY(0.2);
    transition: transform 0.1s ease;
}

/* Equalizer animations */
.equalizer.active .eq-bar:nth-child(1) { animation: eq-anim 0.8s infinite alternate ease-in-out; }
.equalizer.active .eq-bar:nth-child(2) { animation: eq-anim 0.5s infinite alternate ease-in-out; }
.equalizer.active .eq-bar:nth-child(3) { animation: eq-anim 0.7s infinite alternate ease-in-out; }
.equalizer.active .eq-bar:nth-child(4) { animation: eq-anim 0.6s infinite alternate ease-in-out; }

@keyframes eq-anim {
    0% { transform: scaleY(0.15); }
    100% { transform: scaleY(1); }
}

.radio-controls {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.radio-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.4);
    transition: all 0.2s ease;
}

.radio-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.6);
}

.radio-volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.radio-volume-icon {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.radio-volume-slider {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.radio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(168, 85, 247, 0.8);
    transition: transform 0.1s;
}

.radio-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
