/* ==========================================================================
   BLOCK MASTER PRO - PREMIUM STYLE SHEET
   ========================================================================== */

/* Universal Reset & Core Configuration */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Base color variables (Theme independent overrides) */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --bg-dark: #09090e;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Active Theme Variables (Will be overriden by theme classes) */
    --theme-primary: #00f0ff;
    --theme-glow: rgba(0, 240, 255, 0.4);
    
    /* 4 Standard Block colors per theme */
    --theme-color-1: #00f0ff;
    --theme-color-2: #ff007f;
    --theme-color-3: #9d00ff;
    --theme-color-4: #ffaa00;

    /* Base Layout sizing */
    --board-cell-size: 54px;
    --dock-cell-size: 22px;
}

/* 8 Premium Skeuomorphic Themes (4 Light, 4 Dark) */

/* --- 4 LIGHT THEMES --- */

/* 0. Orman Tapınağı (Jungle Temple) */
.theme-0 {
    --theme-primary: #ffd700;
    --theme-glow: rgba(255, 215, 0, 0.45);
    --theme-color-1: #00cbf7;
    --theme-color-2: #f43f5e;
    --theme-color-3: #10b981;
    --theme-color-4: #a855f7;
}

/* 1. Gökyüzü Tapınağı (Sky Castle) */
.theme-1 {
    --theme-primary: #d4af37;
    --theme-glow: rgba(212, 175, 55, 0.4);
    --theme-color-1: #00d2ff;
    --theme-color-2: #ff4d79;
    --theme-color-3: #00e676;
    --theme-color-4: #ba68c8;
}

/* 2. Buz Sarayı (Ice Palace) */
.theme-2 {
    --theme-primary: #4fc3f7;
    --theme-glow: rgba(79, 195, 247, 0.4);
    --theme-color-1: #26c6da;
    --theme-color-2: #ff5252;
    --theme-color-3: #66bb6a;
    --theme-color-4: #ab47bc;
}

/* 3. Çöl Vahası (Desert Oasis) */
.theme-3 {
    --theme-primary: #e07a5f;
    --theme-glow: rgba(224, 122, 95, 0.4);
    --theme-color-1: #3a86c8;
    --theme-color-2: #e76f51;
    --theme-color-3: #2a9d8f;
    --theme-color-4: #9b5de5;
}

/* --- 4 DARK THEMES --- */

/* 4. Sualtı Harabeleri (Undersea Ruins) */
.theme-4 {
    --theme-primary: #00f0ff;
    --theme-glow: rgba(0, 240, 255, 0.45);
    --theme-color-1: #00f0ff;
    --theme-color-2: #ff3366;
    --theme-color-3: #00ff88;
    --theme-color-4: #d946ef;
}

/* 5. Volkanik Mağara (Volcanic Cave) */
.theme-5 {
    --theme-primary: #ff5722;
    --theme-glow: rgba(255, 87, 34, 0.45);
    --theme-color-1: #3f51b5;
    --theme-color-2: #f44336;
    --theme-color-3: #4caf50;
    --theme-color-4: #9c27b0;
}

/* 6. Kozmik Uzay (Cosmic Void) */
.theme-6 {
    --theme-primary: #9c27b0;
    --theme-glow: rgba(156, 39, 176, 0.4);
    --theme-color-1: #00e5ff;
    --theme-color-2: #ff1744;
    --theme-color-3: #00e676;
    --theme-color-4: #d500f9;
}

/* 7. Zindan Hücresi (Medieval Dungeon) */
.theme-7 {
    --theme-primary: #9e9e9e;
    --theme-glow: rgba(158, 158, 158, 0.35);
    --theme-color-1: #00b0ff;
    --theme-color-2: #f50057;
    --theme-color-3: #00e676;
    --theme-color-4: #ab47bc;
}

/* Base Body Styles */
body {
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
    touch-action: none;
}

/* Premium Background Glowing Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    transition: background 1.5s ease-in-out;
}
.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--theme-primary);
    top: -100px;
    left: -100px;
    animation: floatOrb1 25s ease-in-out infinite;
}
.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--theme-color-2);
    bottom: -150px;
    right: -100px;
    animation: floatOrb2 30s ease-in-out infinite;
}
.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--theme-color-3);
    top: 50%;
    left: 60%;
    transform: translate(-50%, -50%);
    animation: floatOrb3 20s ease-in-out infinite;
}

@keyframes floatOrb1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}
@keyframes floatOrb2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, -70px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}
@keyframes floatOrb3 {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-45%, -55%) scale(1.15); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Glassmorphism Panel Class */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: border-color 0.8s, box-shadow 0.8s;
}

/* Page Wrapper */
.game-wrapper {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

/* Header Panel Styles (Block Blast Centered & Nameless Layout) */
.game-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 20px 0 20px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100%;
}
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.header-high-score {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 5;
}
.crown-icon {
    font-size: 1.35rem;
}
.high-score-val {
    color: #fff;
    font-weight: 900;
}
.header-current-score {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: -2px; /* Pull up slightly to keep it compact */
    pointer-events: none;
    z-index: 5;
}
.current-score-val {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 4.8rem; /* Devasa anlık skor */
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.75), 0 0 10px rgba(255, 215, 0, 0.35);
    line-height: 1;
}
.icon-btn-clean {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.75) !important;
    padding: 8px !important;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.icon-btn-clean:hover {
    color: #fff !important;
    transform: scale(1.08);
}
.icon-btn-clean:active {
    transform: scale(0.92);
}
.logo-text, .logo-badge, .stats-row {
    display: none !important;
}
.stat-card {
    flex: 1;
    min-width: 0;          /* prevent flex item from overflowing */
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;      /* clip any overflowing label text */
}
.stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    white-space: nowrap;   /* keep label on one line */
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}
.stat-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--theme-primary);
    text-shadow: 0 0 5px var(--theme-glow);
    transition: color 0.8s, text-shadow 0.8s;
}
.header-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

/* Icon Buttons */
.icon-btn {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}
.icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--theme-primary);
}
.icon-btn:active {
    transform: scale(0.95);
}
.badge {
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Board Container & Grid */
.board-container {
    padding: 16px;
    padding-right: 20px;  /* extra room for right-edge bevel borders */
    padding-bottom: 20px; /* extra room for bottom-edge bevel borders */
    display: flex;
    justify-content: center;
    position: relative;
    overflow: visible;
}
.board-grid {
    display: grid;
    grid-template-columns: repeat(8, var(--board-cell-size));
    grid-template-rows: repeat(8, var(--board-cell-size));
    gap: 0;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.grid-cell {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 0;
    position: relative;
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* Filled Cells (Glossy 3D Glassmorphic blocks) */
.grid-cell.filled, .dock-shape-cell.filled, .drag-clone-cell {
    background-image: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.05) 50%, rgba(0,0,0,0.2) 100%) !important;
    border-top: 3px solid rgba(255, 255, 255, 0.45) !important;
    border-left: 3px solid rgba(255, 255, 255, 0.45) !important;
    border-right: 3px solid rgba(0, 0, 0, 0.25) !important;
    border-bottom: 3px solid rgba(0, 0, 0, 0.25) !important;
    box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.35), 
                inset 0 -2px 3px rgba(0, 0, 0, 0.25),
                0 2px 6px rgba(0, 0, 0, 0.3) !important;
    border-radius: 0 !important;
}

.grid-cell.highlight-ghost {
    background-color: var(--ghost-color, transparent) !important;
    opacity: 0.45 !important;
    filter: brightness(1.2) saturate(0.9) !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.35) !important;
    transition: none !important;
}
.grid-cell.highlight-invalid {
    background-color: rgba(239, 68, 68, 0.2) !important;
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3) !important;
    transition: none !important;
}

/* Screen Shake Animation on clear */
.shake-board {
    animation: boardShake 0.15s ease-in-out;
}
@keyframes boardShake {
    0%, 100% { transform: translate(0, 0); }
    20%, 60% { transform: translate(-3px, 2px); }
    40%, 80% { transform: translate(3px, -2px); }
}

/* Particle Effects Canvas Overlaid */
.effects-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
    height: calc(100% - 32px);
    pointer-events: none;
    z-index: 5;
}

