* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(135deg, #0d0d1a 0%, #1a0d2e 50%, #0d1a2e 100%);
    background-attachment: fixed;
    color: #f1f5f9;
    min-height: 100vh;
    padding: 20px;
}

.screen { display: none; }
.screen.active { display: block; }

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

header {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px 0;
}

h1 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

header p {
    color: #94a3b8;
    font-size: 1rem;
}

/* === BUTTONS === */
button {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

button:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.menu-btn {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.shop-btn {
    background: linear-gradient(135deg, #b45309, #f59e0b);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.start-btn {
    background: linear-gradient(135deg, #065f46, #10b981);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    font-size: 1.1rem;
    padding: 14px 36px;
}

.create-btn {
    background: linear-gradient(135deg, #b45309, #f59e0b);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    width: 100%;
    font-size: 1.05rem;
    padding: 14px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.ad-watch {
    background: linear-gradient(135deg, #9d174d, #ec4899);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

/* === AD BANNER === */
.ad-banner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    color: #475569;
    font-size: 0.82rem;
    font-style: italic;
}

/* === MAIN MENU === */
.menu-container {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
}

.menu-stats {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.menu-stats .stat {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 50px;
    padding: 10px 28px;
}

.menu-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 24px 0;
}

.menu-options button {
    width: 100%;
    padding: 18px 12px;
    font-size: 1rem;
    border-radius: 12px;
}

.menu-options button:nth-child(1) {
    background: linear-gradient(135deg, #065f46, #10b981);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.menu-options button:nth-child(2) {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.menu-options button:nth-child(3) {
    background: linear-gradient(135deg, #6d28d9, #8b5cf6);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.menu-options button:nth-child(4) {
    background: linear-gradient(135deg, #b45309, #f59e0b);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.menu-options button:nth-child(5),
.menu-options button:nth-child(6),
.menu-options button:nth-child(7) {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    color: #94a3b8;
    font-size: 0.85rem;
}

.menu-options button:nth-child(7) {
    grid-column: 1 / -1;
    color: #64748b;
}

.menu-options button:nth-child(5):hover,
.menu-options button:nth-child(6):hover,
.menu-options button:nth-child(7):hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: none;
}

/* === GAME INFO BAR === */
.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.stats {
    display: flex;
    gap: 12px;
}

.stat {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    text-align: center;
    min-width: 70px;
}

.stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 3px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
    flex-wrap: wrap;
}

/* === MODALS === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f2744 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 36px;
    border-radius: 20px;
    width: 90%;
    max-width: 460px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.modal h2 {
    margin-bottom: 16px;
    font-size: 1.8rem;
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal p {
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.coins-earned {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f59e0b;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

/* === SIZE SELECTOR === */
.size-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
}

.size-option {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.88rem;
    color: #cbd5e1;
    user-select: none;
}

.size-option:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.size-option.selected {
    background: rgba(124, 58, 237, 0.25);
    border-color: #7c3aed;
    color: #a78bfa;
    font-weight: 600;
}

/* === SETUP SCREEN === */
.setup-options {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.setup-section {
    margin-bottom: 28px;
}

.setup-section:last-child {
    margin-bottom: 0;
}

.setup-section h3 {
    margin-bottom: 14px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.design-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.design-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
}

.design-option:hover:not(.locked) {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.design-option.selected {
    background: rgba(124, 58, 237, 0.2);
    border-color: #7c3aed;
    transform: translateY(-2px);
}

.design-option.locked {
    opacity: 0.45;
    cursor: not-allowed;
}

.design-preview {
    width: 52px;
    height: 70px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
}

.design-option span {
    font-size: 0.72rem;
    color: #94a3b8;
    text-align: center;
}

.design-option.selected span {
    color: #a78bfa;
}

.design-price {
    font-size: 0.68rem;
    color: #f59e0b;
}

.wood-texture {
    background: linear-gradient(160deg, #8B4513, #5C3317, #8B4513);
}

.space-texture {
    background: radial-gradient(circle at 35% 35%, #1a237e, #000030);
}

.rider-red-texture {
    background-color: #c41e3a;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'><line x1='0' y1='10' x2='10' y2='0' stroke='rgba(255,255,255,0.25)' stroke-width='0.8'/><line x1='0' y1='0' x2='10' y2='10' stroke='rgba(255,255,255,0.18)' stroke-width='0.6'/></svg>");
    background-size: 10px 10px;
}

.rider-blue-texture {
    background-color: #1a4a9c;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'><line x1='0' y1='10' x2='10' y2='0' stroke='rgba(255,255,255,0.25)' stroke-width='0.8'/><line x1='0' y1='0' x2='10' y2='10' stroke='rgba(255,255,255,0.18)' stroke-width='0.6'/></svg>");
    background-size: 10px 10px;
}

.vintage-texture {
    background-color: #f4e8d0;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'><line x1='0' y1='10' x2='10' y2='0' stroke='rgba(92,42,10,0.18)' stroke-width='0.8'/><line x1='0' y1='0' x2='10' y2='10' stroke='rgba(92,42,10,0.12)' stroke-width='0.6'/></svg>");
    background-size: 10px 10px;
}

.setup-info {
    text-align: center;
    margin-top: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.88rem;
}

.coin-preview {
    font-weight: 700;
    color: #f59e0b;
    margin-top: 8px;
    font-size: 1rem;
}

.setup-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.game-settings {
    display: flex;
    justify-content: center;
}

.setting-info {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #94a3b8;
}

/* === DECK TYPE BUTTONS === */
.deck-type-selector {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.deck-type-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.88rem;
    color: #94a3b8;
    box-shadow: none;
}

.deck-type-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: none;
}

.deck-type-btn.selected {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #fbbf24;
    font-weight: 600;
}

/* === DECK CONTAINERS === */
.custom-decks-container {
    margin-top: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.custom-deck-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.custom-deck-option:last-child { margin-bottom: 0; }

.custom-deck-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.custom-deck-option.selected {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.custom-deck-option.selected::after {
    content: "✓";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #f59e0b;
    color: #000;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
}

.deck-preview { display: flex; gap: 4px; }

.deck-preview-image, .card-back-preview {
    width: 34px;
    height: 46px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.official-faces-preview, .default-back-preview {
    width: 34px;
    height: 46px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    color: #64748b;
    line-height: 1.2;
    padding: 2px;
}

.deck-info h4 {
    margin-bottom: 3px;
    color: #fbbf24;
    font-size: 0.88rem;
}

.deck-info p {
    font-size: 0.75rem;
    color: #64748b;
}

.no-decks-message {
    text-align: center;
    padding: 20px;
    color: #475569;
    font-size: 0.88rem;
}

/* === SPECIAL DECK OPTIONS (in setup) === */
.special-deck-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.special-deck-option:last-child { margin-bottom: 0; }

.special-deck-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.special-deck-option.selected {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.special-deck-option.selected::after {
    content: "✓";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #f59e0b;
    color: #000;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
}

.special-deck-icon {
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    flex-shrink: 0;
}

.special-deck-info h4 {
    color: #fbbf24;
    font-size: 0.88rem;
    margin-bottom: 3px;
}

.special-deck-info p {
    font-size: 0.75rem;
    color: #64748b;
}

.special-deck-lock {
    font-size: 0.9rem;
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0.7;
}

.special-deck-option.locked {
    opacity: 0.55;
    cursor: not-allowed;
}

.special-deck-option.locked:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.special-deck-option.locked .special-deck-info p {
    color: #f59e0b;
    opacity: 0.8;
}

/* === SHOP === */
.shop-stats {
    display: flex;
    justify-content: center;
    margin: 12px 0;
}

.shop-content {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

/* Shop tabs */
.shop-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.shop-tab {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    box-shadow: none;
    transition: all 0.2s ease;
}

.shop-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
    box-shadow: none;
}

.shop-tab.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #fbbf24;
    box-shadow: none;
}

/* Shop grids */
.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.shop-items-grid--decks {
    grid-template-columns: repeat(2, 1fr);
}

/* Shop item card */
.shop-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 8px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-item:hover:not(.cannot-afford) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.shop-item.selected,
.shop-item.owned-deck {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.shop-item.cannot-afford {
    opacity: 0.38;
    cursor: not-allowed;
}

/* Card back preview — looks like an actual card back */
.shop-card-preview {
    width: 58px;
    height: 78px;
    margin: 0 auto 8px;
    border-radius: 7px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
}

/* Subtle shine overlay on card back */
.shop-card-preview::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
    border-radius: 5px 5px 0 0;
    pointer-events: none;
}

/* Inner frame detail */
.card-preview-inner {
    position: absolute;
    inset: 5px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.wood-texture {
    background: linear-gradient(160deg, #8B4513, #5C3317, #8B4513);
}

.space-texture {
    background: radial-gradient(circle at 35% 35%, #1a237e, #000030);
}

/* Special deck preview */
.shop-deck-preview {
    width: 72px;
    height: 78px;
    margin: 0 auto 8px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.shop-deck-preview::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
    pointer-events: none;
}

.shop-deck-emoji {
    font-size: 2rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.shop-deck-lock {
    position: absolute;
    bottom: 3px;
    right: 4px;
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Item name + status */
.shop-item-name {
    font-weight: 600;
    font-size: 0.78rem;
    margin-bottom: 4px;
    color: #e2e8f0;
    line-height: 1.3;
}

.shop-item-status {
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 2px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.shop-item-status.free  { color: #a78bfa; }
.shop-item-status.owned { color: #10b981; }
.shop-item-status.price { color: #f59e0b; }

.shop-item-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.shop-item-badge.buyable {
    color: #34d399;
}

.shop-controls {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

/* Legacy class kept for compatibility */
.shop-items-container { display: block; }
.shop-item-image { display: none; }
.purchase-hint { font-size: 0.7rem; color: #34d399; font-weight: 600; }

@media (max-width: 480px) {
    .shop-items-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .shop-items-grid--decks { grid-template-columns: repeat(2, 1fr); }
    .shop-card-preview { width: 48px; height: 64px; }
    .shop-deck-preview { width: 58px; height: 64px; }
    .shop-deck-emoji { font-size: 1.6rem; }
}

/* === PASS & PLAY === */
.player-turn {
    background: rgba(255, 255, 255, 0.07);
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.player-indicators {
    display: flex;
    justify-content: space-around;
    margin-bottom: 12px;
    gap: 10px;
}

.player-indicator {
    flex: 1;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.88rem;
}

.player-1 { color: #60a5fa; }
.player-2 { color: #34d399; }

.player-indicator.active {
    transform: scale(1.02);
}

.player-1.active { border-color: #3b82f6; background: rgba(59, 130, 246, 0.14); }
.player-2.active { border-color: #10b981; background: rgba(16, 185, 129, 0.14); }

.player-scores {
    margin: 16px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px;
}

.player-scores p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #cbd5e1;
}

/* === DECK CREATION === */
.deck-creation-container {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.deck-creation-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
}

.creation-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.creation-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.creation-option.selected {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.creation-option h3 {
    margin-bottom: 8px;
    color: #fbbf24;
    font-size: 1rem;
}

.creation-option p {
    font-size: 0.82rem;
    color: #94a3b8;
}

.deck-size-selector {
    margin-bottom: 20px;
}

.deck-size-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.88rem;
}

.deck-size-selector select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    font-size: 0.92rem;
}

.deck-size-selector select option {
    background: #1e293b;
    color: #f1f5f9;
}

.image-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

.image-upload-area:hover {
    border-color: rgba(255, 255, 255, 0.28);
}

.image-upload-area p {
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 0.86rem;
}

.uploaded-images-container {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.uploaded-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.uploaded-image-container {
    position: relative;
    display: inline-block;
}

.uploaded-image {
    width: 54px;
    height: 68px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.uploaded-image:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.45);
}

.remove-image-btn {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    box-shadow: none;
    transform: none;
    min-width: unset;
    width: 18px;
}

.remove-image-btn:hover {
    background: #dc2626;
    transform: scale(1.15);
    box-shadow: none;
}

.image-counter {
    text-align: center;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #475569;
    font-weight: 600;
}

.uploaded-card-back {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.uploaded-card-back img {
    width: 96px;
    height: 128px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.creation-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.deck-images-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.image-compression-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 14px;
    text-align: center;
    font-size: 0.82rem;
    color: #93c5fd;
}

/* === COIN ICON === */
.coin-icon {
    display: inline-block;
    width: 17px;
    height: 17px;
    background: radial-gradient(circle at 35% 30%, #fde68a, #f59e0b 60%, #b45309);
    border-radius: 50%;
    border: 1.5px solid #d97706;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    margin: 0 4px;
    vertical-align: middle;
    position: relative;
}

.coin-icon.small { width: 13px; height: 13px; }
.coin-icon.large { width: 24px; height: 24px; margin: 0 6px; }

.coin-text {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #f59e0b;
    font-weight: 700;
}

/* === INSTRUCTIONS === */
.instructions {
    text-align: left;
    margin: 16px 0;
}

.instructions p {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.5;
}

.instructions p::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #f59e0b;
}

/* === STORAGE === */
.storage-warning {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 10px;
    border-radius: 8px;
    margin: 12px 0;
    text-align: center;
    font-weight: 600;
    font-size: 0.84rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.modal textarea {
    width: 100%;
    height: 140px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    font-family: monospace;
    resize: vertical;
    margin-bottom: 14px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.storage-usage-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
}

.storage-usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.storage-usage-fill.warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.storage-usage-fill.critical {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    animation: pulse 1s infinite;
}

/* === SCROLLBARS === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }

    .game-info {
        flex-direction: column;
        gap: 12px;
    }

    .menu-options { grid-template-columns: 1fr; }

    .stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .player-indicators {
        flex-direction: column;
        gap: 8px;
    }

    .design-selector { gap: 8px; }
    .design-option { padding: 7px; }
    .design-preview { width: 44px; height: 60px; }

    .setup-controls {
        flex-direction: column;
        align-items: center;
    }

    .deck-images-section { grid-template-columns: 1fr; }
    .uploaded-images-container { max-height: 140px; }
    .deck-creation-options { grid-template-columns: 1fr; }
    .creation-controls { flex-direction: column; }

    .shop-items-container {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .shop-item-image { width: 64px; height: 86px; font-size: 2rem; }
}

@media (max-width: 480px) {
    body { padding: 12px; }
    h1 { font-size: 1.7rem; }

    .controls {
        flex-direction: column;
        align-items: center;
    }

    button { width: 100%; max-width: 280px; }

    .size-selector { gap: 5px; }
    .size-option { padding: 6px 10px; font-size: 0.82rem; }

    .design-option { padding: 5px; }
    .design-preview { width: 38px; height: 52px; font-size: 1.1rem; }

    .shop-items-container { grid-template-columns: 1fr 1fr; gap: 8px; }
    .menu-options { gap: 8px; }
    .menu-options button { padding: 15px 10px; }

    .deck-type-selector { flex-direction: column; align-items: center; }
}

/* ═══════════════════════════════════════════
   MOBILE GAME LAYOUT
═══════════════════════════════════════════ */

/* Scrollable screens — add bottom clearance for fixed banner */
.scroll-screen {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
}

/* Game/PassPlay screens — full-height flex column, no scroll */
.screen.game-screen.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    padding: 0;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a0d2e 50%, #0d1a2e 100%);
}

/* Top stats bar */
.game-top-bar {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 14px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
}

.game-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.game-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
}

.game-stat--coins {
    flex: 1;
}

.game-stat-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #64748b;
    margin-bottom: 2px;
}

.game-stat-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
}

/* Board area fills all remaining height */
.game-board-container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

/* Bottom controls bar */
.game-bottom-bar {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    padding-bottom: calc(8px + 60px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.game-ctrl-btn {
    flex: 1;
    padding: 10px 6px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    width: auto;
    max-width: none;
}

/* Pass & Play top bar additions */
.pp-turn-bar {
    text-align: center;
    margin-bottom: 5px;
}

.current-player {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pp-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.pp-info-row .game-stat {
    min-width: 40px;
}

.pp-info-row .player-indicator {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

/* Fixed bottom banner ad slot */
.bottom-ad-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    background: rgba(5, 5, 15, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
    z-index: 50;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ad-label {
    font-size: 0.7rem;
    color: #334155;
    font-style: italic;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Touch optimizations */
.game-board,
#ppGameBoard {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    overscroll-behavior: none;
}

button,
.size-option,
.design-option,
.shop-item,
.custom-deck-option,
.special-deck-option,
.shop-tab,
.deck-type-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Prevent bounce scroll on game screens */
.screen.game-screen {
    overscroll-behavior: none;
}

/* ═══════════════════════════════════════════
   INLINE AD SLOTS
═══════════════════════════════════════════ */
.inline-ad-slot {
    width: 100%;
    max-width: 360px;
    height: 56px;
    margin: 10px auto;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.inline-ad-slot .ad-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.18);
    font-style: italic;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   SHOP THEME GRID
═══════════════════════════════════════════ */
.shop-items-grid--themes {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.shop-item--theme {
    padding: 10px 8px 10px;
}

.shop-theme-preview {
    width: 100%;
    height: 72px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 8px;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.shop-theme-preview::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.theme-active-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(16, 185, 129, 0.85);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ═══════════════════════════════════════════
   THEMES — body class overrides
   Only background + h1 gradient per theme.
   Card backs handled in JS via GameConfig.THEMES.
═══════════════════════════════════════════ */

/* --- Classic (green felt) --- */
body.theme-classic {
    background-color: #1c5230;
    background-image:
        url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='6'><line x1='0' y1='6' x2='6' y2='0' stroke='rgba(0,0,0,0.11)' stroke-width='0.7'/><line x1='0' y1='0' x2='6' y2='6' stroke='rgba(255,255,255,0.04)' stroke-width='0.5'/></svg>"),
        radial-gradient(ellipse at center, #2e7a44 0%, #1c5230 55%, #0d2d1a 100%);
    background-attachment: fixed;
    background-size: 6px 6px, cover;
}
body.theme-classic .screen.game-screen.active {
    background-color: #1c5230;
    background-image:
        url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='6'><line x1='0' y1='6' x2='6' y2='0' stroke='rgba(0,0,0,0.11)' stroke-width='0.7'/><line x1='0' y1='0' x2='6' y2='6' stroke='rgba(255,255,255,0.04)' stroke-width='0.5'/></svg>"),
        radial-gradient(ellipse at center, #2e7a44 0%, #1c5230 55%, #0d2d1a 100%);
    background-size: 6px 6px, cover;
}
body.theme-classic h1 {
    background: linear-gradient(135deg, #fde68a, #d4a017);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.theme-classic .modal-content {
    background: linear-gradient(135deg, #0e2d1c 0%, #0a1f12 100%);
}
body.theme-classic .bottom-ad-banner {
    background: rgba(5, 20, 10, 0.94);
}

/* --- Neon City --- */
body.theme-neon {
    background: linear-gradient(135deg, #03031a 0%, #0a0028 50%, #020a14 100%);
}
body.theme-neon .screen.game-screen.active {
    background: linear-gradient(135deg, #03031a 0%, #0a0028 50%, #020a14 100%);
}
body.theme-neon h1 {
    background: linear-gradient(135deg, #00fff7, #ff00e6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.theme-neon .modal-content {
    background: linear-gradient(135deg, #0a0028 0%, #03031a 100%);
}
body.theme-neon .game-top-bar,
body.theme-neon .game-bottom-bar {
    border-color: rgba(0, 255, 247, 0.15);
}

/* --- Sunset --- */
body.theme-sunset {
    background: linear-gradient(135deg, #2d1b1b 0%, #4a1c2a 50%, #3d2010 100%);
}
body.theme-sunset .screen.game-screen.active {
    background: linear-gradient(135deg, #2d1b1b 0%, #4a1c2a 50%, #3d2010 100%);
}
body.theme-sunset h1 {
    background: linear-gradient(135deg, #fbbf24, #f97316, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.theme-sunset .modal-content {
    background: linear-gradient(135deg, #3d1810 0%, #2d1b1b 100%);
}

/* --- Forest --- */
body.theme-forest {
    background: linear-gradient(135deg, #0d1a0d 0%, #1a3d1a 50%, #0d1a14 100%);
}
body.theme-forest .screen.game-screen.active {
    background: linear-gradient(135deg, #0d1a0d 0%, #1a3d1a 50%, #0d1a14 100%);
}
body.theme-forest h1 {
    background: linear-gradient(135deg, #86efac, #d4a017);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.theme-forest .modal-content {
    background: linear-gradient(135deg, #0d1a0d 0%, #0a140a 100%);
}

/* --- Royal --- */
body.theme-royal {
    background: linear-gradient(135deg, #0d0020 0%, #1a0035 50%, #0d0010 100%);
}
body.theme-royal .screen.game-screen.active {
    background: linear-gradient(135deg, #0d0020 0%, #1a0035 50%, #0d0010 100%);
}
body.theme-royal h1 {
    background: linear-gradient(135deg, #fde68a, #d4a017, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.theme-royal .modal-content {
    background: linear-gradient(135deg, #1a0035 0%, #0d0020 100%);
}
body.theme-royal .game-top-bar,
body.theme-royal .game-bottom-bar {
    border-color: rgba(212, 175, 55, 0.2);
}

/* ═══════════════════════════════════════════
   TOASTS
═══════════════════════════════════════════ */
.achievement-toast,
.daily-bonus-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    translate: -50% 0;
    background: rgba(30, 27, 75, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    translate: -50% -20px;
    transition: opacity 0.35s ease, translate 0.35s ease;
    max-width: 320px;
    width: calc(100% - 40px);
}

.achievement-toast.show,
.daily-bonus-toast.show {
    opacity: 1;
    translate: -50% 0;
}

.achievement-toast-icon,
.daily-bonus-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.achievement-toast-title,
.daily-bonus-title {
    font-size: 0.72rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}

.achievement-toast-name,
.daily-bonus-amount {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
}

/* ═══════════════════════════════════════════
   ACHIEVEMENTS SCREEN
═══════════════════════════════════════════ */
.achievements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.achievement-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    transition: border-color 0.2s;
}

.achievement-item:not(.locked) {
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(99, 102, 241, 0.08);
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.achievement-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.achievement-desc {
    font-size: 0.72rem;
    color: #64748b;
}

.achievement-item.locked .achievement-name,
.achievement-item.locked .achievement-desc {
    color: #475569;
}

/* ═══════════════════════════════════════════
   SETTINGS SCREEN
═══════════════════════════════════════════ */
.settings-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.settings-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 16px;
}

.settings-section h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    margin-bottom: 14px;
}

.settings-hint {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 6px;
}

/* Toggle switch */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

.toggle-label {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: translate 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #6366f1;
}

.toggle-switch input:checked + .toggle-slider::before {
    translate: 20px 0;
}

/* Personal bests */
.personal-bests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.personal-best-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: #94a3b8;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.personal-best-row:last-child {
    border-bottom: none;
}

/* Danger zone */
.settings-danger {
    border-color: rgba(239, 68, 68, 0.2);
}

.danger-btn {
    width: 100%;
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════
   END GAME STATS
═══════════════════════════════════════════ */
.end-stats {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.end-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: #94a3b8;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.end-stat-row:last-child {
    border-bottom: none;
}

.personal-best-notice {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fbbf24;
    text-align: center;
    min-height: 1.2em;
    margin-bottom: 8px;
}

.ad-pitch {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 10px;
}


/* ═══════════════════════════════════════════
   IMAGE DECKS
═══════════════════════════════════════════ */
.image-decks-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.image-deck-option {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.image-deck-option:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.06);
}

.image-deck-option.selected {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.12);
}

.image-deck-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.image-deck-info h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.image-deck-info p {
    font-size: 0.75rem;
    color: #64748b;
}

.image-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 0.62rem;
    text-align: center;
    padding: 2px 4px;
    border-radius: 0 0 10px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 1;
}

/* ── Image deck pairs picker ── */
.image-pairs-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
}

.pairs-label {
    font-size: 0.9rem;
    color: #94a3b8;
    flex: 1;
}

.pairs-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pairs-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(99, 102, 241, 0.25);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.pairs-btn:hover {
    background: rgba(99, 102, 241, 0.45);
}

.pairs-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e2e8f0;
    min-width: 28px;
    text-align: center;
}

/* ── Landscape orientation tip banner ── */
.landscape-nudge {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(124, 58, 237, 0.92);
    color: #e2e8f0;
    font-size: 0.8rem;
    padding: 6px 12px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.landscape-nudge-close {
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}

/* Show only on portrait mobile */
@media (orientation: portrait) and (max-width: 768px) {
    .landscape-nudge {
        display: flex;
    }
}
