@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');

:root {
    --bg-primary: #0a0e17;
    --bg-card: rgba(16, 22, 35, 0.65);
    --border-color: rgba(212, 175, 55, 0.2);
    --border-glow: rgba(212, 175, 55, 0.4);
    --color-gold: #d4af37;
    --color-gold-hover: #f3cf5a;
    --color-text: #e2e8f0;
    --color-text-muted: rgba(226, 232, 240, 0.6);
    --color-success: #10b981;
    --color-error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom scrollbar matching the WorldMe theme */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-glow) rgba(255, 255, 255, 0.04);
}
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-gold-hover) 0%, var(--color-gold) 45%, #8a6d1f 100%);
    border-radius: 10px;
    border: 2px solid #0a0e17;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffe08a 0%, var(--color-gold-hover) 50%, #b8941f 100%);
}
::-webkit-scrollbar-corner {
    background: transparent;
}

body {
    background: radial-gradient(circle at center, #131c31 0%, #080b13 100%);
    font-family: 'Google Sans', sans-serif;
    color: var(--color-text);
    height: 100vh;
    overflow: hidden;
}

input, select, textarea, button, label, .btn-game {
    font-family: 'Google Sans', sans-serif;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Top Header Bar */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(16, 22, 35, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
    z-index: 100;
    flex-shrink: 0;
    height: 60px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-logo img {
    height: 40px;
    border-radius: 8px;
}

/* .header-logo h2 removed */

/* Header Navigation for Desktop */
.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-nav .nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.header-nav .nav-link.active {
    color: var(--color-gold);
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--border-color);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.header-user span {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu {
    position: relative;
    flex-shrink: 0;
}

.avatar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    object-fit: cover;
    background: #111827;
    display: block;
    transition: box-shadow 0.2s;
}

.header-avatar:hover {
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 230px;
    background: rgba(22, 30, 48, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    z-index: 200;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

.dropdown-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    object-fit: cover;
    background: #111827;
    flex-shrink: 0;
}

.dropdown-user {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dropdown-user strong {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-user span {
    color: var(--color-gold);
    font-size: 0.8rem;
    font-weight: 600;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 4px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d1d5db;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.dropdown-logout {
    color: #fca5a5;
}

.dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Layouts */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    height: calc(100vh - 60px);
    overflow: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    height: 100%;
}

.page-scroll-layout {
    flex: 1;
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

.game-canvas {
    display: block;
    background: #111625;
    touch-action: none;
}

.editor-map-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 820px;
    background: #0f1422;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    touch-action: none;
    cursor: grab;
}

.asset-palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    max-height: 160px;
    overflow-y: auto;
}

.asset-palette-item {
    width: 60px;
    height: 74px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
    text-align: center;
    cursor: grab;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: border-color 0.2s, transform 0.15s;
    user-select: none;
}

.asset-palette-item:hover {
    border-color: var(--color-gold);
    transform: translateY(-2px);
}

.asset-palette-item:active {
    cursor: grabbing;
}

.asset-palette-item img {
    max-width: 100%;
    max-height: 42px;
    image-rendering: pixelated;
    pointer-events: none;
}

.game-viewport-container {
    position: relative;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex: 1;
    height: 100%;
}

.game-sidebar {
    background: rgba(13, 18, 30, 0.95);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
}

.player-panel {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.sidebar-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.sidebar-nav-link.active {
    color: var(--color-gold);
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
}

.player-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    background: #111827;
    object-fit: cover;
    flex-shrink: 0;
}

.player-info h3 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    word-break: break-word;
}

.player-info p {
    color: var(--color-gold);
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-bar {
    margin-bottom: 12px;
}

.stat-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-fill.xp { background: var(--color-gold); }
.progress-fill.gold { background: #eab308; }

/* Leaderboard */
.leaderboard-panel {
    padding: 20px;
    flex: 1;
}

.leaderboard-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    gap: 10px;
}

.leaderboard-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.leaderboard-rank.rank-1 { background: #d4af37; color: #000; }
.leaderboard-rank.rank-2 { background: #c0c0c0; color: #000; }
.leaderboard-rank.rank-3 { background: #cd7f32; color: #000; }

.leaderboard-name {
    flex: 1;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-xp {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-gold);
    flex-shrink: 0;
}

/* Quest Puzzle UI Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.quest-modal {
    width: 90%;
    max-width: 900px;
    background: #0f1422;
    border: 2px solid var(--color-gold);
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    max-height: 85vh;
    overflow: hidden;
}

.quest-preview-side {
    background: #060911;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: auto;
}

.quest-preview-canvas {
    flex: 1;
    background: #111625;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    position: relative;
}

.quest-workspace-side {
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

.instruction-palette {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.instruction-btn {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    color: #fff;
}

.instruction-btn:hover {
    background: var(--color-gold);
    color: #000;
}

.solution-workspace {
    flex: 1;
    background: #090c15;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 150px;
}

.workspace-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--color-gold);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.workspace-item button {
    background: transparent;
    border: none;
    color: var(--color-error);
    cursor: pointer;
}

/* Mobile Button Nav styles */
.mobile-button-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(16, 22, 35, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    z-index: 999;
    padding: 8px 0;
    box-sizing: border-box;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    padding: 0 24px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    gap: 4px;
    transition: color 0.2s;
}

.nav-item i { font-size: 1.4rem; }
.nav-item.active, .nav-item:hover { color: var(--color-gold); }

.nav-icon-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.fab-emblem-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -24px;
}

.fab-emblem-btn {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-gold) 0%, #b8941f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    border: 3px solid #0f1422;
    transition: transform 0.2s;
}

.fab-emblem-btn:hover, .fab-emblem-btn.active { transform: scale(1.1); }

.fab-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* RPG Map HUD overlay */
.map-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.12);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    z-index: 10;
}

.map-hud h4 {
    color: #f7d86b;
    font-size: 1rem;
    margin-bottom: 2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    font-weight: 800;
}

.map-hud p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.zone-navigator {
    position: absolute;
    top: 20px;
    right: 20px;
    left: auto;
    bottom: auto;
    transform: none;
    display: flex;
    gap: 8px;
    z-index: 15;
    pointer-events: auto;
}

/* Player Stats HUD - glass style */
.player-stats-hud {
    position: absolute;
    bottom: 14px;
    left: 20px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px 14px;
    z-index: 15;
    pointer-events: none;
    min-width: 120px;
    display: none;
}
.player-stats-hud .stats-hud-level {
    color: var(--color-gold);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.player-stats-hud .stats-hud-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2px;
}
.player-stats-hud .stats-hud-label {
    color: rgba(255, 255, 255, 0.6);
}
.player-stats-hud .stats-hud-value {
    color: #fff;
    font-weight: 600;
}
.player-stats-hud .stats-hud-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    margin-bottom: 5px;
    overflow: hidden;
}
.player-stats-hud .stats-hud-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
}
.player-stats-hud .stats-hud-fill.xp {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.player-stats-hud .stats-hud-fill.gold {
    background: linear-gradient(90deg, #eab308, #fbbf24);
}

/* Mobile Controls HUD */
.mobile-joystick {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: grid;
    grid-template-columns: repeat(3, 50px);
    grid-template-rows: repeat(3, 50px);
    gap: 6px;
    z-index: 5;
}

.joystick-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    user-select: none;
    backdrop-filter: blur(4px);
    transition: background 0.1s;
}

.joystick-btn:active { background: var(--color-gold); color: #000; }
.joystick-btn.empty { visibility: hidden; pointer-events: none; }

@media (max-width: 600px) {
    .mobile-joystick {
        position: fixed;
        bottom: 72px;
        right: 10px;
        grid-template-columns: repeat(3, 36px);
        grid-template-rows: repeat(3, 36px);
        gap: 4px;
    }
    .joystick-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

/* Dashboard Responsive Layouts */
.dashboard-container {
    padding: 24px;
    overflow-y: auto;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-welcome {
    background: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, rgba(16,22,35,0.6) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
    word-break: break-word;
}

.dashboard-logo {
    height: 120px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .dashboard-logo {
        height: 80px;
    }
}

@media (max-width: 400px) {
    .dashboard-logo {
        height: 60px;
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    margin-bottom: 24px;
}

.admin-table-wrapper {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Profile Page Styles */
.profile-hero {
    background: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, rgba(16,22,35,0.6) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    word-break: break-word;
}

.profile-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.profile-stat-icon {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.profile-stat-value {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
}

.profile-stat-label {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
}

.profile-info-label {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-info-value {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-word;
}

/* Mobile Login Screen Styles */
.login-body {
    align-items: center;
    justify-content: center;
    padding: 20px;
    display: flex;
    min-height: 100vh;
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(100%);
    -webkit-backdrop-filter: blur(20px) saturate(100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 180px;
    height: auto;
    margin-bottom: 4px;
}

.login-wrapper .form-group {
    margin-bottom: 24px;
}

.login-wrapper .form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
}

.login-wrapper .input-group {
    position: relative;
}

.login-wrapper .input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #0078D4;
}

.login-wrapper .form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #0078D4;
    border-radius: 12px;
    color: #1a1a2e;
    font-size: 0.95rem;
}

.login-wrapper .form-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.login-wrapper .form-input:focus {
    border-color: #005A9E;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.25);
}

.login-wrapper .btn-game {
    width: 100%;
    padding: 15px;
    background: #0078D4;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.login-wrapper .btn-game:hover {
    background: #005A9E;
}

.login-wrapper .btn-game:active {
    transform: scale(0.98);
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.45);
}

.alert-success i {
    color: #34d399;
}

/* ============================================= */
/*               MAP EDITOR PAGE                 */
/* ============================================= */

.editor-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
}

.editor-tab.active {
    background: linear-gradient(135deg, var(--color-gold) 0%, #b8941f 100%);
    color: #0b111e;
    border-color: transparent;
}

/* System-wide form styles (not login) */
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gold);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: #ffffff;
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-input:focus {
    border-color: var(--color-gold);
    outline: none;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gold);
}

.btn-game {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--color-gold) 0%, #b8941f 100%);
    color: #0b111e;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-game:hover {
    background: linear-gradient(135deg, #ffe08a 0%, #f3cf5a 50%, #d4af37 100%);
}

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

.editor-tab-panel select.form-input {
    padding-left: 14px;
}

/* ============================================= */
/*             RESPONSIVE BREAKPOINTS            */
/* ============================================= */

@media (max-width: 1024px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .game-header {
        display: flex !important;
        padding: 8px 12px;
        height: 54px;
    }
    
    .game-layout {
        height: calc(100vh - 54px - 65px);
    }

    .main-content {
        height: 100%;
        min-height: 0;
    }
    
    .page-scroll-layout {
        height: calc(100vh - 54px - 65px);
        padding-bottom: 20px;
    }

    .game-viewport-container {
        padding-bottom: 0;
        justify-content: center;
        align-items: center;
        height: 100%;
        min-height: 0;
    }

    .game-canvas {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .zone-navigator {
        top: 12px;
        right: 12px;
    }

    .mobile-button-nav {
        display: block;
    }

    .player-stats-hud {
        display: block;
        position: fixed;
        bottom: 72px;
        left: 12px;
    }

    .game-sidebar {
        display: none;
    }

    .header-nav {
        display: none;
    }



    .header-user span {
        display: none;
    }

    .profile-dropdown {
        position: fixed;
        top: 54px;
        right: 10px;
        min-width: 220px;
    }

    .dashboard-container {
        padding: 16px;
    }

    .dashboard-welcome {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quest-modal {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1.2fr;
        height: 90vh;
        width: 95%;
    }
}

@media (max-width: 400px) {
    .dashboard-container {
        padding: 10px;
    }
}

/* PWA Install Banner */
.install-banner {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 400px;
}

.install-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(16, 22, 35, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.install-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.install-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.install-banner-text strong {
    color: #fff;
    font-size: 0.9rem;
}

.install-banner-text span {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.install-banner-btn {
    background: var(--color-gold);
    color: #0b111e;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.install-banner-btn:hover {
    background: #f3cf5a;
}

.install-banner-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.install-banner-close:hover {
    color: #fff;
}