/* Dock Container & Dock Slots (Minimalistic Floating) */
.dock-container {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.dock-title {
    display: none !important;
}
.shapes-dock-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    min-height: 110px;
}
.dock-slot {
    background: transparent !important;
    border: none !important;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 110px;
    position: relative;
    cursor: grab;
    touch-action: none;
    transition: border-color 0.2s, background-color 0.2s;
    padding: 10px;
}
.dock-slot:hover {
    border: none !important;
    background: transparent !important;
}
.dock-slot:active {
    cursor: grabbing;
}
.dock-slot.empty {
    border: none !important;
    background: transparent !important;
    cursor: default;
}

/* Mini shape styling in slots */
.dock-shape {
    display: grid;
    gap: 0;
    transform: scale(1);
    transition: transform 0.2s;
}
.dock-shape-cell {
    width: var(--dock-cell-size);
    height: var(--dock-cell-size);
    border-radius: 0;
}
.dock-shape-cell.filled {
    background-image: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(0,0,0,0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Dragging clone visual */
.drag-clone {
    position: fixed;
    pointer-events: none;
    z-index: 100;
    display: grid;
    gap: 0;
    opacity: 0.95;
}
.drag-clone-cell {
    border-radius: 0;
}
.drag-clone-cell.filled {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45) !important;
}

/* Footer & Connections */
.game-footer {
    padding: 16px;
    display: flex;
    justify-content: center;
}
.qr-container {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}
.qrcode-box {
    background: white;
    padding: 8px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 106px;
    min-height: 106px;
}
.qrcode-box canvas, .qrcode-box img {
    width: 90px !important;
    height: 90px !important;
}
.qr-status-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.qr-status-info h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.status-message {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}
.ip-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}
.ip-link {
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--theme-primary);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
    padding: 2px 6px;
    border-radius: 4px;
    width: max-content;
    border: 1px solid rgba(255,255,255,0.03);
}

/* Developer Control Panel */
.dev-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.dev-panel.hidden {
    display: none !important;
}
.dev-panel-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dev-panel-header h4 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}
#dev-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}
#dev-close-btn:hover {
    color: var(--text-primary);
}
.dev-panel-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.control-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.glass-select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}
.glass-select option {
    background: #09090e;
    color: var(--text-primary);
}
.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.checkbox-group input {
    cursor: pointer;
}
.button-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 6px;
}
.dev-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: white;
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}
.dev-btn:active {
    transform: scale(0.97);
}
.dev-btn.danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}
.dev-btn.danger:hover {
    background: rgba(239, 68, 68, 0.25);
}
.dev-btn.primary {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}
.dev-btn.primary:hover {
    background: rgba(59, 130, 246, 0.25);
}
.dev-btn.success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}
.dev-btn.success:hover {
    background: rgba(16, 185, 129, 0.25);
}

/* Overlay & Game Over */
/* =====================================================================
   GAME OVER OVERLAY — PREMIUM
   ===================================================================== */
.go-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.65);
}
.go-overlay.hidden {
    display: none !important;
}

/* Confetti full-screen canvas sits behind the card */
.confetti-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.go-card {
    position: relative;
    z-index: 1;
    padding: 32px 24px 28px;
    width: 100%;
    max-width: 340px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    animation: goCardPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    border: 1px solid rgba(255,255,255,0.1) !important;
}
@keyframes goCardPop {
    from { opacity: 0; transform: scale(0.7) translateY(30px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.go-emoji {
    font-size: 3rem;
    line-height: 1;
    animation: goEmojiBounce 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}
@keyframes goEmojiBounce {
    from { opacity: 0; transform: scale(0) rotate(-20deg); }
    to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

.go-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.9rem;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(255,255,255,0.15);
    margin: 0;
}

.go-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: -10px 0 0;
}

/* Score boxes row */
.go-scores {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
}
.go-score-box {
    flex: 1;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.03);
    position: relative;
}
.go-score-best {
    background: rgba(255,215,0,0.06);
}
.go-score-divider {
    width: 1px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.go-score-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    text-transform: uppercase;
}
.go-score-val {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 2rem;
    color: var(--theme-primary);
    text-shadow: 0 0 12px var(--theme-glow);
    line-height: 1;
}
.go-new-record {
    font-size: 0.65rem;
    font-weight: 800;
    color: #FFD700;
    text-shadow: 0 0 8px rgba(255,215,0,0.6);
    letter-spacing: 0.5px;
    animation: pulseGold 1.4s ease-in-out infinite;
}
@keyframes pulseGold {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.7; transform: scale(1.08); }
}

/* Mini stat row */
.go-stats-row {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.go-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 60px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 8px 14px;
}
.go-stat-val {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
}
.go-stat-lbl {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Restart button */
.go-restart-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--theme-primary);
    color: #000;
    border: none;
    border-radius: 14px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 15px 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--theme-glow);
    transition: transform 0.12s, box-shadow 0.2s;
}
.go-restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px var(--theme-glow);
}
.go-restart-btn:active {
    transform: scale(0.97);
}


/* KEYFRAMES */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   8. MOBİL PERFORMANS STABİLİZASYONLARI VE CSS OVERRIDES
   ========================================================================== */

@media (max-width: 767px) {
    :root {
        --board-cell-size: 40px;
        --dock-cell-size: 18px;
    }
    
    body {
        padding: 10px;
    }
    
    .game-wrapper {
        gap: 10px;
    }

    /* Disable all CSS transitions on mobile for high-performance */
    * {
        transition: none !important;
        animation: none !important;
    }

    /* Remove heavy blur filter elements entirely on mobile */
    .glow-orb {
        display: none !important;
        filter: none !important;
    }

    /* Remove box-shadows on board and cells to minimize rasterization costs */
    .glass-panel, 
    .grid-cell, 
    .grid-cell.filled, 
    .dock-slot, 
    .dock-shape-cell.filled, 
    .drag-clone, 
    .dev-panel, 
    .qrcode-box, 
    .overlay-card {
        box-shadow: none !important;
    }

    /* Scale board to fit mobile viewport widths precisely */
    .board-grid {
        gap: 0;
        padding: 4px;
    }
    .grid-cell {
        border-radius: 0;
    }

    /* Simplify drag clone style on mobile */
    .drag-clone {
        gap: 0;
    }
    .drag-clone-cell {
        border-radius: 0;
    }

    /* Footer layout adjustments for small screens */
    .qr-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    .qrcode-box {
        min-width: 90px;
        min-height: 90px;
    }
    .qrcode-box canvas, .qrcode-box img {
        width: 80px !important;
        height: 80px !important;
    }
    .ip-list {
        align-items: center;
    }
    
    /* Geliştirici paneli mobilde ekranı tam kaplamamalı, alt çubuk gibi yerleşmeli */
    .dev-panel {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100% !important;
        border-radius: 16px 16px 0 0;
        box-shadow: none !important;
    }
}

/* Ultra small devices scaling override */
@media (max-width: 360px) {
    :root {
        --board-cell-size: 34px;
        --dock-cell-size: 15px;
    }
    .board-grid {
        gap: 2px;
        padding: 3px;
    }
}

/* General hidden utility */
.hidden {
    display: none !important;
}

/* ==========================================================================
   THEME PICKER STYLING (3D TACTILE BUTTONS)
   ========================================================================== */
