/* style.css */
:root {
    --primary-font: 'Nunito', sans-serif;
    --brown-dark: #3e2723;
    --brown-mid: #5d4037;
    --brown-light: #795548;
    --brown-bg: #4e342e;
    --orange-primary: #ff9800;
    --orange-light: #ffb74d;
    --orange-shadow: #b26a00;
    --green-primary: #7cb342;
    --green-shadow: #558b2f;
    --blue-primary: #29b6f6;
    --blue-shadow: #0288d1;
    --border-color: #27140f;
    --text-light: #fff3e0;
    --text-dark: #27140f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--primary-font);
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

body {
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Fixed 450x950 design canvas, uniformly scaled to fit the real viewport
   in JS (see app.js fitAppContainer). Every screen inside uses hard-coded
   pixel positions, so scaling the whole canvas as one rigid unit is what
   keeps everything aligned across devices instead of drifting per-element. */
.app-container {
    position: relative;
    width: 450px;
    height: 950px;
    flex-shrink: 0;
    background-color: #333;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transform-origin: center center;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

/* =========================================
   AUTH SCREEN (Giris / Kayit)
   ========================================= */
.auth-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 25px;
    gap: 15px;
    z-index: 2;
}
.auth-logo { width: 290px; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.5)); }

.auth-card {
    width: 100%;
    background: linear-gradient(to bottom, rgba(30,25,20,0.6), rgba(18,14,10,0.6));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 2px solid rgba(204,161,66,0.75);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.auth-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
}
.auth-tab {
    flex: 1;
    text-align: center;
    color: #ab9a8c;
    font-size: 12px;
    font-weight: 900;
    padding: 9px 4px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s;
}
.auth-tab.active-auth-tab { background: linear-gradient(to bottom, #cca142, #8b6914); color: white; }

.auth-form { display: flex; flex-direction: column; gap: 5px; }
.auth-label { color: #cca142; font-size: 11px; font-weight: 800; margin-top: 6px; }
.auth-label:first-child { margin-top: 0; }
.auth-input {
    background: rgba(0,0,0,0.4);
    border: 2px solid #4a3a28;
    border-radius: 10px;
    padding: 11px 12px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--primary-font);
    user-select: text;
}
.auth-input:focus { outline: none; border-color: #cca142; }
.auth-input::placeholder { color: #776a5c; }

.auth-error {
    color: #ff8a80;
    font-size: 11px;
    font-weight: 800;
    min-height: 14px;
    margin-top: 4px;
}

.auth-submit-btn {
    margin-top: 10px;
    background: linear-gradient(to bottom, #ffb74d, #f57c00);
    border: 2px solid #b25300;
    color: white;
    border-radius: 12px;
    padding: 13px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: var(--primary-font);
    text-shadow: 1px 2px 2px rgba(0,0,0,0.5);
    box-shadow: inset 0 3px 5px rgba(255,255,255,0.3), 0 5px 0 #b25300, 0 8px 12px rgba(0,0,0,0.4);
    transition: transform 0.1s;
}
.auth-submit-btn:active { transform: translateY(4px); box-shadow: inset 0 3px 5px rgba(255,255,255,0.3), 0 0 0 #b25300, 0 4px 6px rgba(0,0,0,0.4); }
.auth-submit-btn:disabled { opacity: 0.7; cursor: default; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 12px;
    color: #776a5c;
    font-size: 10px;
    font-weight: 800;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #4a3a28;
}

.auth-google-btn {
    width: 100%;
    background: white;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 13px;
    font-weight: 800;
    color: #3c3c3c;
    cursor: pointer;
    font-family: var(--primary-font);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.1s;
}
.auth-google-btn:active { transform: translateY(2px); }
.auth-google-icon { width: 18px; height: 18px; }

/* =========================================
   EDIT MODAL (reused for username/rumuz/bio/e-posta/sifre)
   ========================================= */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 30px;
}
.edit-modal {
    width: 100%;
    max-width: 340px;
    background: linear-gradient(to bottom, #1e1914, #120e0a);
    border: 2px solid #cca142;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}
.edit-modal-title { color: #cca142; font-size: 14px; font-weight: 900; margin-bottom: 10px; text-align: center; }
.edit-modal-actions { display: flex; gap: 10px; margin-top: 12px; }
.edit-modal-actions button { flex: 1; }
.edit-modal-cancel {
    background: linear-gradient(to bottom, #6d6d6d, #3a3a3a);
    border: 2px solid #222;
    color: white;
    border-radius: 10px;
    padding: 11px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    font-family: var(--primary-font);
}
.admin-danger-btn { background: linear-gradient(to bottom, #e53935, #b71c1c); border-color: #7f0000; }
.edit-modal-save {
    background: linear-gradient(to bottom, #81c784, #388e3c);
    border: 2px solid #1b5e20;
    color: white;
    border-radius: 10px;
    padding: 11px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    font-family: var(--primary-font);
}

.tutorial-modal { text-align: center; }
.tutorial-icon { font-size: 40px; margin-bottom: 8px; }
.tutorial-desc { color: #d3ccc3; font-size: 12px; line-height: 1.5; text-align: center; margin: 10px 0; }
.tutorial-dots { display: flex; justify-content: center; gap: 6px; margin: 12px 0; }
.tutorial-dot { width: 7px; height: 7px; border-radius: 50%; background: #4a3a28; }
.tutorial-dot.active { background: #cca142; }

/* TOP BAR */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px;
    pointer-events: none; /* only its own children should catch clicks, not the empty header box */
    z-index: 20;
}

/* Single unified capsule holding profile + lives/gold/gems -- replaces
   the old two-separate-boxes look (a grey-blue profile pill sitting
   right next to a differently-styled navy currency row read as
   cluttered/inconsistent). One wood-and-gold shell, ThemeAll internal
   sections share it via gap + a thin divider instead of each drawing
   their own background/border. */
.topbar-pill {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(to bottom, #3a2f28, #241a15);
    border: 2px solid var(--border-color);
    border-radius: 26px;
    padding: 3px 10px 3px 3px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}

.topbar-divider {
    width: 2px;
    align-self: stretch;
    margin: 4px 0;
    background: linear-gradient(to bottom, transparent, rgba(204,161,66,0.5), transparent);
}

.profile-section {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s;
}
.profile-section:active {
    transform: scale(0.96);
}

.profile-icon {
    width: 36px;
    height: 36px;
    background-color: #7cb342;
    border-radius: 50%;
    border: 2px solid #cca142;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-icon img {
    width: 150%;
    height: 150%;
    object-fit: contain;
}

.profile-info {
    margin-left: 8px;
    display: flex;
    flex-direction: column;
}

.username {
    color: white;
    font-size: 11px;
    font-weight: 800;
    text-shadow: 1px 1px 0 #000;
}

.level-bar-container {
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.level-badge {
    background: linear-gradient(to bottom, #ffeb3b, #f57f17);
    color: #4e342e;
    font-weight: 900;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    z-index: 2;
    margin-right: -8px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.level-bar-bg {
    background-color: #2c2c2c;
    border: 1px solid var(--border-color);
    height: 12px;
    width: 60px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    padding-left: 10px;
}

.level-bar-fill {
    background: linear-gradient(to bottom, #ffeb3b, #f57f17);
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.level-text {
    position: absolute;
    width: 100%;
    text-align: center;
    left: 0;
    top: -1px;
    font-size: 8px;
    font-weight: 800;
    color: white;
    text-shadow: 1px 1px 1px #000;
    z-index: 3;
}

.currencies {
    display: flex;
    align-items: center;
    gap: 9px;
}

/* No individual box/border anymore -- all three share the .topbar-pill
   shell, so each entry is just an icon+number pair sitting directly on
   the wood background. */
.currency-badge {
    display: flex;
    align-items: center;
    color: #fff3e0;
    font-weight: 800;
    font-size: 12px;
    text-shadow: 1px 1px 0 #000;
}

.currency-icon {
    font-size: 10px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    color: white;
    text-shadow: none;
}

.gold .currency-icon { background: linear-gradient(to bottom, #ffe082, #ff9800); box-shadow: 0 2px 8px rgba(255,152,0,0.65), inset 0 1px 2px rgba(255,255,255,0.6); }
.gem .currency-icon { background: linear-gradient(to bottom, #ea80fc, #aa00ff); box-shadow: 0 2px 8px rgba(170,0,255,0.65), inset 0 1px 2px rgba(255,255,255,0.6); }
.lives .currency-icon { background: linear-gradient(to bottom, #ff8a80, #d32f2f); box-shadow: 0 2px 8px rgba(211,47,47,0.65), inset 0 1px 2px rgba(255,255,255,0.6); }

#topbar-lives-timer {
    font-size: 9px;
    font-weight: 800;
    color: #ffab91;
    margin-right: 4px;
}

.currency-badge span {
    margin-right: 5px;
}

.add-btn {
    background: linear-gradient(to bottom, #69f0ae, #00c853);
    border: 1px solid #00a844;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,200,83,0.6), inset 0 1px 2px rgba(255,255,255,0.6);
    transition: transform 0.1s;
}
.add-btn:active { transform: scale(0.9); }

.settings-btn {
    pointer-events: auto;
    background: linear-gradient(to bottom, #b388ff, #6a1bb5);
    border: 2px solid #4a0e8f;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(124,77,255,0.55), inset 0 1px 2px rgba(255,255,255,0.5);
    transition: transform 0.1s;
}
.settings-btn:active { transform: scale(0.92) rotate(20deg); }

/* MAIN MENU SPECIFIC */
.logo-container {
    margin-top: 90px;
    display: flex;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

.game-logo {
    width: 62%;
    max-width: 240px;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.4));
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

/* Side Badges */
.side-badges {
    position: absolute;
    top: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.left-badges { left: 15px; }
.right-badges { right: 15px; }

.side-badge {
    background: linear-gradient(to bottom, #4e3f31, #2d241c);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    color: white;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.1), 0 5px 10px rgba(0,0,0,0.4);
    text-align: center;
    width: 90px;
}

.badge-header {
    font-size: 9px;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    color: #a8d5a2;
}

.badge-value {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 4px;
}

.mini-progress {
    height: 8px;
    background-color: #1a1511;
    border-radius: 4px;
    border: 1px solid #000;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: linear-gradient(to bottom, #ffca28, #ff8f00);
}

.gift-icon {
    font-size: 24px;
    margin-bottom: 5px;
    animation: wiggle 2s infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    75% { transform: rotate(-5deg); }
}

.badge-title {
    font-size: 10px;
    font-weight: 900;
    color: #fff;
}

.badge-timer {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    margin-top: 2px;
}

.icon-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.icon-circle {
    width: 54px;
    height: 54px;
    background: linear-gradient(to bottom, #594a3a, #30261e);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    color: white;
    text-shadow: 0 2px 3px rgba(0,0,0,0.4);
    box-shadow: inset 0 2px 3px rgba(255,255,255,0.35), 0 5px 10px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}

.icon-circle.gold-circle { background: linear-gradient(to bottom, #ffe082, #f57f17); border-color: #b25300; box-shadow: inset 0 2px 3px rgba(255,255,255,0.6), 0 0 4px rgba(255,213,79,0.9), 0 5px 18px rgba(255,193,7,0.75); }
.icon-circle.blue-circle { background: linear-gradient(to bottom, #81d4fa, #0277bd); border-color: #01579b; box-shadow: inset 0 2px 3px rgba(255,255,255,0.6), 0 0 4px rgba(79,195,247,0.9), 0 5px 18px rgba(41,182,246,0.75); }
.icon-circle.pink-circle { background: linear-gradient(to bottom, #ffab91 20%, #ff6b81 60%, #d81b60); border-color: #880e4f; box-shadow: inset 0 2px 3px rgba(255,255,255,0.6), 0 0 4px rgba(255,107,129,0.9), 0 5px 18px rgba(255,107,129,0.75); }
.icon-circle.teal-circle { background: linear-gradient(to bottom, #80cbc4, #00695c); border-color: #004d40; box-shadow: inset 0 2px 3px rgba(255,255,255,0.6), 0 0 4px rgba(38,166,154,0.9), 0 5px 18px rgba(38,166,154,0.75); }
.icon-circle.red-circle { background: linear-gradient(to bottom, #ff8a80 20%, #ff5252 60%, #c62828); border-color: #7f0000; box-shadow: inset 0 2px 3px rgba(255,255,255,0.6), 0 0 4px rgba(255,82,82,0.9), 0 5px 18px rgba(255,82,82,0.75); }
.icon-circle.purple-circle { background: linear-gradient(to bottom, #ce93d8, #7b1fa2); border-color: #4a0072; box-shadow: inset 0 2px 3px rgba(255,255,255,0.6), 0 0 4px rgba(186,104,200,0.9), 0 5px 18px rgba(186,104,200,0.75); }

.icon-button:active .icon-circle {
    transform: scale(0.93);
    filter: brightness(0.65) saturate(0.8);
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.4);
}

.icon-button span {
    color: white;
    font-size: 11px;
    font-weight: 900;
    text-shadow: 1px 1px 2px #000;
    background-color: rgba(0,0,0,0.5);
    padding: 3px 7px;
    border-radius: 10px;
}

/* Character */
.character-container {
    position: absolute;
    top: 365px;
    left: 50%;
    transform: translateX(-50%);
    width: 190px;
    height: 190px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 5;
}

.turtle-character {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 10px rgba(0,0,0,0.4));
}

/* Main Buttons */
.main-buttons {
    position: absolute;
    bottom: 100px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0 106px;
    z-index: 15;
}

.btn-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

/* Pre-made illustrated button assets (Oyna / Bolumler / Meydan Oku) */
.img-btn {
    background: none;
    border: none;
    padding: 0;
    width: 100%;
    cursor: pointer;
    display: block;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.5));
    transition: transform 0.1s, filter 0.1s;
}
.img-btn img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}
.img-btn:active {
    transform: translateY(4px) scale(0.98);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.btn-row .btn-primary {
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 12px;
}

.btn-primary {
    width: 100%;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    padding: 12px 15px;
    font-size: 15px;
    font-weight: 900;
    color: white;
    text-shadow: 1px 2px 2px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: inset 0 3px 5px rgba(255,255,255,0.3), 0 5px 0 var(--shadow-color), 0 8px 12px rgba(0,0,0,0.4);
    transition: transform 0.1s, box-shadow 0.1s, margin-top 0.1s;
    text-transform: uppercase;
}

.btn-primary:active {
    transform: translateY(5px);
    box-shadow: inset 0 3px 5px rgba(255,255,255,0.3), 0 0px 0 var(--shadow-color), 0 4px 6px rgba(0,0,0,0.4);
    margin-bottom: 5px; /* offset the translate so layout doesn't shift */
}

.btn-orange {
    background: linear-gradient(to bottom, #ffb74d, #f57c00);
    --shadow-color: #b25300;
    font-size: 20px;
    padding: 14px 20px;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.btn-green {
    background: linear-gradient(to bottom, #81c784, #388e3c);
    --shadow-color: #1b5e20;
}

.btn-blue {
    background: linear-gradient(to bottom, #4fc3f7, #0288d1);
    --shadow-color: #01579b;
}

.btn-brown {
    background: linear-gradient(to bottom, #8d6e63, #5d4037);
    --shadow-color: #3e2723;
    font-size: 12px;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(to bottom, #2b231c, #1a1511);
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    z-index: 20;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #a89886;
    cursor: pointer;
    transition: transform 0.15s;
}
.nav-item:active {
    transform: scale(0.92);
}

.nav-item.active {
    color: #ffe082;
}

.nav-icon-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nav-color, #594a3a);
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}
.nav-item.active .nav-icon-circle {
    opacity: 1;
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 4px 12px var(--nav-color, transparent), inset 0 2px 3px rgba(255,255,255,0.5);
}

.nav-item i {
    font-size: 16px;
    color: white;
}

.nav-vs-badge {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 900;
    font-style: italic;
    font-size: 15px;
    color: #fff;
    letter-spacing: -1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    position: relative;
}
.nav-vs-badge::after {
    content: '';
    position: absolute;
    top: -9px;
    left: 50%;
    width: 2px;
    height: 22px;
    background: #ff1744;
    transform: translateX(-50%) rotate(20deg);
    box-shadow: 0 0 3px rgba(255,23,68,0.8);
}

.nav-label {
    font-size: 9px;
    font-weight: 800;
}


/* GAME SCREEN SPECIFIC */
.chapter-banner {
    margin-top: 80px;
    background-image: url('pano.webp');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    margin-left: 25px;
    margin-right: 25px;
    padding: 15px 20px 10px 20px;
    text-align: center;
    color: white;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
}

.chapter-title {
    font-size: 15px;
    font-weight: 900;
    text-shadow: 1px 1px 1px #000;
}

.chapter-subtitle {
    font-size: 11px;
    font-weight: 700;
    color: #e0e0e0;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
}
.game-stats.single-stat { justify-content: flex-end; padding-right: 24px; }

.stat-badge {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    color: white;
    font-weight: 900;
    font-size: 16px;
    gap: 8px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.4);
}

.dark-badge {
    background: linear-gradient(to bottom, #4a4a4a, #2a2a2a);
}

.stat-badge i {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.4);
}
.dark-badge i { background: linear-gradient(to bottom, #ffd54f, #f57f17); box-shadow: 0 2px 8px rgba(245,127,23,0.6), inset 0 1px 2px rgba(255,255,255,0.4); }

.stat-label {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    white-space: nowrap;
    background-color: rgba(0,0,0,0.6);
    padding: 2px 6px;
    border-radius: 10px;
}

.question-container {
    margin: 20px 20px;
    position: relative;
}

.timer-badge {
    position: absolute;
    top: -33px;
    left: 50%;
    transform: translateX(-50%);
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 25%, #d3a06a, #a06a37 50%, #7a4f28 78%, #5e3b1c 100%);
    border: 3px solid #3d2412;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 18px;
    font-weight: 900;
    color: #fff6e6;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.65);
    z-index: 2;
    box-shadow:
        0 0 0 3px #cca142,
        0 6px 12px rgba(0,0,0,0.5),
        inset 0 3px 4px rgba(255,255,255,0.4),
        inset 0 -6px 9px rgba(0,0,0,0.5);
}
.timer-badge::before {
    content: '';
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    border: 1px solid rgba(255,224,178,0.4);
    pointer-events: none;
}
.timer-badge i { font-size: 12px; color: #ffd54f; margin-bottom: 1px; }

.question-box {
    background: rgba(30,26,20,0.38);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 3px solid rgba(255,255,255,0.55);
    border-radius: 15px;
    padding: 30px 20px 20px;
    text-align: center;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 800;
    color: #fff8e1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.3);
}

.answers-container {
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    position: relative;
    margin-top: 10px;
}

.answer-card {
    width: 42%;
    min-height: 170px;
    background: rgba(30,26,20,0.38);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 3px solid rgba(255,255,255,0.55);
    border-radius: 15px;
    position: relative;
    box-shadow: 0 8px 15px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
}

.answer-text {
    padding: 25px 14px;
    text-align: center;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 800;
    color: #fff8e1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.answer-result-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 10px;
    color: #fff;
    z-index: 3;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.3);
    text-transform: uppercase;
}
.answer-result-badge.badge-correct { background: linear-gradient(to bottom, #81c784, #388e3c); border: 2px solid #1b5e20; }
.answer-result-badge.badge-wrong { background: linear-gradient(to bottom, #ef5350, #c62828); border: 2px solid #8e0000; }

#answer-commentary {
    margin: 8px 15px 0;
    padding: 10px 14px;
    align-items: flex-start;
    gap: 8px;
    max-height: 78px;
    overflow-y: auto;
}
#answer-commentary .kz-quote-icon { font-size: 20px; }
#answer-commentary .kz-quote-text {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
}

.vs-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(to bottom, #5d4037, #3e2723);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 900;
    font-size: 16px;
    z-index: 5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.game-bottom-area {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 100%;
    padding: 10px 15px 20px;
}


/* Progress Track */
.progress-track-container {
    margin-bottom: 20px;
}

.progress-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.progress-node {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #757575, #424242);
    border: 2px solid var(--border-color);
    position: relative;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.progress-node.active {
    background: linear-gradient(to bottom, #aed581, #7cb342);
}

.progress-node.current {
    background: linear-gradient(to bottom, #ffd54f, #f57f17);
    width: 16px;
    height: 16px;
    box-shadow: 0 0 0 3px rgba(255,193,7,0.35);
}

.progress-line {
    flex-grow: 1;
    height: 3px;
    background-color: #424242;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.progress-line.active {
    background-color: #7cb342;
}

.end-node {
    width: 26px;
    height: 26px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #9e9e9e;
    font-size: 12px;
}

.progress-text {
    text-align: center;
    color: white;
    font-weight: 800;
    font-size: 12px;
    margin-top: 5px;
    text-shadow: 1px 1px 2px #000;
}

/* Game Actions */
.game-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.action-btn {
    flex: 1;
    background: rgba(30,26,20,0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.1), 0 5px 8px rgba(0,0,0,0.5);
    cursor: pointer;
}

.action-btn:active {
    transform: scale(0.95);
}

.action-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: linear-gradient(to bottom, #81c784, #388e3c);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: white;
    font-weight: 900;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.action-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    margin-bottom: 6px;
    position: relative;
    box-shadow: 0 3px 8px rgba(0,0,0,0.45), inset 0 1px 2px rgba(255,255,255,0.45);
}

.action-icon .small-plus {
    position: absolute;
    bottom: -2px;
    right: -4px;
    font-size: 12px;
    color: white;
    background: #2e7d32;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hint-icon { background: linear-gradient(to bottom, #ffd54f, #ff9800); box-shadow: 0 3px 10px rgba(255,152,0,0.55), inset 0 1px 2px rgba(255,255,255,0.5); }
.skip-icon { background: linear-gradient(to bottom, #4fc3f7, #0277bd); box-shadow: 0 3px 10px rgba(41,182,246,0.55), inset 0 1px 2px rgba(255,255,255,0.5); }
.time-icon { background: linear-gradient(to bottom, #81c784, #388e3c); box-shadow: 0 3px 10px rgba(76,175,80,0.55), inset 0 1px 2px rgba(255,255,255,0.5); }

.action-content {
    text-align: center;
    margin-bottom: 10px;
}

.action-title {
    color: white;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
}

.action-desc {
    color: #bcaaa4;
    font-size: 8px;
    font-weight: 700;
}

.action-cost-btn {
    background: linear-gradient(to bottom, #7cb342, #33691e);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 90%;
    padding: 4px;
    color: white;
    font-weight: 900;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.3);
    cursor: pointer;
}

/* =========================================
   END SCREEN (TAMAMLANDI) SPECIFIC
   ========================================= */
#end-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 82px;
    padding-bottom: 90px;
    overflow-y: auto;
}

#end-screen .top-bar {
    position: relative;
    top: 0;
}

.end-banner {
    background-image: url('pano.webp');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    margin-left: 20px;
    margin-right: 20px;
    padding: 20px 15px;
    text-align: center;
    color: white;
    position: relative;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
    z-index: 2;
}

.end-banner-chapter {
    font-size: 14px;
    color: #aed581;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px #000;
}

.end-banner-title {
    font-size: 26px;
    font-weight: 900;
    color: #ffca28;
    text-shadow: 2px 2px 0 #b33939, -1px -1px 0 #b33939, 1px -1px 0 #b33939, -1px 1px 0 #b33939, 3px 3px 5px rgba(0,0,0,0.8);
    margin: 5px 0;
    letter-spacing: 2px;
}

.end-banner-subtitle {
    font-size: 11px;
    color: #fff;
    font-weight: 600;
    text-shadow: 1px 1px 2px #000;
    line-height: 1.2;
}

.end-character {
    display: flex;
    justify-content: center;
    margin-top: -20px;
    z-index: 1;
}

.end-turtle-img {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
}

.performance-card {
    background: rgba(30,26,20,0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 3px solid rgba(255,255,255,0.5);
    border-radius: 15px;
    margin: -20px 30px 0; /* Overlap with turtle, narrower than before */
    padding: 12px;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 3;
}

.perf-title {
    text-align: center;
    color: #fff8e1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    font-weight: 900;
    font-size: 12px;
    margin-bottom: 3px;
}

.perf-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
}

.perf-stars .star {
    font-size: 22px;
    opacity: 0.3;
    filter: grayscale(1) drop-shadow(0 4px 4px rgba(0,0,0,0.4));
}
.perf-stars .star.earned {
    opacity: 1;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.4));
}
.perf-stars .star:nth-child(3) {
    transform: scale(1.2) translateY(-5px);
}

.perf-badge {
    background-color: #2e4a31;
    color: #aed581;
    text-align: center;
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 11px;
    width: fit-content;
    margin: 0 auto 7px auto;
    border: 2px solid #1b2e1e;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.2), 0 4px 6px rgba(0,0,0,0.4);
}

.kz-quote {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(to bottom, #f1ebd8, #e6ddc2);
    border: 2px solid #7c9363;
    border-radius: 10px;
    padding: 6px 10px;
    margin-bottom: 8px;
}
.kz-quote-icon { font-size: 16px; flex-shrink: 0; }
.kz-quote-text { font-size: 10px; font-weight: 700; color: #4e342e; font-style: italic; line-height: 1.3; }

.perf-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    border-top: 2px solid #d7ccc8;
    border-bottom: 2px solid #d7ccc8;
    padding: 7px 0;
    margin-bottom: 10px;
}

.stat-box {
    text-align: center;
    border-right: 1px dashed #bcaaa4;
}
.stat-box:last-child {
    border-right: none;
}

.stat-icon {
    width: 26px;
    height: 26px;
    margin: 0 auto 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 1px 2px rgba(255,255,255,0.4);
}
.stat-icon.correct { background: linear-gradient(to bottom, #81c784, #388e3c); }
.stat-icon.wrong { background: linear-gradient(to bottom, #e57373, #c62828); }
.stat-icon.time { background: linear-gradient(to bottom, #64b5f6, #1565c0); }
.stat-icon.streak { background: linear-gradient(to bottom, #ffd54f, #f57f17); }

.stat-label {
    font-size: 8px;
    font-weight: 800;
    color: #fff8e1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 15px;
    font-weight: 900;
    color: #fff8e1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.stat-value.correct-val { color: #2e7d32; }
.stat-value.wrong-val { color: #c62828; }

.perf-rewards-title-wrapper {
    display: flex;
    justify-content: center;
    margin-top: -19px; /* Pull up to overlap border */
}

.perf-rewards-title {
    background-color: #558b2f;
    color: white;
    padding: 2px 13px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    border: 2px solid #33691e;
    position: relative;
    z-index: 2;
}

.perf-rewards {
    display: flex;
    justify-content: space-between;
    background-color: #e6dfc8;
    border-radius: 10px;
    padding: 11px 8px 7px 8px;
    margin-top: -8px;
}

.reward-box {
    display: flex;
    align-items: center;
    gap: 5px;
    border-right: 1px dashed #bcaaa4;
    padding-right: 8px;
}
.reward-box:last-child { border-right: none; padding-right: 0; }

.reward-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: linear-gradient(to bottom, #ffd54f, #ff9800);
    box-shadow: 0 2px 6px rgba(255,152,0,0.5), inset 0 1px 2px rgba(255,255,255,0.5);
    filter: none;
}
.reward-box:nth-child(2) .reward-icon {
    background: linear-gradient(to bottom, #ea80fc, #aa00ff);
    box-shadow: 0 2px 6px rgba(170,0,255,0.5), inset 0 1px 2px rgba(255,255,255,0.5);
}
.reward-icon.xp {
    background: linear-gradient(to bottom, #64b5f6, #1565c0);
    color: white;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 2px 6px rgba(21,101,192,0.5), inset 0 1px 2px rgba(255,255,255,0.5);
}

.reward-info {
    display: flex;
    flex-direction: column;
}

.reward-val {
    font-size: 14px;
    font-weight: 900;
    color: #fff8e1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    line-height: 1;
}

.reward-label {
    font-size: 8px;
    font-weight: 800;
    color: #fff8e1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.end-actions {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

#btn-continue {
    max-width: 260px;
}

.btn-green {
    background: linear-gradient(to bottom, #9ccc65, #2e7d32);
    border: 3px solid #1b5e20;
    box-shadow: inset 0 3px 5px rgba(255,255,255,0.4), 0 5px 0 #1b5e20, 0 8px 16px rgba(46,125,50,0.55);
}

.end-actions-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.end-actions-row button {
    flex: 1;
}

.btn-blue {
    background: linear-gradient(to bottom, #4fc3f7, #0277bd);
    border: 3px solid #01579b;
    box-shadow: inset 0 3px 5px rgba(255,255,255,0.4), 0 5px 0 #01579b, 0 8px 16px rgba(2,119,189,0.55);
}

.btn-brown {
    background: linear-gradient(to bottom, #a1887f, #5d4037);
    border: 3px solid #3e2723;
    box-shadow: inset 0 3px 5px rgba(255,255,255,0.4), 0 5px 0 #3e2723, 0 8px 16px rgba(62,39,35,0.55);
}

.achievement-toast {
    margin-top: 8px;
    background: linear-gradient(to bottom, #262019, #171310);
    border: 2px solid #cca142;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.5);
}

.ach-icon {
    font-size: 20px;
    background: linear-gradient(to bottom, #ffd54f, #cca142);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(204,161,66,0.6), inset 0 1px 2px rgba(255,255,255,0.5);
}

.ach-info {
    flex-grow: 1;
}

.ach-title {
    color: #cca142;
    font-size: 10px;
    font-weight: 800;
}

.ach-name {
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.ach-desc {
    color: #aaa;
    font-size: 10px;
}

.btn-ach-view {
    background: linear-gradient(to bottom, #81c784, #388e3c);
    color: white;
    border: 2px solid #2e7d32;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 9px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
.end-actions > .btn-green {
    padding: 12px;
    font-size: 14px;
}


/* =========================================
   NEW SCREENS - SHARED UTILITIES
   ========================================= */

/* Scrollable screens */
.scrollable-screen {
    overflow-y: scroll;
    overflow-x: hidden;
    padding-bottom: 110px;
    flex-direction: column;
    align-items: stretch;
    -webkit-overflow-scrolling: touch;
}

/* Page Header (back btn + title board) */
.page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 82px 15px 0;
    position: relative;
    gap: 10px;
}

.back-btn {
    background: linear-gradient(to bottom, #5d4037, #3e2723);
    border: 2px solid var(--border-color);
    color: white;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
    font-family: var(--primary-font);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    position: absolute;
    left: 15px;
    top: 65px;
}
.back-btn i { font-size: 14px; }

.page-title-board {
    background-image: url('pano.webp');
    background-size: 100% 100%;
    background-position: center;
    color: white;
    font-weight: 900;
    font-size: 24px;
    letter-spacing: 2px;
    text-align: center;
    padding: 15px 34px;
    min-width: 230px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
    filter: drop-shadow(0 5px 8px rgba(0,0,0,0.5));
}
.small-title { font-size: 17px; }

.page-subtitle {
    text-align: center;
    color: #e8dcc8;
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
    text-shadow: 1px 1px 2px #000;
}

.divider-leaf {
    text-align: center;
    color: #7cb342;
    font-size: 16px;
    margin: 5px 0;
}

/* =========================================
   CHAPTERS SCREEN
   ========================================= */
.region-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 6px 15px 20px;
}

.region-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(62,92,58,0.55), rgba(36,55,31,0.55));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 3px solid rgba(27,46,24,0.7);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.15);
    cursor: pointer;
}

.region-card.locked-region {
    background: linear-gradient(135deg, rgba(50,50,50,0.5), rgba(25,25,25,0.5));
    filter: saturate(0.5) brightness(0.85);
    cursor: default;
}

.region-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #ffd54f, #f57f17);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), 0 3px 8px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.region-card.locked-region .region-icon {
    background: linear-gradient(to bottom, #90a4ae, #546e7a);
    font-size: 22px;
}

.region-info {
    flex-grow: 1;
    min-width: 0;
}

.region-name {
    font-size: 16px;
    font-weight: 900;
    color: #fff8e1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.region-stars-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 13px;
    color: #dcedc8;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.region-stars-row i {
    color: #ffd700;
    font-size: 14px;
}

.region-arrow {
    color: #dcedc8;
    font-size: 18px;
    flex-shrink: 0;
    align-self: flex-end;
}

.region-soon-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(69,90,100,0.85);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

.region-card.region-complete .region-icon {
    background: linear-gradient(to bottom, #81c784, #388e3c);
}

.region-complete-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(56,142,60,0.9);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: -2px 15px 14px 30px;
    padding: 10px 0 10px 12px;
    border-left: 3px dashed rgba(255,255,255,0.35);
}

.chapter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(78,63,49,0.6), rgba(45,36,28,0.6));
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 2px solid rgba(204,161,66,0.55);
    border-radius: 12px;
    padding: 9px 12px;
    cursor: pointer;
}

.chapter-row.completed-chapter-row {
    border-color: #ffd54f;
    background: linear-gradient(135deg, rgba(120,93,25,0.6), rgba(74,56,10,0.6));
}

.chapter-row.locked-chapter-row {
    cursor: not-allowed;
    filter: saturate(0.4) brightness(0.7);
}

.chapter-row-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #aed581, #558b2f);
    border: 2px solid #33691e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.4);
}

.chapter-row.completed-chapter-row .chapter-row-icon {
    background: linear-gradient(to bottom, #ffd54f, #f57f17);
    border-color: #b25300;
}

.chapter-row.locked-chapter-row .chapter-row-icon {
    background: linear-gradient(to bottom, #757575, #3a3a3a);
    border-color: #1a1a1a;
    font-size: 13px;
}

.chapter-row-name {
    flex-grow: 1;
    font-size: 12px;
    font-weight: 800;
    color: #fff8e1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.chapter-row-star {
    font-size: 15px;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    flex-shrink: 0;
}
.chapter-row .fa-regular.chapter-row-star { color: rgba(255,255,255,0.45); }

.featured-chapter {
    background: linear-gradient(to right, rgba(78,63,49,0.95), rgba(45,36,28,0.95));
    border: 2px solid #cca142;
    border-radius: 15px;
    margin: 10px 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    min-height: 90px;
}
.featured-chapter::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,215,0,0.05), transparent);
    pointer-events: none;
}
.featured-turtle {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.5));
}
.featured-info { flex: 1; }
.featured-chapter-num { font-size: 11px; font-weight: 800; color: #aed581; }
.featured-chapter-name { font-size: 18px; font-weight: 900; color: white; text-shadow: 1px 1px 2px #000; }
.featured-stars { font-size: 13px; color: #ffd700; font-weight: 800; margin-top: 4px; }
.featured-completed {
    background: linear-gradient(to bottom, #4caf50, #2e7d32);
    color: white;
    font-size: 10px;
    font-weight: 900;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid #1b5e20;
}

.chapter-grid {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.chapter-grid::-webkit-scrollbar { display: none; }
.chapter-card {
    background: linear-gradient(to bottom, #2d2d3a, #1a1a24);
    border: 2px solid #444;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s;
    box-shadow: 0 5px 12px rgba(0,0,0,0.5);
    flex: 0 0 130px;
}
.chapter-card:active { transform: scale(0.96); }

.active-chapter { border-color: #7cb342 !important; }
.active-chapter::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(124,179,66,0.2);
}

.locked-chapter { filter: saturate(0.5) brightness(0.8); cursor: not-allowed; }

.chapter-num-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 26px;
    background: linear-gradient(to bottom, #7cb342, #33691e);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: white;
    font-size: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 16px;
    z-index: 5;
}

.chapter-thumb {
    height: 80px;
    width: 100%;
}

.chapter-card-info {
    padding: 8px 6px;
}
.chapter-card-name { font-size: 11px; font-weight: 800; color: white; text-align: center; }
.chapter-card-stars { font-size: 10px; color: #c9beb7; text-align: center; margin: 3px 0; }
.chapter-progress-bar {
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}
.chapter-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #7cb342, #aed581);
    border-radius: 2px;
}

.rewards-banner {
    background: linear-gradient(to right, #2d241c, #1a1511);
    border: 2px solid #cca142;
    border-radius: 12px;
    margin: 10px 15px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.4);
}
.rewards-banner-icon { font-size: 30px; }
.rewards-banner-info { flex: 1; }
.rewards-banner-title { color: #cca142; font-size: 12px; font-weight: 900; }
.rewards-banner-desc { color: #bcaaa4; font-size: 10px; font-weight: 700; }
.rewards-banner-items { display: flex; gap: 10px; }
.reward-item { display: flex; flex-direction: column; align-items: center; gap: 2px; color: white; font-size: 11px; font-weight: 800; }
.reward-item i { font-size: 20px; }

/* =========================================
   QUESTS SCREEN
   ========================================= */
.quest-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 10px 15px;
}
.quest-tab {
    background: linear-gradient(to bottom, #3a3028, #231c15);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #ab9a8c;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--primary-font);
}
.quest-tab.active {
    background: linear-gradient(to bottom, #cca142, #8b6914);
    color: white;
    border-color: #a37a10;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.quest-tab i { font-size: 16px; }

.quest-banner {
    background: linear-gradient(to right, #2a3a1a, #1a2a0a);
    border: 2px solid #7cb342;
    border-radius: 12px;
    margin: 10px 15px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}
.quest-banner-turtle {
    width: 70px;
    position: absolute;
    left: 10px;
    bottom: 0;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.5));
}
.quest-speech-bubble {
    background: #f1ebd8;
    border: 2px solid #7c9363;
    border-radius: 12px;
    padding: 10px 15px;
    margin-left: 60px;
    font-size: 12px;
    font-weight: 800;
    color: #3e2723;
    text-align: center;
}
.quest-timer {
    color: #aed581;
    font-size: 11px;
    font-weight: 700;
    margin-top: 6px;
}
.quest-timer strong { color: #ffd700; }

.quest-list { padding: 0 15px; display: flex; flex-direction: column; gap: 8px; }

.quest-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quest-grid .quest-item { flex-direction: column; align-items: stretch; text-align: center; padding: 12px 10px; gap: 6px; }
.quest-grid .quest-icon-wrap { align-self: center; }
.quest-grid .quest-info { text-align: center; }
.quest-grid .quest-reward { flex-direction: row; justify-content: center; }
.quest-grid .quest-action-btn { width: 100%; }

.quest-ach-summary { padding: 10px 15px; }
.quest-ach-summary-text { color: #e8e0d3; font-size: 13px; font-weight: 900; margin-bottom: 6px; text-shadow: 0 1px 3px rgba(0,0,0,0.9); }

.quest-item {
    background: linear-gradient(to right, #2d241c, #1a1511);
    border: 1px solid #3e2723;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.completed-quest { border-color: #4caf50; }
.weekly-item { border-color: #7b1fa2; }

.quest-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.quest-info { flex: 1; min-width: 0; }
.quest-name { color: white; font-size: 13px; font-weight: 900; }
.quest-desc { color: #b3aca3; font-size: 10px; font-weight: 700; margin: 3px 0; }
.quest-progress-bar { height: 6px; background: #333; border-radius: 3px; overflow: hidden; margin: 4px 0; }
.quest-progress-fill { height: 100%; border-radius: 3px; }
.green-fill { background: linear-gradient(to right, #4caf50, #7cb342); }
.yellow-fill { background: linear-gradient(to right, #ff9800, #ffd700); }
.purple-fill { background: linear-gradient(to right, #9c27b0, #ce93d8); }
.quest-progress-text { color: #c9c2b6; font-size: 10px; font-weight: 700; }

.quest-reward { display: flex; flex-direction: column; align-items: center; gap: 2px; color: white; font-size: 11px; font-weight: 900; flex-shrink: 0; }
.quest-action-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 900;
    font-size: 12px;
    color: white;
    cursor: pointer;
    font-family: var(--primary-font);
    flex-shrink: 0;
}
.green-btn { background: linear-gradient(to bottom, #7cb342, #33691e); }
.blue-btn { background: linear-gradient(to bottom, #29b6f6, #0277bd); }
.purple-btn { background: linear-gradient(to bottom, #9c27b0, #6a0080); }
.gray-btn { background: linear-gradient(to bottom, #78716c, #44403c); cursor: default; opacity: 0.75; }

.weekly-quest-section { padding: 10px 15px; }
.weekly-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.weekly-title { color: #ce93d8; font-size: 14px; font-weight: 900; }
.weekly-timer { color: #b3aca3; font-size: 11px; }

/* =========================================
   CHALLENGE SCREEN
   ========================================= */
.vs-panel {
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
    border: 2px solid #3e2723;
    border-radius: 15px;
    margin: 10px 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.vs-player { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.vs-avatar { width: 70px; height: 70px; border-radius: 14px; border: 3px solid #7cb342; object-fit: cover; background: linear-gradient(to bottom, #2a4a1a, #1a3a0a); }
.mystery-avatar {
    width: 70px; height: 70px; border-radius: 14px;
    background: linear-gradient(to bottom, #3a3a3a, #1a1a1a);
    border: 3px solid #555;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #777;
}
.vs-label { font-size: 10px; font-weight: 900; padding: 2px 10px; border-radius: 10px; }
.green-label { background: #1b5e20; color: #aed581; }
.gold-label { background: #7c5210; color: #ffd700; }
.vs-name { color: white; font-size: 11px; font-weight: 800; }
.vs-score { color: #ffd700; font-size: 14px; font-weight: 900; }
.vs-win-rate { color: #b3aca3; font-size: 10px; font-weight: 700; text-align: center; }
.vs-win-rate strong { color: #4caf50; font-size: 13px; }
.vs-sim-note { font-size: 8px; font-weight: 700; color: rgba(255,255,255,0.65); font-style: italic; margin-top: 2px; }
.vs-sim-explainer { color: #d9d3ca; font-size: 10px; font-weight: 700; text-align: center; margin: -4px 15px 8px; text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6); }

.challenge-mode-tabs { display: flex; gap: 8px; margin: 0 15px 10px; }
.challenge-mode-tab {
    flex: 1;
    background: linear-gradient(to bottom, #2b231c, #1a1511);
    border: 2px solid #3e2723;
    border-radius: 10px;
    color: #a89886;
    font-size: 10px;
    font-weight: 800;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, color 0.15s;
}
.challenge-mode-tab i { font-size: 15px; }
.challenge-mode-tab:active { transform: scale(0.96); }
.challenge-mode-tab.active-mode-tab { border-color: #4fc3f7; color: #4fc3f7; box-shadow: 0 0 10px rgba(79,195,247,0.3); }
.challenge-mode-tab.active-mode-tab i { color: #4fc3f7; }

.friend-challenge-list { display: flex; flex-direction: column; gap: 8px; margin: 0 15px 12px; }
.friend-challenge-empty { color: #d9d3ca; font-size: 12px; font-weight: 700; text-align: center; padding: 20px 10px; text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6); }
.friend-challenge-empty a { color: #4fc3f7; }
.friend-challenge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.25));
    border: 2px solid #3e2723;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}
.friend-challenge-item:active { transform: scale(0.98); }
.friend-challenge-item.selected-friend-opponent { border-color: #7cb342; box-shadow: 0 0 10px rgba(124,179,66,0.3); }
.friend-challenge-avatar { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.friend-challenge-name { flex: 1; color: white; font-size: 12px; font-weight: 800; }
.friend-challenge-trophies { color: #ffd700; font-size: 11px; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.friend-challenge-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #555; display: flex; align-items: center; justify-content: center; color: transparent; font-size: 10px; flex-shrink: 0; }
.selected-friend-opponent .friend-challenge-check { background: #7cb342; border-color: #7cb342; color: white; }

.vs-middle { text-align: center; padding: 0 10px; }
.vs-text {
    font-size: 36px;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 2px 2px 0 #b8860b, 0 0 20px rgba(255,215,0,0.3);
}

.how-it-works {
    background: #f1ebd8;
    border: 2px solid #7c9363;
    border-radius: 12px;
    margin: 8px 15px;
    padding: 12px;
}
.how-title { text-align: center; color: #3e2723; font-size: 12px; font-weight: 900; margin-bottom: 10px; }
.how-steps { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.how-step { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; text-align: center; }
.how-num { width: 20px; height: 20px; background: #7cb342; border-radius: 50%; color: white; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.how-icon { font-size: 22px; color: #555; }
.how-step-name { font-size: 11px; font-weight: 800; color: #3e2723; }
.how-step-desc { font-size: 9.5px; color: #6d4c41; }
.how-arrow { color: #7cb342; font-size: 16px; flex-shrink: 0; }

.challenge-rewards {
    background: #f1ebd8;
    border: 2px solid #7c9363;
    border-radius: 12px;
    margin: 8px 15px;
    padding: 10px 15px;
}
.challenge-rewards-title { text-align: center; color: #3e2723; font-size: 11px; font-weight: 900; margin-bottom: 8px; }
.challenge-rewards-row { display: flex; justify-content: space-around; }
.challenge-reward-item { display: flex; align-items: center; gap: 5px; color: #3e2723; font-size: 11px; font-weight: 800; }

.difficulty-section { margin: 8px 15px 40px; }
.difficulty-title { text-align: center; color: white; font-size: 12px; font-weight: 900; text-shadow: 1px 1px 2px #000; margin-bottom: 8px; }
.difficulty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.difficulty-card {
    background: linear-gradient(to bottom, #1a2a3a, #0a1a2a);
    border: 2px solid #2a3a4a;
    border-radius: 10px;
    padding: 7px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: all 0.2s;
}
.difficulty-card.selected-diff {
    border-color: #7cb342;
    background: linear-gradient(to bottom, #1a3a1a, #0a2a0a);
    box-shadow: 0 0 12px rgba(124,179,66,0.4);
}
.difficulty-card.purple-diff { background: linear-gradient(to bottom, #1a0a2a, #0a001a); border-color: #7b1fa2; }
.diff-name { color: white; font-size: 10px; font-weight: 900; }
.diff-turtle { width: 36px; height: 36px; object-fit: contain; }
.diff-questions { color: #9e9e9e; font-size: 9px; font-weight: 700; }
.diff-reward { color: #ffd700; font-size: 10px; font-weight: 900; }

.find-opponent-btn {
    background: linear-gradient(to bottom, #7cb342, #33691e);
    border: 2px solid #1b5e20;
    color: white;
    width: 220px;
    max-width: calc(100% - 30px);
    margin: 8px auto;
    border-radius: 12px;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 900;
    font-family: var(--primary-font);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.2), 0 4px 0 #1b5e20, 0 6px 10px rgba(0,0,0,0.4);
    transition: transform 0.1s, box-shadow 0.1s;
    text-shadow: 1px 2px 2px rgba(0,0,0,0.5);
}
.find-opponent-btn:active { transform: translateY(4px); box-shadow: inset 0 2px 4px rgba(255,255,255,0.2), 0 0 0 #1b5e20, 0 2px 5px rgba(0,0,0,0.4); }
.find-opp-sub { font-size: 9px; font-weight: 700; opacity: 0.8; }

.daily-challenge-bar {
    background: linear-gradient(to right, #1a1511, #2d241c);
    border: 2px solid #3e2723;
    border-radius: 12px;
    margin: 0 15px 10px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.daily-challenge-info { flex: 1; }
.daily-challenge-title { color: #ffd700; font-size: 12px; font-weight: 900; }
.daily-challenge-desc { color: #b3aca3; font-size: 10px; font-weight: 700; }
.daily-challenge-remaining { color: white; font-size: 11px; font-weight: 900; text-align: center; }
.daily-challenge-remaining strong { color: #4caf50; font-size: 16px; display: block; }

/* =========================================
   SHOP SCREEN
   ========================================= */
.shop-section-title {
    color: #ffd700;
    font-size: 13px;
    font-weight: 900;
    padding: 10px 15px 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6);
}

.daily-products {
    display: flex;
    gap: 8px;
    padding: 4px 15px;
    overflow-x: auto;
}
.daily-products::-webkit-scrollbar { display: none; }
.daily-product {
    background: rgba(30,26,20,0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-width: 80px;
    height: 100px;
    cursor: pointer;
    transition: transform 0.15s;
}
.daily-product:active { transform: scale(0.96); }
.daily-product-icon { font-size: 26px; height: 30px; display: flex; align-items: center; }
.daily-product-name { font-size: 9px; line-height: 1.25; font-weight: 900; color: #fff8e1; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; height: 22px; }
.daily-product-amount { font-size: 12px; font-weight: 900; color: #aed581; }
.daily-product-price { background: linear-gradient(to bottom, #7cb342, #33691e); border: none; border-radius: 7px; padding: 3px 7px; color: white; font-size: 11px; font-weight: 800; display: flex; align-items: center; gap: 4px; cursor: pointer; font-family: var(--primary-font); flex-shrink: 0; }

/* =========================================
   INVENTORY SCREEN
   ========================================= */
.inv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 4px 15px;
}
.inv-item {
    background: rgba(30,26,20,0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    padding: 12px 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    position: relative;
}
.inv-item:active { transform: scale(0.95); }
.inv-item.selected-inv { border-color: #ffd700; box-shadow: 0 0 10px rgba(255,215,0,0.35); }
.inv-item.inv-item-empty { opacity: 0.5; }
.inv-item-icon { font-size: 28px; }
.inv-item-name { font-size: 10px; font-weight: 800; color: #fff8e1; text-align: center; line-height: 1.25; text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6); }
.inv-item-count { font-size: 12px; font-weight: 900; color: #fff8e1; text-shadow: 0 1px 3px rgba(0,0,0,0.9); }

.inv-selected-panel {
    background: linear-gradient(to right, #1a1511, #2d241c);
    border: 2px solid #cca142;
    border-radius: 12px;
    margin: 8px 15px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}
.inv-selected-icon { font-size: 32px; }
.inv-selected-info { flex: 1; }
.inv-selected-name { color: white; font-size: 15px; font-weight: 900; }
.legendary-name { color: #a855f7 !important; }
.inv-selected-desc { color: #b3aca3; font-size: 11px; font-weight: 700; margin-top: 2px; }
.inv-use-btn { background: linear-gradient(to bottom, #4caf50, #2e7d32); border: 2px solid #1b5e20; color: white; border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 900; cursor: pointer; font-family: var(--primary-font); }

/* =========================================
   ACHIEVEMENTS SCREEN
   ========================================= */
/* Category rail is a horizontal scroll strip, not a cramped 75px vertical
   column -- that gave each label ~65px of width for icon+text+fraction. */
.ach-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 8px 15px;
}
.ach-sidebar {
    width: auto;
    flex-shrink: 0;
    flex-direction: row;
    display: flex;
    gap: 6px;
    padding-right: 0;
    overflow-x: auto;
    padding-bottom: 2px;
}
.ach-sidebar::-webkit-scrollbar { display: none; }
.ach-cat {
    background: linear-gradient(to bottom, rgba(45,36,28,0.6), rgba(26,21,17,0.6));
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    color: #ab9a8c;
    font-size: 11px;
    font-weight: 800;
    font-family: var(--primary-font);
    transition: transform 0.15s, background 0.2s;
    flex-shrink: 0;
    min-width: 76px;
}
.ach-cat:active { transform: scale(0.95); }
.ach-cat.active-cat { background: linear-gradient(to bottom, #cca142, #8b6914); color: white; border-color: #a37a10; }
.ach-cat i { font-size: 19px; }
.ach-cat small { font-size: 10px; color: inherit; opacity: 0.85; }

.ach-list { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.ach-overview {
    background: linear-gradient(to bottom, rgba(26,26,42,0.55), rgba(10,10,26,0.55));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 2px solid rgba(204,161,66,0.75);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 12px;
}
.ach-overview-left { flex: 1; display: flex; flex-direction: column; align-items: center; }
.ach-overview-title { font-size: 12px; font-weight: 900; color: #b3aca3; margin-bottom: 5px; }
.ach-shield { font-size: 32px; }
.ach-count { font-size: 27px; font-weight: 900; color: #ffd700; }
.ach-count span { font-size: 17px; color: #b3aca3; }
.ach-count-label { font-size: 11px; color: #b3aca3; font-weight: 700; }
.ach-overview-bar { height: 6px; background: #333; border-radius: 3px; width: 100%; margin: 5px 0; overflow: hidden; }
.ach-overview-fill { height: 100%; background: linear-gradient(to right, #ffd700, #ff9800); border-radius: 3px; }
.ach-overview-pct { font-size: 12px; color: #b3aca3; }

.ach-overview-right { width: 100px; flex-shrink: 0; }
.ach-earned-title { font-size: 11px; font-weight: 900; color: #ffd700; margin-bottom: 6px; }
.ach-earned-items { display: flex; flex-direction: column; gap: 6px; }
.ach-earned-items div { color: white; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 5px; }

.ach-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
/* The locked "epic" summary card is meant to stand out, so it spans both columns. */
.ach-grid > .ach-item:last-child { grid-column: 1 / -1; }

.ach-item {
    background: linear-gradient(to bottom, rgba(30,30,48,0.5), rgba(10,10,20,0.5));
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(70,70,95,0.6);
    border-radius: 12px;
    padding: 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}
.completed-ach { border-color: rgba(76,175,80,0.85); }
.locked-ach { opacity: 0.6; }

.ach-item-icon { font-size: 20px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.08); flex-shrink: 0; }
.locked-icon { background: rgba(51,51,51,0.9) !important; color: #999; font-size: 15px !important; }
.ach-item-info { flex: 1; min-width: 0; }
.ach-item-name { color: white; font-size: 13px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ach-item-desc { color: #c7bfb4; font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ach-item-bar { height: 4px; background: rgba(51,51,51,0.8); border-radius: 3px; overflow: hidden; margin: 3px 0; }
.ach-item-fill { height: 100%; border-radius: 3px; }
.ach-item-progress { color: #c7bfb4; font-size: 10px; }
.ach-item-reward { display: flex; flex-direction: column; align-items: center; color: white; font-size: 12px; font-weight: 900; flex-shrink: 0; }
.ach-item-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #555; display: flex; align-items: center; justify-content: center; color: #888; font-size: 11px; flex-shrink: 0; }
.completed-check { background: #2e7d32; border-color: #4caf50; color: white; }
.ach-epic-reward { display: flex; flex-direction: column; align-items: center; gap: 3px; flex-shrink: 0; }
.epic-label { font-size: 10px; color: #b3aca3; font-weight: 700; }
.epic-title { background: linear-gradient(to bottom, #9c27b0, #6a0080); color: #ce93d8; font-size: 11px; font-weight: 900; padding: 3px 8px; border-radius: 5px; border: 1px solid #7b1fa2; }

/* =========================================
   PROFILE SCREEN
   ========================================= */
#profile-screen { padding-top: 82px; }

.profile-card {
    background: linear-gradient(to right, rgba(30,25,20,0.95), rgba(20,15,10,0.95));
    border: 2px solid #cca142;
    border-radius: 16px;
    margin: 8px 15px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.profile-avatar-section { display: flex; align-items: flex-start; gap: 12px; }
.profile-avatar-wrap { position: relative; flex-shrink: 0; width: 82px; }
.profile-avatar { width: 82px; height: 96px; border-radius: 14px; border: 3px solid #cca142; object-fit: cover; background: linear-gradient(to bottom, #2a3a1a, #1a2a0a); display: block; }
.profile-camera-btn { position: absolute; bottom: 22px; right: 0; width: 24px; height: 24px; background: #1976d2; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: white; cursor: pointer; }
.profile-avatar-name { text-align: center; color: #ffb74d; font-size: 11px; font-weight: 900; margin-top: 4px; text-shadow: 1px 1px 0 #000; }

.profile-user-info { flex: 1; min-width: 0; }
.profile-username-row { display: flex; align-items: center; gap: 6px; }
.profile-username { color: white; font-size: 18px; font-weight: 900; }
.profile-username-tag { color: #b3aca3; font-size: 12px; font-weight: 700; }
.profile-edit-btn-sm { background: none; border: 1px solid #666; color: #b3aca3; border-radius: 5px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; }
.profile-league-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.league-icon-inline { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; border: 1px solid #cca142; }
.league-name { color: #ffb74d; font-size: 12px; font-weight: 900; }
.profile-level-row { display: flex; align-items: center; gap: 5px; margin: 6px 0; }
.profile-level-bar { flex: 1; height: 11px; background: #333; border-radius: 6px; overflow: hidden; }
.profile-level-fill { height: 100%; background: linear-gradient(to right, #ffd700, #ff9800); }
.profile-level-row span { color: #b3aca3; font-size: 10px; }
.profile-level-label { color: #ffd700; font-size: 10px; font-weight: 800; }
.profile-trophy-row { color: #ffd700; font-size: 12px; font-weight: 900; margin-bottom: 6px; }
.profile-bio-row { display: flex; align-items: center; gap: 5px; }
.profile-bio { color: #c9c2b6; font-size: 11px; font-style: italic; }
.profile-member-info { display: flex; gap: 10px; margin-top: 6px; }
.profile-member-info span { color: #8a8378; font-size: 9px; }

.profile-tabs {
    display: flex;
    gap: 4px;
    margin: 12px 15px 10px;
    background: rgba(15,12,10,0.8);
    border-radius: 12px;
    padding: 4px;
}
.profile-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #ab9a8c;
    font-size: 11px;
    font-weight: 800;
    padding: 8px 4px;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: var(--primary-font);
    transition: all 0.2s;
}
.profile-tab.active-tab { background: linear-gradient(to bottom, #cca142, #8b6914); color: white; }
.profile-tab-icon { width: 15px; height: 15px; object-fit: contain; }

.profile-content { padding: 0 15px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.profile-section-card { background: rgba(10,8,7,0.85); border: 1px solid #3e2723; border-radius: 12px; padding: 13px; }
.fav-card { background: linear-gradient(to bottom, rgba(38,25,50,0.9), rgba(24,13,36,0.9)); border-color: #7b1fa2; }
.profile-section-header { color: #cca142; font-size: 12px; font-weight: 900; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.fav-header { color: #ce93d8 !important; }
.team-header { color: #ffd700 !important; justify-content: space-between; }
.profile-about-text { color: #c9c2b6; font-size: 12px; font-weight: 700; line-height: 1.5; }


.fav-turtle-display { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.fav-turtle-img { width: 48px; height: 48px; object-fit: contain; }
.fav-turtle-info { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fav-turtle-name { color: #ce93d8; font-size: 12px; font-weight: 900; }
.fav-turtle-rarity { font-size: 9px; font-weight: 900; padding: 2px 8px; border-radius: 5px; width: fit-content; }
.epic-rarity { background: #4a1fa8; color: #ce93d8; border: 1px solid #7b1fa2; }
.basic-rarity { background: #37474f; color: #b0bec5; border: 1px solid #546e7a; }
.fav-turtle-level { color: #b3aca3; font-size: 10px; font-weight: 700; }
.fav-change-btn { width: 100%; background: linear-gradient(to bottom, #4caf50, #2e7d32); border: 1px solid #1b5e20; color: white; border-radius: 7px; padding: 5px 12px; font-size: 10px; font-weight: 900; cursor: pointer; font-family: var(--primary-font); }

.fav-shell-display { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.fav-shell-icon { font-size: 34px; }
.fav-shell-info { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fav-shell-name { color: #ce93d8; font-size: 12px; font-weight: 900; }
.fav-shell-bonus { color: #b3aca3; font-size: 9px; font-weight: 700; }

.team-display { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.team-shield { font-size: 26px; }
.team-info { flex: 1; min-width: 0; }
.team-name { color: #4fc3f7; font-size: 12px; font-weight: 900; }
.team-role { color: #b3aca3; font-size: 9px; }
.team-score { color: #ffd700; font-size: 11px; font-weight: 900; }
.team-empty-state { display: flex; align-items: center; gap: 8px; color: #ab9a8c; font-size: 11px; font-weight: 700; padding: 10px 0; }
.team-gem-hint { color: #ffd54f; font-size: 10px; font-weight: 700; line-height: 1.4; }
.team-gem-hint strong { color: #ffe082; }
.team-member-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; max-height: 220px; overflow-y: auto; }
.recent-ach-empty { display: flex; align-items: center; gap: 8px; color: #ab9a8c; font-size: 11px; font-weight: 700; padding: 10px 0; margin-bottom: 8px; }
.team-action-row { display: flex; gap: 8px; margin-top: 8px; }
.team-action-row:first-of-type { margin-top: 0; }
.team-action-row button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; }
.view-team-btn { background: linear-gradient(to bottom, #29b6f6, #0277bd); border: 1px solid #01579b; color: white; border-radius: 9px; padding: 8px; font-size: 11px; font-weight: 900; cursor: pointer; font-family: var(--primary-font); }
.leave-team-btn { background: linear-gradient(to bottom, #e57373, #c62828); border: 1px solid #8e0000; color: white; border-radius: 9px; padding: 8px; font-size: 11px; font-weight: 900; cursor: pointer; font-family: var(--primary-font); }
.add-team-btn { background: linear-gradient(to bottom, #81c784, #388e3c); border: 1px solid #1b5e20; color: white; border-radius: 9px; padding: 8px; font-size: 11px; font-weight: 900; cursor: pointer; font-family: var(--primary-font); }
.search-team-btn { background: linear-gradient(to bottom, #cca142, #8b6914); border: 1px solid #6b4f0f; color: white; border-radius: 9px; padding: 8px; font-size: 11px; font-weight: 900; cursor: pointer; font-family: var(--primary-font); }

.recent-ach-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.recent-ach { display: flex; align-items: center; gap: 6px; }
.recent-ach-icon { font-size: 17px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.08); border-radius: 50%; flex-shrink: 0; }
.recent-ach-info { flex: 1; min-width: 0; }
.recent-ach-name { color: white; font-size: 11px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-ach-desc { color: #b3aca3; font-size: 10px; }
.recent-ach-date { color: #8a8378; font-size: 9px; }
.recent-ach-reward { color: #ffd700; font-size: 11px; font-weight: 900; flex-shrink: 0; display: flex; align-items: center; gap: 3px; }

.view-all-btn { width: 100%; background: linear-gradient(to bottom, #4caf50, #2e7d32); border: 1px solid #1b5e20; color: white; border-radius: 9px; padding: 8px; font-size: 11px; font-weight: 900; cursor: pointer; font-family: var(--primary-font); }

.profile-bottom-actions { display: flex; flex-direction: column; gap: 8px; margin: 14px 15px 40px; }
.profile-bottom-actions .view-all-btn { display: flex; align-items: center; justify-content: center; gap: 6px; }
.profile-bottom-actions .achievements-btn { background: linear-gradient(to bottom, #ffca28, #f57f17); border-color: #b25300; color: #3e2723; }
.profile-bottom-actions .leaderboard-btn { background: linear-gradient(to bottom, #8d6e63, #4e342e); border-color: #27140f; }

.profile-tab-panel { padding-top: 2px; }

/* Envanter tab -- 5 per row, unlike the full inventory screen's 4-column grid */
.profile-inv-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin: 0 15px 10px;
}
.profile-inv-grid .inv-item { padding: 8px 3px 7px; border-radius: 10px; gap: 2px; }
.profile-inv-grid .inv-item-icon { font-size: 19px; }
.profile-inv-grid .inv-item-name { font-size: 7px; line-height: 1.15; }
.profile-inv-grid .inv-item-count { font-size: 10px; }

/* Istatistikler tab -- two columns instead of three cramped ones, more
   breathing room per card, and a distinct icon "chip" so the number is
   the clear focal point instead of competing with a bare icon glyph.
   Background matches .profile-section-card's transparency (0.85) instead
   of drawing its own darker/more opaque shell. */
.stat-grid-panel { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 15px 12px; }
.stat-mini-box {
    background: rgba(10,8,7,0.85);
    border: 1px solid #3e2723;
    border-radius: 14px;
    padding: 12px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.15s;
}
.stat-mini-box[data-goto]:active { transform: scale(0.97); border-color: #cca142; }
.stat-mini-box i {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.stat-mini-box-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stat-mini-val { color: white; font-size: 16px; font-weight: 900; line-height: 1.2; }
.stat-mini-label { color: #d8cfc2; font-size: 10px; font-weight: 800; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-mini-desc { color: #8a8378; font-size: 8px; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.clickable-card { cursor: pointer; transition: border-color 0.15s; }
.clickable-card:active { border-color: #cca142; }
.profile-card-chevron { margin-left: auto; color: #8a8378; font-size: 11px; }

.leaderboard-list { display: flex; flex-direction: column; gap: 8px; }
.leader-row { display: flex; align-items: center; gap: 8px; }
.leader-rank { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,0.08); color: #b3aca3; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gold-rank { background: linear-gradient(to bottom, #ffd54f, #f57f17); color: #3e2723; }
.silver-rank { background: linear-gradient(to bottom, #e0e0e0, #9e9e9e); color: #3e2723; }
.bronze-rank { background: linear-gradient(to bottom, #d7a06a, #a06a37); color: #3e2723; }
.leader-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: contain; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.leader-name { flex: 1; color: white; font-size: 12px; font-weight: 900; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-score { color: #ffd700; font-size: 11px; font-weight: 800; flex-shrink: 0; display: flex; align-items: center; gap: 3px; }
.leader-me { background: rgba(204,161,66,0.15); border: 1px solid rgba(204,161,66,0.5); border-radius: 8px; padding: 4px 6px; }
.leader-me .leader-name { color: #ffd54f; }

/* Ligler ekrani */
.league-progress-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 15px; }
.league-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(62,92,58,0.55), rgba(36,55,31,0.55));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 3px solid rgba(27,46,24,0.7);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.15);
}
.league-row.locked-league {
    background: linear-gradient(135deg, rgba(50,50,50,0.5), rgba(25,25,25,0.5));
    filter: saturate(0.5) brightness(0.85);
}
.league-row.locked-league .league-row-portrait { filter: grayscale(1); }
.league-row.current-league { border-color: #cca142; box-shadow: 0 0 14px rgba(204,161,66,0.6), inset 0 1px 2px rgba(255,255,255,0.15); }
.league-row-portrait { width: 56px; height: 56px; object-fit: contain; border-radius: 50%; background: rgba(255,255,255,0.08); flex-shrink: 0; }
.league-row-info { flex: 1; min-width: 0; }
.league-row-name { color: white; font-size: 13px; font-weight: 900; }
.league-row-threshold { color: #b3aca3; font-size: 11px; margin-top: 2px; }
.league-row-current-badge { color: #ffd700; font-size: 18px; }
.league-row-lock { color: #8a8378; font-size: 16px; }
.league-row-check { color: #7cb342; font-size: 16px; }

/* Ayarlar tab */
.settings-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.settings-row:last-child { border-bottom: none; padding-bottom: 0; }
.settings-row-label { color: #b3aca3; font-size: 11px; font-weight: 700; flex-shrink: 0; width: 100px; }
.settings-row-value { flex: 1; color: white; font-size: 12px; font-weight: 800; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-edit-btn { background: none; border: 1px solid #666; color: #b3aca3; border-radius: 5px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; flex-shrink: 0; }

.settings-toggle { margin-left: auto; position: relative; display: inline-block; width: 38px; height: 21px; flex-shrink: 0; }
.settings-toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #444; border-radius: 21px; transition: background 0.2s; }
.toggle-slider::before { content: ''; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: transform 0.2s; }
.settings-toggle input:checked + .toggle-slider { background: #4caf50; }
.settings-toggle input:checked + .toggle-slider::before { transform: translateX(17px); }

.gender-select-group { margin-left: auto; display: flex; gap: 6px; }
.gender-select-btn {
    background: linear-gradient(to bottom, #2d241c, #1a1511);
    border: 1px solid var(--border-color);
    color: #ab9a8c;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 900;
    font-family: var(--primary-font);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.gender-select-btn.active-gender-btn { background: linear-gradient(to bottom, #cca142, #8b6914); color: white; border-color: #a37a10; }

/* Support ticket category picker -- same button-group pattern as
   .gender-select-group/.gender-select-btn, just 3 equal-width buttons
   filling the row instead of 2 pushed to the right. */
.category-select-group { display: flex; gap: 6px; }
.category-select-btn {
    flex: 1;
    background: linear-gradient(to bottom, #2d241c, #1a1511);
    border: 1px solid var(--border-color);
    color: #ab9a8c;
    border-radius: 8px;
    padding: 8px 6px;
    font-size: 10px;
    font-weight: 900;
    font-family: var(--primary-font);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.category-select-btn.active-category-btn { background: linear-gradient(to bottom, #cca142, #8b6914); color: white; border-color: #a37a10; }

.support-history-item { background: rgba(0,0,0,0.25); border: 1px solid #3e2723; border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.support-history-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.support-history-category { color: #cca142; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.support-history-date { color: #8a8378; font-size: 9px; }
.support-history-msg { color: #d9d3ca; font-size: 11px; line-height: 1.4; }
.support-history-reply { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #3e2723; color: #aed581; font-size: 11px; line-height: 1.4; }
.support-history-reply strong { color: #7cb342; }

.admin-ticket-row { background: rgba(0,0,0,0.25); border: 1px solid #3e2723; border-radius: 10px; padding: 8px 10px; margin-top: 8px; cursor: pointer; transition: border-color 0.15s; }
.admin-ticket-row:active { border-color: #cca142; }
.admin-ticket-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.admin-ticket-category { font-size: 9px; font-weight: 900; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; color: white; }
.admin-ticket-category.cat-yardim { background: #0288d1; }
.admin-ticket-category.cat-destek { background: #d32f2f; }
.admin-ticket-category.cat-oneri { background: #7cb342; }
.admin-ticket-from { color: #fff3e0; font-size: 11px; font-weight: 800; }
.admin-ticket-status { margin-left: auto; font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 6px; }
.admin-ticket-status.status-pending { background: rgba(255,152,0,0.2); color: #ffb74d; }
.admin-ticket-status.status-replied { background: rgba(124,179,66,0.2); color: #aed581; }
.admin-ticket-msg { color: #ab9a8c; font-size: 11px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ticket-detail-message { background: rgba(0,0,0,0.3); border: 1px solid #3e2723; border-radius: 8px; padding: 10px; color: #d9d3ca; font-size: 12px; line-height: 1.4; margin-top: 8px; max-height: 120px; overflow-y: auto; }

.logout-btn { width: calc(100% - 30px); margin: 0 15px 10px; background: linear-gradient(to bottom, #e57373, #c62828); border: 2px solid #8e0000; color: white; border-radius: 12px; padding: 12px; font-size: 13px; font-weight: 900; cursor: pointer; font-family: var(--primary-font); display: flex; align-items: center; justify-content: center; gap: 8px; }

/* =========================================
   CUSTOMIZE SCREEN -- character gallery
   ========================================= */
.char-gallery-layout {
    display: flex;
    gap: 10px;
    margin: 8px 15px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.4));
    border: 2px solid #3e2723;
    border-radius: 14px;
    padding: 14px;
}
.char-gallery-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 45%;
}
.char-gallery-preview-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}
#char-gallery-preview-frame {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
}

.char-gallery-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}
.char-gallery-name { color: white; font-size: 20px; font-weight: 900; line-height: 1.2; }
.char-gallery-desc { color: #e8e2d8; font-size: 13px; font-weight: 600; line-height: 1.4; }
.char-gallery-league { color: #ffd700; font-size: 13px; font-weight: 800; }
.char-gallery-status { color: #7cb342; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 5px; }

.cust-section-title { color: #ffd700; font-size: 13px; font-weight: 900; padding: 8px 15px 5px; }

.char-gallery-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 4px 15px 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.char-gallery-grid::-webkit-scrollbar { display: none; }
.char-gallery-grid .cust-item { flex-shrink: 0; }

.cust-item {
    background: linear-gradient(to bottom, #1a2a1a, #0a1a0a);
    border: 2px solid #2a3a2a;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 90px;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}
.cust-item:active { transform: scale(0.96); }
.selected-cust-item { border-color: #7cb342 !important; box-shadow: 0 0 10px rgba(124,179,66,0.3); }
.locked-cust-item { opacity: 0.6; cursor: default; }

.cust-item-img { width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cust-item-img img { width: 100%; height: 100%; object-fit: contain; }
.cust-item-name { font-size: 11px; font-weight: 800; color: white; text-align: center; }
.cust-check { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; background: #7cb342; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 10px; }
.cust-lock { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 28px; height: 28px; background: rgba(0,0,0,0.7); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #777; font-size: 12px; }

/* Character frames (cosmetic, purchasable with gems). Applied to
   #char-gallery-preview-frame (large preview) and the selected card's
   .cust-item-img (small card) -- both are square, overflow:hidden
   containers, so the same rules work at either size. */
.char-frame-default,
.frame-neon, .frame-magma, .frame-ice, .frame-galaxy, .frame-rainbow, .frame-royal {
    position: relative;
    border-radius: 14px;
}
.cust-item-img.char-frame-default,
.cust-item-img.frame-neon, .cust-item-img.frame-magma, .cust-item-img.frame-ice,
.cust-item-img.frame-galaxy, .cust-item-img.frame-rainbow, .cust-item-img.frame-royal {
    border-radius: 10px;
}

.char-frame-default { border: 3px solid #cca142; box-shadow: 0 0 14px rgba(204,161,66,0.5), 0 10px 10px rgba(0,0,0,0.5); }

.frame-neon {
    border: 3px solid #00e5ff;
    animation: frame-neon-pulse 2.5s ease-in-out infinite alternate;
}
@keyframes frame-neon-pulse {
    from { box-shadow: 0 0 6px #00e5ff, 0 0 10px #ff00e5; }
    to   { box-shadow: 0 0 14px #00e5ff, 0 0 24px #ff00e5; }
}

.frame-magma {
    border: 3px solid transparent;
    background-image: linear-gradient(135deg, #ff6f00, #d50000, #ff9800, #ff6f00);
    background-size: 250% 250%;
    background-clip: border-box;
    animation: frame-gradient-drift 4s ease infinite;
    box-shadow: 0 0 12px rgba(255,111,0,0.5);
}

.frame-ice {
    border: 3px solid #b3e5fc;
    box-shadow: 0 0 4px #ffffff, 0 0 10px rgba(179,229,252,0.8), inset 0 0 8px rgba(255,255,255,0.5);
    overflow: hidden;
}
.frame-ice::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.55) 50%, transparent 60%);
    animation: frame-ice-shine 3.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes frame-ice-shine {
    0%   { transform: translateX(-60%); }
    50%  { transform: translateX(60%); }
    100% { transform: translateX(-60%); }
}

.frame-galaxy {
    border: 3px solid transparent;
    background-image: linear-gradient(135deg, #4a148c, #0d0221, #7b1fa2);
    box-shadow: 0 0 12px rgba(123,31,162,0.6);
    overflow: hidden;
}
.frame-galaxy::before, .frame-galaxy::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 4px #ffffff;
    animation: frame-twinkle 2.2s ease-in-out infinite;
}
.frame-galaxy::before { top: 15%; left: 20%; animation-delay: 0s; }
.frame-galaxy::after { top: 65%; left: 75%; animation-delay: 1.1s; }
@keyframes frame-twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

.frame-rainbow {
    border: 3px solid transparent;
    background-image: linear-gradient(90deg, #ff0000, #ff9800, #ffeb3b, #4caf50, #2196f3, #9c27b0, #ff0000);
    background-size: 300% 100%;
    animation: frame-gradient-drift-x 4s linear infinite;
    box-shadow: 0 0 12px rgba(255,255,255,0.35);
}

.frame-royal {
    border: 3px solid #ffd700;
    box-shadow: 0 0 0 2px #1a1206, 0 0 0 5px #ffd700, 0 0 18px rgba(255,215,0,0.6);
    animation: frame-royal-glow 7s ease-in-out infinite;
}
@keyframes frame-royal-glow {
    0%, 100% { box-shadow: 0 0 0 2px #1a1206, 0 0 0 5px #ffd700, 0 0 14px rgba(255,215,0,0.5); }
    50%      { box-shadow: 0 0 0 2px #1a1206, 0 0 0 5px #ffd700, 0 0 22px rgba(255,215,0,0.8); }
}

@keyframes frame-gradient-drift {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}
@keyframes frame-gradient-drift-x {
    0%   { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

/* Frame shop row */
.char-frame-shop {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 4px 15px 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.char-frame-shop::-webkit-scrollbar { display: none; }

.frame-shop-item {
    background: rgba(30,26,20,0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 84px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}
.frame-shop-item:active { transform: scale(0.96); }
.frame-shop-item.frame-equipped { border-color: #7cb342 !important; box-shadow: 0 0 10px rgba(124,179,66,0.3); }

.frame-shop-swatch { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.frame-shop-name { font-size: 10px; font-weight: 800; color: #fff8e1; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6); }
.frame-shop-state-badge { font-size: 10px; font-weight: 900; }
.frame-shop-state-badge.frame-price { color: #a855f7; display: flex; align-items: center; gap: 3px; }
.frame-shop-state-badge.frame-select-label { color: #ffd700; }
.frame-shop-state-badge.frame-check { width: 18px; height: 18px; background: #7cb342; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; }

/* Full frame gallery on the shop screen -- a grid instead of the
   horizontal-scroll strip used elsewhere, since the shop has room to
   show every frame at once instead of just teasing a few. */
.frame-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 4px 15px 15px;
}
.frame-shop-grid .frame-shop-item { width: 100%; }

.shop-deal-banner {
    margin: 8px 15px;
    background: linear-gradient(135deg, #3a2d10, #251d09);
    border: 2px solid #cca142;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}
.shop-deal-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #ffca28, #f57f17);
    border: 2px solid #a85d00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}
.shop-deal-info { flex: 1; min-width: 0; }
.shop-deal-title { color: #ffe082; font-size: 12px; font-weight: 900; }
.shop-deal-desc { color: #d9c9a3; font-size: 10px; font-weight: 700; margin-top: 2px; }
.shop-deal-price { color: #a855f7; font-size: 12px; font-weight: 900; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* =========================================
   GAME ENGINE FEEDBACK STATES
   ========================================= */
.answer-card.correct-answer { border-color: #4caf50; box-shadow: 0 0 15px 4px rgba(76,175,80,0.5); }
.answer-card.wrong-answer { border-color: #e53935; box-shadow: 0 0 15px 4px rgba(229,57,53,0.5); }
.answer-card.hint-glow { border-color: #ffd700; box-shadow: 0 0 15px 4px rgba(255,215,0,0.5); }
.answer-card.disabled-card { pointer-events: none; }

@keyframes shake-cost {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}
.action-cost-btn.insufficient {
    animation: shake-cost 0.4s ease;
    background: linear-gradient(to bottom, #e57373, #c62828) !important;
}

.game-back-btn {
    position: absolute;
    top: 65px;
    left: 15px;
    z-index: 25;
}

/* =========================================
   FEATURE GATING (coming-soon badges + lock overlay)
   ========================================= */
.soon-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(to bottom, #ff8a65, #d84315);
    color: white;
    font-size: 8px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    animation: soonPulse 1.6s ease-in-out infinite;
}
@keyframes soonPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.8; }
}
.icon-button { position: relative; }
.icon-button .soon-badge { position: absolute; top: -6px; right: -10px; }
.tab-soon-badge { margin-left: 4px; font-size: 7px; padding: 1px 5px; }
.nav-item { position: relative; }
.nav-soon-badge { position: absolute; top: -2px; right: 4px; }

.locked-feature-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,8,6,0.88);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 30px;
}
/* Nested inside a tab panel (e.g. Envanter tab on the profile screen)
   instead of a top-level screen -- must scroll along with its own panel
   rather than pin to the whole app frame, or it would blank out the tabs
   bar and bottom nav above/below it too. */
.locked-feature-overlay-inline {
    position: absolute;
    inset: 0;
    min-height: 220px;
}
.locked-feature-badge {
    position: relative;
    text-align: center;
    color: white;
    background: linear-gradient(to bottom, #2d241c, #1a1511);
    border: 2px solid #cca142;
    border-radius: 18px;
    padding: 30px 24px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.app-toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(to bottom, #2d241c, #1a1511);
    border: 1px solid #c62828;
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffab91;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    max-width: 85%;
    z-index: 500;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}
.app-toast.app-toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.app-toast i { color: #ff8a80; flex-shrink: 0; }

.app-announcement-banner {
    position: fixed;
    top: 245px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    max-width: calc(100% - 110px);
    background: linear-gradient(to bottom, #3a2d10, #251d09);
    border: 1px solid #cca142;
    border-radius: 10px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffe8b3;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.3;
    box-shadow: 0 6px 16px rgba(0,0,0,0.45);
    z-index: 15;
}
.app-announcement-banner i.fa-bullhorn { color: #cca142; flex-shrink: 0; font-size: 12px; }
.app-announcement-banner span { flex: 1; }
.app-announcement-close {
    background: none;
    border: none;
    color: #ffe8b3;
    cursor: pointer;
    flex-shrink: 0;
    padding: 2px 4px;
    font-size: 12px;
    opacity: 0.8;
}
.locked-feature-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #e57373, #c62828);
    border: 2px solid #8e0000;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5);
}
.locked-feature-badge i.fa-lock {
    font-size: 32px;
    color: #cca142;
    animation: soonPulse 1.8s ease-in-out infinite;
}
.locked-feature-title {
    font-size: 18px;
    font-weight: 900;
    color: #ffd54f;
    margin-top: 10px;
    letter-spacing: 1px;
}
.locked-feature-desc {
    font-size: 12px;
    color: #c9c2b6;
    margin-top: 6px;
    font-weight: 700;
    max-width: 240px;
}

.admin-panel-note {
    margin: 0 15px;
    color: #ab9a8c;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

/* =========================================
   AUTH SCREEN v2 (matches provided reference)
   ========================================= */
.auth-logo2 { width: 170px; margin-bottom: 6px; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.5)); }

.auth-view { width: 100%; display: flex; flex-direction: column; }
.auth-heading { color: white; font-size: 20px; font-weight: 900; text-align: center; text-shadow: 2px 2px 3px rgba(0,0,0,0.6); }
.auth-subheading { color: #d9d3c8; font-size: 12px; font-weight: 700; text-align: center; margin-top: 4px; margin-bottom: 18px; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }

.auth-field {
    position: relative;
    margin-bottom: 12px;
    background: rgba(20,16,12,0.55);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(204,161,66,0.5);
    border-radius: 12px;
    display: flex;
    align-items: center;
}
.auth-field-icon { color: #cca142; font-size: 14px; padding: 0 12px; flex-shrink: 0; }
.auth-field-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    padding: 13px 12px 13px 0;
    color: white;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--primary-font);
    user-select: text;
}
.auth-field-input::placeholder { color: #9a8f80; }
.auth-forgot-link {
    color: #ffd54f;
    font-size: 10px;
    font-weight: 800;
    padding-right: 12px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.auth-switch-row {
    text-align: center;
    margin-top: 16px;
    color: #d9d3c8;
    font-size: 12px;
    font-weight: 700;
}
.auth-switch-link { color: #ffd54f; font-weight: 900; cursor: pointer; }

.auth-social-btn {
    width: 100%;
    background: rgba(20,16,12,0.55);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(204,161,66,0.4);
    border-radius: 12px;
    padding: 12px;
    font-size: 13px;
    font-weight: 800;
    color: white;
    cursor: pointer;
    font-family: var(--primary-font);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    transition: transform 0.1s;
}
.auth-social-btn:active { transform: translateY(2px); }
.auth-apple-btn i { font-size: 16px; }

/* Arkadas arama (Profil > Arkadaslar tab) */
.friend-search-row { display: flex; gap: 8px; }
.friend-search-row .auth-input { flex: 1; margin-bottom: 0; }
.friend-search-btn {
    background: linear-gradient(to bottom, #cca142, #8b6914);
    border: 1px solid #6b4f0f;
    color: white;
    border-radius: 10px;
    width: 42px;
    flex-shrink: 0;
    cursor: pointer;
}
.friend-result-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); }
.friend-add-btn {
    background: linear-gradient(to bottom, #81c784, #388e3c);
    border: 1px solid #1b5e20;
    color: white;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
    font-family: var(--primary-font);
}
.friend-remove-btn {
    background: linear-gradient(to bottom, #e57373, #c62828);
    border: 1px solid #8e0000;
    color: white;
    border-radius: 7px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.friend-request-accept-btn {
    background: linear-gradient(to bottom, #81c784, #388e3c);
    border: 1px solid #1b5e20;
    color: white;
    border-radius: 7px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.friend-request-decline-btn {
    background: linear-gradient(to bottom, #e57373, #c62828);
    border: 1px solid #8e0000;
    color: white;
    border-radius: 7px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.tab-badge-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    margin-left: 4px;
    background: #e53935;
    border: 1px solid #7f0000;
    border-radius: 50%;
    color: white;
    font-size: 9px;
    font-weight: 900;
    vertical-align: top;
}