.theme-picker-panel {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}
.theme-picker-title {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.theme-scroll-picker {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 4px 2px;
}
.theme-btn {
    flex: 1;
    max-width: 180px;
    padding: 10px 16px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* ==========================================================================
   0. ORMAN TAPINAĞI (JUNGLE TEMPLE) - LIGHT THEME 1
   ========================================================================== */
body.theme-0 {
    background: #1a1613 !important;
}
.theme-0 .board-container {
    background: linear-gradient(180deg, #2a1f14 0%, #161009 100%) !important;
    border: 8px solid #4a3825 !important;
    border-bottom: 12px solid #2d2013 !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.75), inset 0 2px 4px rgba(255, 255, 255, 0.05), inset 0 -4px 6px rgba(0, 0, 0, 0.6) !important;
    border-radius: 24px;
}
.theme-0 .glass-panel {
    background: linear-gradient(180deg, #2f251a 0%, #1e1710 100%) !important;
    border: 2px solid #544431 !important;
    border-bottom: 4px solid #140f0a !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6), inset 0 2px 2px rgba(255, 255, 255, 0.05) !important;
    color: #ffe4b5 !important;
}
.theme-0 .grid-cell:not(.filled) {
    background: rgba(12, 9, 6, 0.65) !important;
    border: 1px solid rgba(0, 0, 0, 0.4) !important;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.8), inset -1px -1px 2px rgba(255, 255, 255, 0.03) !important;
}
.theme-0 .dock-slot {
    background: rgba(12, 9, 6, 0.75) !important;
    border: 2px dashed #423322 !important;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.8) !important;
}
.theme-0 .dock-slot:hover { border-color: #ffd700 !important; }
.theme-0 .stat-runes {
    color: #1e1710 !important;
    font-size: 0.65rem;
    margin-top: 2px;
    letter-spacing: 2px;
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.8), 1px 1px 1px rgba(255, 255, 255, 0.05) !important;
}
.theme-0 .logo-badge {
    background: linear-gradient(180deg, #d4af37 0%, #aa7c11 100%) !important;
    color: #1e1812 !important;
    border: 1px solid #ffdf00 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.2) !important;
}
.theme-0 .stat-value {
    color: #ffd700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}
.theme-0 .icon-btn {
    background: linear-gradient(180deg, #5c4731 0%, #3a2b1b 100%) !important;
    border: 2px solid #8e6d49 !important;
    border-bottom: 4px solid #1c150c !important;
    color: #ffe4b5 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}
.theme-0 .icon-btn:active {
    transform: translateY(2px) !important;
    border-bottom-width: 2px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
}
.theme-btn.theme-0 { color: #ffe4b5; }



/* ==========================================================================
   1. GÖKYÜZÜ TAPINAĞI (SKY CASTLE) - DARK THEME 1 (SKY SLATE)
   ========================================================================== */
body.theme-1 {
    background: #14191d !important; /* Muted dark slate */
}
.theme-1 .board-container {
    background: linear-gradient(180deg, #1d252d 0%, #13191f 100%) !important; /* Dark slate gradient */
    border: 8px solid #a68422 !important; /* Dimmed gold */
    border-bottom: 12px solid #826615 !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7), inset 0 2px 4px rgba(255, 255, 255, 0.05), inset 0 -4px 6px rgba(0, 0, 0, 0.5) !important;
    border-radius: 24px;
}
.theme-1 .glass-panel {
    background: linear-gradient(180deg, #252f3a 0%, #192027 100%) !important; /* Dark panel */
    border: 2px solid #a68422 !important;
    border-bottom: 4px solid #826615 !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5), inset 0 2px 2px rgba(255, 255, 255, 0.05) !important;
    color: #e3d2b3 !important; /* Light text instead of dark */
}
.theme-1 .grid-cell:not(.filled) {
    background: rgba(10, 14, 18, 0.65) !important; /* Dark background cells */
    border: 1px solid rgba(212, 175, 55, 0.15) !important;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.8), inset -1px -1px 2px rgba(255,255,255,0.03) !important;
}
.theme-1 .dock-slot {
    background: rgba(10, 14, 18, 0.75) !important;
    border: 2px dashed #a68422 !important;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.8) !important;
}
.theme-1 .dock-slot:hover { border-color: #ffd700 !important; }
.theme-1 .stat-runes {
    color: rgba(166, 132, 34, 0.6) !important;
    font-size: 0.65rem;
    margin-top: 2px;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}
.theme-1 .logo-badge {
    background: linear-gradient(180deg, #a68422 0%, #826615 100%) !important;
    color: #14191d !important;
    border: 1px solid #d4af37 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.2) !important;
}
.theme-1 .stat-value {
    color: #ffd700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}
.theme-1 .icon-btn {
    background: linear-gradient(180deg, #2d3947 0%, #1e2630 100%) !important;
    border: 2px solid #a68422 !important;
    border-bottom: 4px solid #826615 !important;
    color: #e3d2b3 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}
.theme-1 .icon-btn:active {
    transform: translateY(2px) !important;
    border-bottom-width: 2px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
}
.theme-btn.theme-1 { color: #e3d2b3; }



/* ==========================================================================
   2. BUZ SARAYI (ICE PALACE) - DARK THEME 2 (FROST BLUE)
   ========================================================================== */
body.theme-2 {
    background: #0f1418 !important; /* Muted dark arctic blue */
}
.theme-2 .board-container {
    background: linear-gradient(180deg, #172129 0%, #0e151b 100%) !important; /* Dark arctic gradient */
    border: 8px solid #5aa7c5 !important; /* Dimmed arctic blue */
    border-bottom: 12px solid #3c7e99 !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7), inset 0 2px 4px rgba(255, 255, 255, 0.05), inset 0 -4px 6px rgba(0, 0, 0, 0.5) !important;
    border-radius: 24px;
}
.theme-2 .glass-panel {
    background: linear-gradient(180deg, #202e3b 0%, #151f28 100%) !important; /* Dark panel */
    border: 2px solid #5aa7c5 !important;
    border-bottom: 4px solid #3c7e99 !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5), inset 0 2px 2px rgba(255, 255, 255, 0.05) !important;
    color: #ccecf8 !important;
}
.theme-2 .grid-cell:not(.filled) {
    background: rgba(8, 12, 16, 0.65) !important; /* Dark background cells */
    border: 1px solid rgba(123, 198, 227, 0.15) !important;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.8), inset -1px -1px 2px rgba(255,255,255,0.03) !important;
}
.theme-2 .dock-slot {
    background: rgba(8, 12, 16, 0.75) !important;
    border: 2px dashed #5aa7c5 !important;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.8) !important;
}
.theme-2 .dock-slot:hover { border-color: #7bc6e3 !important; }
.theme-2 .stat-runes {
    color: rgba(90, 167, 197, 0.6) !important;
    font-size: 0.65rem;
    margin-top: 2px;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}
.theme-2 .logo-badge {
    background: linear-gradient(180deg, #5aa7c5 0%, #3c7e99 100%) !important;
    color: #0f1418 !important;
    border: 1px solid #7bc6e3 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.2) !important;
}
.theme-2 .stat-value {
    color: #7bc6e3 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}
.theme-2 .icon-btn {
    background: linear-gradient(180deg, #273747 0%, #1a2530 100%) !important;
    border: 2px solid #5aa7c5 !important;
    border-bottom: 4px solid #3c7e99 !important;
    color: #ccecf8 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}
.theme-2 .icon-btn:active {
    transform: translateY(2px) !important;
    border-bottom-width: 2px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
}
.theme-btn.theme-2 { color: #ccecf8; }



/* ==========================================================================
   3. ÇÖL VAHASI (DESERT OASIS) - DARK THEME 3 (WARM SAND)
   ========================================================================== */
body.theme-3 {
    background: #161310 !important; /* Muted dark sandy warm clay */
}
.theme-3 .board-container {
    background: linear-gradient(180deg, #231d17 0%, #16120e 100%) !important; /* Dark warm clay gradient */
    border: 8px solid #b87b32 !important; /* Dimmed warm gold/orange */
    border-bottom: 12px solid #945f21 !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7), inset 0 2px 4px rgba(255, 255, 255, 0.05), inset 0 -4px 6px rgba(0, 0, 0, 0.5) !important;
    border-radius: 24px;
}
.theme-3 .glass-panel {
    background: linear-gradient(180deg, #2e261e 0%, #1e1913 100%) !important; /* Dark panel */
    border: 2px solid #b87b32 !important;
    border-bottom: 4px solid #945f21 !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5), inset 0 2px 2px rgba(255, 255, 255, 0.05) !important;
    color: #f0dec8 !important;
}
.theme-3 .grid-cell:not(.filled) {
    background: rgba(12, 9, 7, 0.65) !important; /* Dark background cells */
    border: 1px solid rgba(217, 156, 82, 0.15) !important;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.8), inset -1px -1px 2px rgba(255,255,255,0.03) !important;
}
.theme-3 .dock-slot {
    background: rgba(12, 9, 7, 0.75) !important;
    border: 2px dashed #b87b32 !important;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.8) !important;
}
.theme-3 .dock-slot:hover { border-color: #d99c52 !important; }
.theme-3 .stat-runes {
    color: rgba(184, 123, 50, 0.6) !important;
    font-size: 0.65rem;
    margin-top: 2px;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}
.theme-3 .logo-badge {
    background: linear-gradient(180deg, #b87b32 0%, #945f21 100%) !important;
    color: #161310 !important;
    border: 1px solid #d99c52 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.2) !important;
}
.theme-3 .stat-value {
    color: #d99c52 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}
.theme-3 .icon-btn {
    background: linear-gradient(180deg, #382e25 0%, #251e18 100%) !important;
    border: 2px solid #b87b32 !important;
    border-bottom: 4px solid #945f21 !important;
    color: #f0dec8 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}
.theme-3 .icon-btn:active {
    transform: translateY(2px) !important;
    border-bottom-width: 2px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
}
.theme-btn.theme-3 { color: #f0dec8; }



/* ==========================================================================
   4. SUALTI HARABELERİ (UNDERSEA RUINS) - DARK THEME 1
   ========================================================================== */
body.theme-4 {
    background: #071116 !important;
}
.theme-4 .board-container {
    background: linear-gradient(180deg, #0e1e25 0%, #050b0f 100%) !important;
    border: 8px solid #1f3a46 !important;
    border-bottom: 12px solid #0d1a20 !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8), inset 0 2px 4px rgba(255, 255, 255, 0.05), inset 0 -4px 6px rgba(0, 0, 0, 0.7) !important;
    border-radius: 24px;
}
.theme-4 .glass-panel {
    background: linear-gradient(180deg, #10222a 0%, #0a151b 100%) !important;
    border: 2px solid #233e4b !important;
    border-bottom: 4px solid #060b0e !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6), inset 0 2px 2px rgba(255, 255, 255, 0.04) !important;
    color: #e0ffff !important;
}
.theme-4 .grid-cell:not(.filled) {
    background: rgba(4, 9, 12, 0.65) !important;
    border: 1px solid rgba(0, 0, 0, 0.5) !important;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.85), inset -1px -1px 2px rgba(255, 255, 255, 0.03) !important;
}
.theme-4 .dock-slot {
    background: rgba(4, 9, 12, 0.75) !important;
    border: 2px dashed #142a35 !important;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.85) !important;
}
.theme-4 .dock-slot:hover { border-color: #00f0ff !important; }
.theme-4 .octopus-overlay { display: block; }
.theme-4 .stat-runes {
    color: #071014 !important;
    font-size: 0.65rem;
    margin-top: 2px;
    letter-spacing: 2px;
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.8), 1px 1px 1px rgba(255, 255, 255, 0.05) !important;
}
.theme-4 .logo-badge {
    background: linear-gradient(180deg, #00b4cc 0%, #005f73 100%) !important;
    color: #04141c !important;
    border: 1px solid #00f0ff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.2) !important;
}
.theme-4 .stat-value {
    color: #00f0ff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}
.theme-4 .icon-btn {
    background: linear-gradient(180deg, #203f4f 0%, #0f232c 100%) !important;
    border: 2px solid #36657c !important;
    border-bottom: 4px solid #060e12 !important;
    color: #e0ffff !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}
.theme-4 .icon-btn:active {
    transform: translateY(2px) !important;
    border-bottom-width: 2px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
}
.theme-btn.theme-4 { color: #e0ffff; }



/* ==========================================================================
   5. VOLKANİK MAĞARA (VOLCANIC CAVE) - DARK THEME 2
   ========================================================================== */
body.theme-5 {
    background: #0f0705 !important;
}
.theme-5 .board-container {
    background: linear-gradient(180deg, #1c0e0b 0%, #0a0504 100%) !important;
    border: 8px solid #a63a17 !important;
    border-bottom: 12px solid #7d260c !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.85), inset 0 2px 4px rgba(255, 255, 255, 0.05), inset 0 -4px 6px rgba(0, 0, 0, 0.7) !important;
    border-radius: 24px;
}
.theme-5 .glass-panel {
    background: linear-gradient(180deg, #2c1611 0%, #150906 100%) !important;
    border: 2px solid #7d260c !important;
    border-bottom: 4px solid #3c0c00 !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7), inset 0 2px 2px rgba(255, 255, 255, 0.04) !important;
    color: #ffa07a !important;
}
.theme-5 .grid-cell:not(.filled) {
    background: rgba(10, 5, 4, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.6) !important;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.9), inset -1px -1px 2px rgba(255, 255, 255, 0.03) !important;
}
.theme-5 .dock-slot {
    background: rgba(10, 5, 4, 0.75) !important;
    border: 2px dashed #7d260c !important;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.9) !important;
}
.theme-5 .dock-slot:hover { border-color: #ff5722 !important; }
.theme-5 .stat-runes {
    color: #150906 !important;
    font-size: 0.65rem;
    margin-top: 2px;
    letter-spacing: 2px;
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.8), 1px 1px 1px rgba(255, 255, 255, 0.05) !important;
}
.theme-5 .logo-badge {
    background: linear-gradient(180deg, #ff5722 0%, #c43d0e 100%) !important;
    color: #1c0e0b !important;
    border: 1px solid #ff8a65 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.2) !important;
}
.theme-5 .stat-value {
    color: #ff5722 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}
.theme-5 .icon-btn {
    background: linear-gradient(180deg, #2c1611 0%, #150906 100%) !important;
    border: 2px solid #7d260c !important;
    border-bottom: 4px solid #3c0c00 !important;
    color: #ffa07a !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}
.theme-5 .icon-btn:active {
    transform: translateY(2px) !important;
    border-bottom-width: 2px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
}
.theme-btn.theme-5 { color: #ffa07a; }



/* ==========================================================================
   6. KOZMİK UZAY (COSMIC VOID) - DARK THEME 3
   ========================================================================== */
body.theme-6 {
    background: #05040a !important;
}
.theme-6 .board-container {
    background: linear-gradient(180deg, #0b0a15 0%, #030307 100%) !important;
    border: 8px solid #4a3b8c !important;
    border-bottom: 12px solid #34276b !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.85), inset 0 2px 4px rgba(255, 255, 255, 0.05), inset 0 -4px 6px rgba(0, 0, 0, 0.7) !important;
    border-radius: 24px;
}
.theme-6 .glass-panel {
    background: linear-gradient(180deg, #16132b 0%, #090814 100%) !important;
    border: 2px solid #4f3da3 !important;
    border-bottom: 4px solid #241a54 !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7), inset 0 2px 2px rgba(255, 255, 255, 0.04) !important;
    color: #d1c4e9 !important;
}
.theme-6 .grid-cell:not(.filled) {
    background: rgba(4, 3, 8, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.5) !important;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.9), inset -1px -1px 2px rgba(255, 255, 255, 0.03) !important;
}
.theme-6 .dock-slot {
    background: rgba(4, 3, 8, 0.75) !important;
    border: 2px dashed #4f3da3 !important;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.9) !important;
}
.theme-6 .dock-slot:hover { border-color: #9c27b0 !important; }
.theme-6 .stat-runes {
    color: #090814 !important;
    font-size: 0.65rem;
    margin-top: 2px;
    letter-spacing: 2px;
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.8), 1px 1px 1px rgba(255, 255, 255, 0.05) !important;
}
.theme-6 .logo-badge {
    background: linear-gradient(180deg, #9c27b0 0%, #6a1b9a 100%) !important;
    color: #0b0a15 !important;
    border: 1px solid #e040fb !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.2) !important;
}
.theme-6 .stat-value {
    color: #e040fb !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}
.theme-6 .icon-btn {
    background: linear-gradient(180deg, #16132b 0%, #090814 100%) !important;
    border: 2px solid #4f3da3 !important;
    border-bottom: 4px solid #241a54 !important;
    color: #d1c4e9 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}
.theme-6 .icon-btn:active {
    transform: translateY(2px) !important;
    border-bottom-width: 2px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
}
.theme-btn.theme-6 { color: #d1c4e9; }



/* ==========================================================================
   7. ZİNDAN HÜCRESİ (MEDIEVAL DUNGEON) - DARK THEME 4
   ========================================================================== */
body.theme-7 {
    background: #121212 !important;
}
.theme-7 .board-container {
    background: linear-gradient(180deg, #1b1b1c 0%, #0c0c0d 100%) !important;
    border: 8px solid #5a5a5c !important;
    border-bottom: 12px solid #3e3e40 !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.85), inset 0 2px 4px rgba(255, 255, 255, 0.05), inset 0 -4px 6px rgba(0, 0, 0, 0.7) !important;
    border-radius: 24px;
}
.theme-7 .glass-panel {
    background: linear-gradient(180deg, #2b2b2d 0%, #171718 100%) !important;
    border: 2px solid #535356 !important;
    border-bottom: 4px solid #2c2c2e !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7), inset 0 2px 2px rgba(255, 255, 255, 0.04) !important;
    color: #cccccc !important;
}
.theme-7 .grid-cell:not(.filled) {
    background: rgba(12, 12, 13, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.6) !important;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.9), inset -1px -1px 2px rgba(255, 255, 255, 0.03) !important;
}
.theme-7 .dock-slot {
    background: rgba(12, 12, 13, 0.75) !important;
    border: 2px dashed #535356 !important;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.9) !important;
}
.theme-7 .dock-slot:hover { border-color: #9e9e9e !important; }
.theme-7 .stat-runes {
    color: #171718 !important;
    font-size: 0.65rem;
    margin-top: 2px;
    letter-spacing: 2px;
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.8), 1px 1px 1px rgba(255, 255, 255, 0.05) !important;
}
.theme-7 .logo-badge {
    background: linear-gradient(180deg, #757575 0%, #424242 100%) !important;
    color: #1b1b1c !important;
    border: 1px solid #bdbdbd !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.2) !important;
}
.theme-7 .stat-value {
    color: #bdbdbd !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}
.theme-7 .icon-btn {
    background: linear-gradient(180deg, #2b2b2d 0%, #171718 100%) !important;
    border: 2px solid #535356 !important;
    border-bottom: 4px solid #2c2c2e !important;
    color: #cccccc !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}
.theme-7 .icon-btn:active {
    transform: translateY(2px) !important;
    border-bottom-width: 2px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
}
.theme-btn.theme-7 { color: #cccccc; }



/* ==========================================================================
   CLASSIC 3D BEVEL STYLE FOR ALL BLOCKS IN ALL THEMES
   ========================================================================== */
.grid-cell.filled,
.drag-clone-cell.filled,
.dock-shape-cell.filled {
    /* Glossy 3D Gradient Overlay to give lighting and volume */
    background-image: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.05) 50%, rgba(0,0,0,0.22) 100%) !important;
    
    /* Strong 3D Bevel constructed using thick borders (light top/left, dark bottom/right) */
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-top: 3.5px solid rgba(255, 255, 255, 0.55) !important;
    border-left: 3.5px solid rgba(255, 255, 255, 0.55) !important;
    border-right: 3.5px solid rgba(0, 0, 0, 0.35) !important;
    border-bottom: 3.5px solid rgba(0, 0, 0, 0.35) !important;
    
    /* 3D Inner reflection glow + deep outer shadow */
    box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.45), 
                inset 0 -2px 3px rgba(0, 0, 0, 0.3),
                0 3px 6px rgba(0, 0, 0, 0.25) !important;
    
    border-radius: 0 !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   BIG SCORE CARD (3x prominent)
   ========================================================================== */
.big-score-card {
    flex: 2 !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 2px solid var(--theme-primary) !important;
    box-shadow: 0 0 12px var(--theme-glow), inset 0 1px 1px rgba(255,255,255,0.08) !important;
    padding: 8px 12px !important;
    position: relative;
    overflow: visible;
}
.big-score-value {
    font-size: 2.4rem !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
    letter-spacing: -1px;
}

/* ==========================================================================
   COMBO BADGE (floating above score)
   ========================================================================== */
.combo-badge {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
}
.combo-double {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    color: #fff;
    box-shadow: 0 2px 12px rgba(245,158,11,0.6);
}
.combo-mega {
    background: linear-gradient(90deg, #a855f7, #ec4899, #f59e0b);
    color: #fff;
    box-shadow: 0 2px 18px rgba(168,85,247,0.7);
}
.combo-ultra {
    background: linear-gradient(90deg, #FFD700, #FF4444, #00F0FF, #FFD700);
    background-size: 200% auto;
    color: #fff;
    box-shadow: 0 2px 24px rgba(255,215,0,0.8);
    animation: rainbowShift 0.6s linear infinite, comboPop 2s ease-out forwards !important;
}
@keyframes comboPop {
    0%   { opacity: 0; transform: translateX(-50%) scale(0.5) translateY(6px); }
    15%  { opacity: 1; transform: translateX(-50%) scale(1.25) translateY(-6px); }
    30%  { transform: translateX(-50%) scale(1.0) translateY(0); }
    70%  { opacity: 1; transform: translateX(-50%) scale(1.0) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) scale(0.8) translateY(-10px); }
}
@keyframes rainbowShift {
    to { background-position: 200% center; }
}

/* ==========================================================================
   ICON-ONLY THEME BUTTONS (compact circles)
   ========================================================================== */
.theme-scroll-picker {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 6px 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.theme-scroll-picker::-webkit-scrollbar { display: none; }

.theme-icon-btn {
    width: 46px;
    height: 46px;
    border-radius: 50% !important;
    border: 2px solid rgba(255,255,255,0.15) !important;
    background: rgba(255,255,255,0.08) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}
.theme-icon-btn:hover {
    transform: scale(1.15);
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 10px var(--theme-glow);
}
.theme-icon-btn.active {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 14px var(--theme-glow), inset 0 0 6px rgba(255,255,255,0.1) !important;
    transform: scale(1.12);
    border-width: 3px !important;
}
.theme-icon-only {
    font-size: 1.4rem;
    line-height: 1;
}

/* ==========================================================================
   LIGHT THEME TEXT CONTRAST FIXES (themes 1, 2, 3)
   ========================================================================== */

/* Sky Castle (theme-1) - dark text on light background */
.theme-1 .stat-label,
.theme-2 .stat-label,
.theme-3 .stat-label {
    color: rgba(0, 0, 0, 0.55) !important;
}
.theme-1 .logo-text,
.theme-2 .logo-text,
.theme-3 .logo-text {
    color: #2a2a2a !important;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5) !important;
}
.theme-1 .dock-title,
.theme-2 .dock-title,
.theme-3 .dock-title {
    color: rgba(0,0,0,0.5) !important;
}
/* Undo button light theme */
.theme-1 .icon-btn,
.theme-2 .icon-btn,
.theme-3 .icon-btn {
    color: #2a2a2a !important;
}
/* Badge on light themes */
.theme-1 .badge,
.theme-2 .badge,
.theme-3 .badge {
    background: rgba(0,0,0,0.12) !important;
    color: #2a2a2a !important;
}
/* Theme picker panel on light themes */
.theme-1 .theme-picker-panel,
.theme-2 .theme-picker-panel,
.theme-3 .theme-picker-panel {
    background: rgba(255,255,255,0.5) !important;
}
.theme-1 .theme-icon-btn,
.theme-2 .theme-icon-btn,
.theme-3 .theme-icon-btn {
    background: rgba(0,0,0,0.08) !important;
    border-color: rgba(0,0,0,0.15) !important;
}
.theme-1 .theme-icon-btn.active,
.theme-2 .theme-icon-btn.active,
.theme-3 .theme-icon-btn.active {
    background: rgba(0,0,0,0.15) !important;
}
/* Big score card on light themes */
.theme-1 .big-score-card,
.theme-2 .big-score-card,
.theme-3 .big-score-card {
    background: rgba(255,255,255,0.4) !important;
}

/* ==========================================================================
   DYNAMIC TEXT OVERLAYS (COMBO POP & THEME BANNER)
   ========================================================================== */
.combo-pop-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scaleX(0);
    width: 100%;
    padding: 16px 0;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 3.2rem;
    font-weight: 900;
    font-style: italic;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 0 24px rgba(0, 0, 0, 0.5);
    -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 1100;
    opacity: 0;
    white-space: nowrap;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border-top: 3px solid rgba(255, 255, 255, 0.35);
    border-bottom: 3px solid rgba(255, 255, 255, 0.35);
    will-change: transform, opacity;
}

/* Hide the undo button */
#undo-btn {
    display: none !important;
}

.combo-pop-overlay.animate {
    animation: comboBarAnim 1.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.combo-pop-overlay.combo-pop-2 {
    background: linear-gradient(90deg, rgba(59,130,246,0) 0%, rgba(59,130,246,0.9) 20%, rgba(59,130,246,0.9) 80%, rgba(59,130,246,0) 100%);
    border-color: rgba(96, 165, 250, 0.6);
    text-shadow: 0 0 10px #fff, 0 0 20px #2563eb, 0 0 30px #2563eb;
}
.combo-pop-overlay.combo-pop-3 {
    background: linear-gradient(90deg, rgba(236,72,153,0) 0%, rgba(236,72,153,0.92) 20%, rgba(236,72,153,0.92) 80%, rgba(236,72,153,0) 100%);
    border-color: rgba(244, 114, 182, 0.6);
    text-shadow: 0 0 10px #fff, 0 0 20px #db2777, 0 0 30px #db2777;
}
.combo-pop-overlay.combo-pop-4 {
    background: linear-gradient(90deg, rgba(245,158,11,0) 0%, rgba(245,158,11,0.95) 20%, rgba(245,158,11,0.95) 80%, rgba(245,158,11,0) 100%);
    border-color: rgba(251, 191, 36, 0.6);
    text-shadow: 0 0 10px #fff, 0 0 20px #d97706, 0 0 30px #ffd700;
}
.combo-pop-overlay.combo-pop-high {
    background: linear-gradient(90deg, rgba(168,85,247,0) 0%, rgba(168,85,247,0.95) 20%, rgba(168,85,247,0.95) 80%, rgba(168,85,247,0) 100%);
    border-color: rgba(192, 132, 252, 0.7);
    text-shadow: 0 0 10px #fff, 0 0 20px #a855f7, 0 0 40px #00ff88;
}

@keyframes comboBarAnim {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scaleX(0);
        filter: blur(8px);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scaleX(1);
        filter: blur(0);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%) scaleX(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scaleX(0);
        filter: blur(12px);
    }
}

.theme-banner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scaleX(0);
    width: 100%;
    padding: 15px 0;
    background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 20%, rgba(0,0,0,0.85) 80%, rgba(0,0,0,0) 100%);
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: #ffd700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    pointer-events: none;
    z-index: 1200;
    opacity: 0;
    white-space: nowrap;
    will-change: transform, opacity;
}

.theme-banner-overlay.animate {
    animation: themeBannerAnim 2.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes themeBannerAnim {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scaleX(0);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scaleX(1);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%) scaleX(1);
        filter: drop-shadow(0 0 10px rgba(255,215,0,0.5));
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scaleX(0);
    }
}

/* ==========================================================================
   START SCREEN & SETTINGS OVERLAYS & TOGGLE SWITCH
   ========================================================================== */
.start-overlay, .settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.4s ease;
}

.start-overlay.hidden, .settings-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.start-card, .settings-card {
    width: 90%;
    max-width: 400px;
    padding: 35px 25px;
    text-align: center;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Blocky Colorful Logo for Start Screen */
.start-logo-blocky {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.logo-row {
    display: flex;
    gap: 6px;
}
.logo-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: #fff;
    border-radius: 6px;
    
    /* 3D blocky styles */
    background-image: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.05) 50%, rgba(0,0,0,0.2) 100%);
    border-top: 3px solid rgba(255, 255, 255, 0.45);
    border-left: 3px solid rgba(255, 255, 255, 0.45);
    border-right: 3px solid rgba(0, 0, 0, 0.25);
    border-bottom: 3px solid rgba(0, 0, 0, 0.25);
    box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.35), 
                inset 0 -2px 3px rgba(0, 0, 0, 0.25),
                0 3px 8px rgba(0, 0, 0, 0.4);
    text-shadow: 0 2px 4px rgba(0,0,0,0.35);
}

/* Colors matching the block master pro color scheme */
.letter-b { background-color: #ef4444 !important; }
.letter-l { background-color: #f97316 !important; }
.letter-o { background-color: #eab308 !important; }
.letter-c { background-color: #22c55e !important; }
.letter-k { background-color: #3b82f6 !important; }

.letter-m { background-color: #a855f7 !important; }
.letter-a { background-color: #ec4899 !important; }
.letter-s { background-color: #06b6d4 !important; }
.letter-t { background-color: #84cc16 !important; }
.letter-e { background-color: #14b8a6 !important; }
.letter-r { background-color: #f97316 !important; }

.letter-p  { background-color: #ef4444 !important; }
.letter-r2 { background-color: #3b82f6 !important; }
.letter-o2 { background-color: #eab308 !important; }

/* Bubbly pulsey play button */
.start-play-btn {
    background: linear-gradient(180deg, #ffd700 0%, #d97706 100%) !important;
    border: 3px solid #fff !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4), inset 0 2px 4px rgba(255,255,255,0.45);
    color: #fff !important;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    padding: 12px 64px !important;
    border-radius: 30px !important;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0,0,0,0.35);
    transition: transform 0.2s, filter 0.2s;
    animation: playPulse 1.8s infinite ease-in-out;
    outline: none;
    align-self: center;
}
.start-play-btn:hover {
    filter: brightness(1.1);
}
.start-play-btn:active {
    transform: scale(0.95) !important;
}

@keyframes playPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.start-high-score {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 80%;
    margin: 0 auto;
}
.start-score-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}
.start-high-val {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffd700;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.start-btn-secondary, .settings-close-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.start-btn-secondary:hover, .settings-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.start-btn-secondary:active, .settings-close-btn:active {
    transform: translateY(1px);
}

.settings-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: #ffffff;
    letter-spacing: 1px;
}

.settings-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 10px 0;
}

.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.option-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.danger-btn {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.danger-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.02);
}

.danger-btn:active {
    transform: scale(0.98);
}

/* Toggle Switch Styling */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.12);
    transition: 0.3s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input:checked + .slider {
    background-color: #00ff88;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Motivation Sentence in Game Over card */
.go-motivation {
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    padding: 10px 14px;
    margin: 8px 0 14px 0;
    border-left: 3px solid #a855f7;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 8px 8px 0;
    text-align: left;
}

/* Game Over Sad Dispersal Animations */
.board-grid.game-over-fade {
    transition: filter 3.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 3.5s ease !important;
    filter: grayscale(1.0) brightness(0.25) contrast(0.6) blur(0.5px) !important;
}

/* Game Over Board Active State (Full-fill volcano glowing board style) */
.board-grid.game-over-active {
    border-color: rgba(239, 68, 68, 0.6) !important;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.35), inset 0 0 20px rgba(239, 68, 68, 0.15) !important;
    transition: border-color 0.5s ease, box-shadow 0.5s ease !important;
}

/* Game Over Block (All Cells Fill Up with this new visual) */
.grid-cell.game-over-block {
    background-image: linear-gradient(135deg, rgba(239, 68, 68, 0.8) 0%, rgba(185, 28, 28, 0.95) 50%, rgba(17, 24, 39, 0.98) 100%) !important;
    border-top: 3.5px solid rgba(255, 255, 255, 0.55) !important;
    border-left: 3.5px solid rgba(255, 255, 255, 0.55) !important;
    border-right: 3.5px solid rgba(0, 0, 0, 0.65) !important;
    border-bottom: 3.5px solid rgba(0, 0, 0, 0.65) !important;
    box-shadow: inset 0 2.5px 3.5px rgba(255, 255, 255, 0.35), 
                inset 0 -2.5px 3.5px rgba(0, 0, 0, 0.6),
                0 0 14px rgba(239, 68, 68, 0.6) !important;
    animation: gameOverBlockPulse 1.6s infinite ease-in-out;
    opacity: 1 !important;
    z-index: 5;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
}

@keyframes gameOverBlockPulse {
    0%, 100% {
        box-shadow: inset 0 2.5px 3.5px rgba(255, 255, 255, 0.25), 
                    inset 0 -2.5px 3.5px rgba(0, 0, 0, 0.6),
                    0 0 12px rgba(239, 68, 68, 0.5) !important;
        filter: brightness(1.0) saturate(1.0);
    }
    50% {
        box-shadow: inset 0 2.5px 3.5px rgba(255, 255, 255, 0.4), 
                    inset 0 -2.5px 3.5px rgba(0, 0, 0, 0.6),
                    0 0 22px rgba(239, 68, 68, 0.95) !important;
        filter: brightness(1.3) saturate(1.2);
    }
}

/* No Moves Warning on dock container */
.shapes-dock-grid.no-moves-warning {
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3) !important;
    animation: dockWarningPulse 1.4s infinite ease-in-out;
}

@keyframes dockWarningPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.25) !important;
        border-color: rgba(239, 68, 68, 0.35) !important;
    }
    50% {
        box-shadow: 0 0 22px rgba(239, 68, 68, 0.65) !important;
        border-color: rgba(239, 68, 68, 0.8) !important;
    }
}

.shapes-dock-grid.game-over-fade {
    transition: filter 3.5s ease, opacity 3.5s ease !important;
    filter: grayscale(1.0) brightness(0.18) !important;
    opacity: 0.25 !important;
}

.game-header.game-over-fade {
    transition: filter 3.5s ease, opacity 3.5s ease !important;
    filter: grayscale(0.5) brightness(0.4) !important;
    opacity: 0.4 !important;
}

.grid-cell.filled.disperse {
    animation: blockFallAnim 3.5s cubic-bezier(0.3, 0.1, 0.3, 1) forwards !important;
    pointer-events: none !important;
    z-index: 10 !important;
    transition: none !important;
}

@keyframes blockFallAnim {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    }
    8% {
        /* Slight physical bump/lift before falling */
        transform: translate(0, -6px) rotate(3deg) scale(1.02);
        opacity: 1;
    }
    100% {
        transform: translate(var(--disperse-x, 0px), var(--disperse-y, 450px)) rotate(var(--disperse-r, 180deg)) scale(0.8);
        opacity: 0;
        filter: grayscale(0.9) brightness(0.15);
        box-shadow: none !important;
    }
}

.settings-option-vertical {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
}

/* 2-row Grid Layout for Settings Themes Selector */
.settings-option-vertical .theme-scroll-picker {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(2, auto) !important;
    gap: 12px !important;
    padding: 8px 0 !important;
    overflow-x: visible !important;
}

/* Locked Theme Icon buttons */
.theme-icon-btn.locked {
    position: relative;
    opacity: 0.55;
    border-color: rgba(255, 255, 255, 0.06) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.theme-icon-btn.locked::after {
    content: "🔒";
    position: absolute;
    bottom: -3px;
    right: -3px;
    font-size: 0.72rem;
    background: #0d1117;
    border-radius: 50%;
    width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Premium Upgrade Modal */
.premium-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    transition: opacity 0.4s ease;
}

.premium-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.premium-card {
    width: 90%;
    max-width: 370px;
    padding: 35px 25px;
    text-align: center;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.25) !important;
    background: rgba(18, 14, 28, 0.8) !important;
}

.premium-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #0d1117;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
    margin: 0 auto;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.premium-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-description {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.55;
}

.premium-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-item {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 6px;
}

.premium-buy-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #0d1117;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

.premium-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.55);
}

.premium-buy-btn:active {
    transform: translateY(1px);
}

.premium-close-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 11px 20px;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    width: 100%;
}

.premium-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.premium-close-btn:active {
    transform: translateY(1px);
}

/* ==========================================================================
   UNIFIED CONTRAST OVERRIDES FOR THEME OVERLAYS
   ========================================================================== */
.start-card, .settings-card, .premium-card, .go-card {
    background: rgba(14, 17, 27, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    color: #ffffff !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}

/* Theme-specific modal override styling */
/* Theme 0 (Jungle Temple) */
.theme-0 .start-card, .theme-0 .settings-card, .theme-0 .premium-card, .theme-0 .go-card {
    border: 2px solid #5d4037 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(76, 175, 80, 0.15) !important;
}
.theme-0 .settings-title {
    color: #81c784 !important;
    text-shadow: 0 2px 4px rgba(76, 175, 80, 0.3) !important;
}
.theme-0 .settings-close-btn, .theme-0 .start-btn-secondary {
    background: #5d4037 !important;
    border: 1px solid #8d6e63 !important;
}
.theme-0 .settings-close-btn:hover, .theme-0 .start-btn-secondary:hover {
    background: #8d6e63 !important;
}

/* Theme 1 (Sky Slate) */
.theme-1 .start-card, .theme-1 .settings-card, .theme-1 .premium-card, .theme-1 .go-card {
    border: 2px solid #a68422 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.15) !important;
}
.theme-1 .settings-title {
    color: #ffd700 !important;
    text-shadow: 0 2px 4px rgba(212, 175, 55, 0.3) !important;
}
.theme-1 .settings-close-btn, .theme-1 .start-btn-secondary {
    background: #a68422 !important;
    border: 1px solid #ffd700 !important;
    color: #14191d !important;
}
.theme-1 .settings-close-btn:hover, .theme-1 .start-btn-secondary:hover {
    background: #ffd700 !important;
}

/* Theme 2 (Frost Blue) */
.theme-2 .start-card, .theme-2 .settings-card, .theme-2 .premium-card, .theme-2 .go-card {
    border: 2px solid #5aa7c5 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(123, 198, 227, 0.15) !important;
}
.theme-2 .settings-title {
    color: #7bc6e3 !important;
    text-shadow: 0 2px 4px rgba(123, 198, 227, 0.3) !important;
}
.theme-2 .settings-close-btn, .theme-2 .start-btn-secondary {
    background: #5aa7c5 !important;
    border: 1px solid #7bc6e3 !important;
    color: #ffffff !important;
}
.theme-2 .settings-close-btn:hover, .theme-2 .start-btn-secondary:hover {
    background: #7bc6e3 !important;
}

/* Theme 3 (Warm Sand) */
.theme-3 .start-card, .theme-3 .settings-card, .theme-3 .premium-card, .theme-3 .go-card {
    border: 2px solid #b87b32 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(217, 156, 82, 0.15) !important;
}
.theme-3 .settings-title {
    color: #d99c52 !important;
    text-shadow: 0 2px 4px rgba(217, 156, 82, 0.3) !important;
}
.theme-3 .settings-close-btn, .theme-3 .start-btn-secondary {
    background: #b87b32 !important;
    border: 1px solid #d99c52 !important;
    color: #ffffff !important;
}
.theme-3 .settings-close-btn:hover, .theme-3 .start-btn-secondary:hover {
    background: #d99c52 !important;
}

/* Theme 4 (Undersea Ruins) */
.theme-4 .start-card, .theme-4 .settings-card, .theme-4 .premium-card, .theme-4 .go-card {
    border: 2px solid #1f3a46 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 229, 255, 0.15) !important;
}
.theme-4 .settings-title {
    color: #00e5ff !important;
    text-shadow: 0 2px 4px rgba(0, 229, 255, 0.3) !important;
}
.theme-4 .settings-close-btn, .theme-4 .start-btn-secondary {
    background: #1f3a46 !important;
    border: 1px solid #00e5ff !important;
}
.theme-4 .settings-close-btn:hover, .theme-4 .start-btn-secondary:hover {
    background: #00e5ff !important;
    color: #071116 !important;
}

/* Theme 5 (Volcanic Cave) */
.theme-5 .start-card, .theme-5 .settings-card, .theme-5 .premium-card, .theme-5 .go-card {
    border: 2px solid #d84315 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 61, 0, 0.15) !important;
}
.theme-5 .settings-title {
    color: #ff3d00 !important;
    text-shadow: 0 2px 4px rgba(255, 61, 0, 0.3) !important;
}
.theme-5 .settings-close-btn, .theme-5 .start-btn-secondary {
    background: #d84315 !important;
    border: 1px solid #ff3d00 !important;
}
.theme-5 .settings-close-btn:hover, .theme-5 .start-btn-secondary:hover {
    background: #ff3d00 !important;
}

/* Theme 6 (Cosmic Void) */
.theme-6 .start-card, .theme-6 .settings-card, .theme-6 .premium-card, .theme-6 .go-card {
    border: 2px solid #aa00ff !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(213, 0, 249, 0.15) !important;
}
.theme-6 .settings-title {
    color: #d500f9 !important;
    text-shadow: 0 2px 4px rgba(213, 0, 249, 0.3) !important;
}
.theme-6 .settings-close-btn, .theme-6 .start-btn-secondary {
    background: #aa00ff !important;
    border: 1px solid #d500f9 !important;
}
.theme-6 .settings-close-btn:hover, .theme-6 .start-btn-secondary:hover {
    background: #d500f9 !important;
}

/* Theme 7 (Medieval Dungeon) */
.theme-7 .start-card, .theme-7 .settings-card, .theme-7 .premium-card, .theme-7 .go-card {
    border: 2px solid #424242 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 255, 255, 0.05) !important;
}
.theme-7 .settings-title {
    color: #bdbdbd !important;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.1) !important;
}
.theme-7 .settings-close-btn, .theme-7 .start-btn-secondary {
    background: #424242 !important;
    border: 1px solid #757575 !important;
}
.theme-7 .settings-close-btn:hover, .theme-7 .start-btn-secondary:hover {
    background: #757575 !important;
}

/* Maintain beautiful gradients for logos and special badge texts */
.start-logo {
    background: linear-gradient(135deg, #ffffff 0%, #a855f7 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block;
}

.premium-title {
    background: linear-gradient(135deg, #ffd700 0%, #ffffff 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block;
}

/* Label and description sub-colors */
.settings-option .option-label, .settings-option-vertical .option-label {
    color: rgba(255, 255, 255, 0.85) !important;
}

.start-description, .premium-description, .go-motivation, .go-subtitle {
    color: rgba(255, 255, 255, 0.65) !important;
}

.start-score-label, .go-score-label, .go-stat-lbl {
    color: rgba(255, 255, 255, 0.45) !important;
}

.start-score-val, .go-score-val, .go-stat-val {
    color: #ffd700 !important;
}

/* Reset buttons style to prevent light-theme button color bleeding */
.start-btn-primary, .premium-buy-btn {
    color: #0d1117 !important;
    font-weight: 800 !important;
}

.start-btn-primary {
    background: linear-gradient(135deg, #00ff88 0%, #00bfff 100%) !important;
}

.premium-buy-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%) !important;
}

.danger-btn {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.start-btn-secondary, .settings-close-btn, .premium-close-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Interactive Credit Card Styling */
.card-visual {
    background: linear-gradient(135deg, #1d182e 0%, #0c0a13 100%) !important;
    border: 1px solid rgba(255, 215, 0, 0.25) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    position: relative !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45) !important;
    margin-bottom: 8px !important;
    box-sizing: border-box !important;
}

.card-chip {
    width: 32px;
    height: 24px;
    background: linear-gradient(135deg, #ffd700 0%, #b8901b 100%) !important;
    border-radius: 5px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

.card-number-display {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 1.25rem !important;
    letter-spacing: 2px !important;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6) !important;
    margin: 4px 0 !important;
}

.card-details-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 0.72rem !important;
    color: rgba(255, 255, 255, 0.55) !important;
    text-transform: uppercase !important;
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: 1px !important;
}

.card-holder-display {
    font-weight: 600 !important;
}

.card-expiry-display {
    font-weight: 600 !important;
}

/* Payment Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    font-size: 0.72rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
}

.form-input {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    color: #ffffff !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.9rem !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, background-color 0.2s !important;
}

.form-input:focus {
    border-color: #ffd700 !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Payment Spinner and Loader */
.payment-loader {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 24px 0 !important;
}

.spinner {
    width: 44px !important;
    height: 44px !important;
    border: 4px solid rgba(255, 215, 0, 0.08) !important;
    border-top-color: #ffd700 !important;
    border-radius: 50% !important;
    animation: paySpinner 1s linear infinite !important;
}

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

/* Fix PRO badge text contrast inside gradient start-logo */
.start-logo .logo-badge {
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
    -webkit-text-fill-color: #0d1117 !important;
    color: #0d1117 !important;
    background: var(--theme-primary) !important;
    box-shadow: 0 0 10px var(--theme-glow) !important;
    display: inline-block !important;
    vertical-align: middle !important;
    font-size: 0.62rem !important;
    padding: 3px 6px !important;
    margin-left: 6px !important;
    line-height: 1 !important;
}

/* Floating Score Popups */
.floating-score {
    position: absolute;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.6rem;
    color: #ffd700;
    text-shadow: 0 0 4px #000, 0 2px 4px rgba(0,0,0,0.6);
    pointer-events: none;
    z-index: 1000;
    animation: floatUpFade 0.8s ease-out forwards;
}

@keyframes floatUpFade {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    15% {
        transform: translateY(-12px) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-45px) scale(1);
        opacity: 0;
    }
}

/* Force-override all theme-specific dock slot borders, backgrounds, and box-shadows to keep it minimal and floating */
[class*="theme-"] .dock-slot,
.dock-slot {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
[class*="theme-"] .dock-slot:hover,
.dock-slot:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
[class*="theme-"] .dock-slot.empty,
.dock-slot.empty {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Multiplier floating popups (2x, 3x, 4x) */
.floating-score.floating-multiplier {
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    color: #ff9f00 !important; /* Rich Orange */
    text-shadow: 0 0 8px rgba(255, 159, 0, 0.7), 0 3px 6px #000 !important;
    animation: floatMultiplier 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes floatMultiplier {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -70%) scale(1.4);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -120%) scale(1);
        opacity: 0;
    }
}

/* Simulated Line Completion Preview Glow */
.grid-cell.highlight-ghost-line {
    box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.6), 0 0 10px rgba(255, 215, 0, 0.4) !important;
    border: 1.5px solid #ffd700 !important;
    opacity: 0.95 !important;
    background-color: rgba(255, 215, 0, 0.15) !important;
}

/* When the landing ghost cells are part of a completed line, show them as gold-selected too */
.grid-cell.highlight-ghost.highlight-ghost-line {
    border: 2px solid #ffd700 !important;
    box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.8), 0 0 10px rgba(255, 215, 0, 0.5) !important;
    opacity: 0.85 !important;
    filter: brightness(1.3) saturate(1.1) !important;
}

/* Dragging block shape changes to gold when it is placed to complete a line */
.drag-clone.will-clear-lines .drag-clone-cell {
    background-image: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,215,0,0.45) 50%, rgba(217,119,6,0.3) 100%) !important;
    background-color: #ffd700 !important;
    border-top: 3px solid rgba(255, 255, 255, 0.65) !important;
    border-left: 3px solid rgba(255, 255, 255, 0.65) !important;
    border-right: 3px solid rgba(217, 119, 6, 0.5) !important;
    border-bottom: 3px solid rgba(217, 119, 6, 0.5) !important;
    box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.5), 
                inset 0 -2px 3px rgba(0, 0, 0, 0.3),
                0 10px 24px rgba(255, 215, 0, 0.4) !important;
}

/* Enforce minimal modern glassmorphism frame for the board container across all themes */
[class*="theme-"] .board-container,
.board-container {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
                inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
    padding: 12px !important; /* Symmetric padding to eliminate alignment bleeding */
    width: fit-content !important; /* Prevents frame stretching for perfect square proportions */
    margin: 0 auto !important; /* Center the board in the game wrapper */
}

/* Align particle engine overlay with the new symmetric padding */
.effects-overlay {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    width: calc(100% - 24px) !important;
    height: calc(100% - 24px) !important;
    pointer-events: none !important;
    z-index: 5 !important;
}

/* Ensure no cell subpixel borders can bleed out of the board grid */
.board-grid {
    overflow: hidden !important;
}
