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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #020617;
    color: #f8fafc;
}

.hidden {
    display: none !important;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Minimalist Crosshair */
.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 8;
}

.ch-dot {
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.6);
    border-radius: 50%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

/* Minimalist Glassmorphism Card */
.glow-card {
    background: rgba(10, 15, 26, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    pointer-events: auto;
}

/* GTA V Style Top Bar */
.hud-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    position: relative;
    pointer-events: none;
}

.hud-brand {
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    white-space: nowrap;
    flex-shrink: 0;
    pointer-events: auto;
}

.brand-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #e2e8f0;
}

.brand-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: #38bdf8;
    letter-spacing: 1px;
    white-space: nowrap;
}

.hud-watch-card {
    padding: 6px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: fit-content;
    min-width: auto;
    max-width: fit-content;
    white-space: nowrap;
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.watch-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.watch-icon {
    font-size: 0.85rem;
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.6));
}

.watch-title {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #cbd5e1;
}

.watch-title b {
    color: #38bdf8;
    font-weight: 900;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.watch-stage-badge {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 8px;
    text-transform: uppercase;
}

.watch-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.watch-obj-snippet {
    font-size: 0.68rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 210px;
}

.watch-eq-snippet {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}


.hud-top-right {
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
}

.res-bar {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #cbd5e1;
}

.rt b { color: #38bdf8; }

.menu-btn-row {
    display: flex;
    gap: 6px;
}

.btn-min {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-min:hover {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
}

.btn-danger-min {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.btn-danger-min:hover {
    background: #dc2626;
    color: #fff;
}

/* GTA V Style Bottom Navigation Dock & HUD Stack */
.hud-bottom-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
    position: relative;
    gap: 16px;
}

.hud-bottom-left {
    display: flex;
    align-items: flex-end;
    pointer-events: auto;
    z-index: 12;
}

.radar-wrap {
    padding: 6px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#radarCanvas {
    border-radius: 50%;
    border: 1px solid rgba(56, 189, 248, 0.4);
    background: rgba(2, 6, 23, 0.95);
    display: block;
}

.hud-bottom-right-vitals {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 175px;
    pointer-events: auto;
    z-index: 12;
}

.v-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vl {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #94a3b8;
    width: 50px;
}

.v-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.v-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.h-fill { background: #ef4444; }
.u-fill { background: #f97316; }
.s-fill { background: #10b981; }
.w-fill { background: #06b6d4; }

.vn {
    font-size: 0.65rem;
    font-weight: 800;
    color: #e2e8f0;
    width: 30px;
    text-align: right;
}

/* Streamer Live Activity Chat Feed (Bottom Left Log) */
#streamer-feed {
    position: absolute;
    bottom: 165px;
    left: 20px;
    width: 310px;
    max-height: 220px;
    display: flex;
    flex-direction: column-reverse;
    gap: 6px;
    pointer-events: none;
    z-index: 95;
    overflow: hidden;
}

.stream-chat-msg {
    background: rgba(10, 15, 26, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid #38bdf8;
    border-radius: 8px;
    padding: 7px 11px;
    color: #f1f5f9;
    font-size: 11.5px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    line-height: 1.35;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    animation: streamSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes streamSlideIn {
    0% { opacity: 0; transform: translateX(-25px) scale(0.95); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

.stream-badge {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Contextual Action Prompt */
.action-prompt {
    position: absolute;
    bottom: 135px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 15, 26, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    pointer-events: auto;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 25;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.action-prompt.hidden { opacity: 0; pointer-events: none; transform: translate(-50%, 10px); }

.key-badge {
    background: #38bdf8;
    color: #0f172a;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* Sleek Downed & Recovery Countdown Banner (Positioned Comfortably Above Hotbar) */
.gta-death-banner {
    position: absolute;
    bottom: 145px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(239, 68, 68, 0.45);
    border-radius: 12px;
    padding: 8px 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 100;
    pointer-events: auto;
    text-align: center;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 0.3s ease;
}

.gta-death-banner.hidden {
    display: none !important;
}

.gta-death-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.gta-death-skull {
    font-size: 1.5rem;
}

.gta-death-text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.gta-death-title {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1.8px;
    color: #f87171;
    text-transform: uppercase;
}

.gta-death-subtext {
    font-size: 0.74rem;
    color: #94a3b8;
    font-weight: 600;
}

.gta-death-timer {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: monospace;
    color: #f59e0b;
    background: rgba(2, 6, 23, 0.75);
    padding: 3px 10px;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    letter-spacing: 1px;
}

/* Bottom Center Hotbar */
.craft-bar {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    display: flex;
    gap: 6px;
    padding: 6px 12px;
    pointer-events: auto;
    z-index: 12;
}

.craft-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 68px;
}

.craft-item:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
}

.craft-icon { font-size: 1.1rem; }
.craft-name { font-size: 0.68rem; font-weight: 700; color: #e2e8f0; margin-top: 2px; }
.craft-cost { font-size: 0.58rem; color: #94a3b8; margin-top: 1px; }

.craft-item.equipped {
    border: 1.5px solid #38bdf8 !important;
    background: rgba(56, 189, 248, 0.2) !important;
}

/* Modals Overlay */
.overlay-screen {
    position: absolute; top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: flex; justify-content: center; align-items: center;
}
.overlay-screen.hidden { display: none; }

.modal-box {
    width: 620px;
    max-width: 92vw;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-box h2 {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #38bdf8;
}

.inv-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 8px;
}

.btn-close { background: none; border: none; color: #94a3b8; font-size: 1.2rem; cursor: pointer; }
.btn-close:hover { color: #ef4444; }

.inv-body { display: flex; flex-direction: column; gap: 14px; max-height: 65vh; overflow-y: auto; }
.inv-section h3 { font-size: 0.72rem; font-weight: 800; letter-spacing: 1.5px; color: #94a3b8; margin-bottom: 6px; }

.inv-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.inv-slot {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px; padding: 8px 12px;
    display: flex; align-items: center; gap: 8px; min-width: 110px;
}

.slot-icon { font-size: 1.2rem; }
.slot-name { font-size: 0.75rem; font-weight: 600; color: #cbd5e1; }
.slot-qty { font-size: 0.88rem; color: #38bdf8; margin-left: 4px; }

.btn-use-min {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.15s ease;
}
.btn-use-min:hover {
    background: rgba(34, 197, 94, 0.5);
    color: #ffffff;
}

.craft-recipe-grid { display: flex; flex-direction: column; gap: 8px; }
.recipe-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px; padding: 10px 14px;
    display: flex; align-items: center; gap: 12px;
}

.rec-icon { font-size: 1.5rem; }
.rec-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rec-name { font-size: 0.88rem; font-weight: 700; color: #f8fafc; }
.rec-desc { font-size: 0.72rem; color: #94a3b8; }
.rec-req { font-size: 0.7rem; color: #f59e0b; font-weight: 600; }

.btn-craft {
    background: #0284c7; color: #fff; border: none;
    padding: 6px 14px; font-weight: 700; font-size: 0.75rem; border-radius: 6px;
    cursor: pointer; transition: all 0.15s ease;
}
.btn-craft:hover { background: #0369a1; }

.options-body { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; width: 300px; }
.opt-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 600; }
.opt-row select { background: #0f172a; color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); padding: 4px 8px; border-radius: 6px; }
.btn-opt-action { background: rgba(56, 189, 248, 0.15); border: 1px solid #38bdf8; color: #fff; padding: 4px 10px; border-radius: 6px; font-weight: 700; cursor: pointer; }

/* End Screen Modals */
.end-box { width: 480px; max-width: 90vw; padding: 28px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.end-title { font-size: 1.8rem; font-weight: 900; letter-spacing: 2px; }
.defeat-title { color: #ef4444; }
.victory-title { color: #f59e0b; }
.end-subtitle { font-size: 0.88rem; color: #cbd5e1; margin-top: 4px; margin-bottom: 18px; }

.stats-dashboard { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-bottom: 20px; }
.stat-tile { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); padding: 10px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.st-label { font-size: 0.62rem; font-weight: 800; letter-spacing: 1px; color: #94a3b8; }
.st-val { font-size: 1.2rem; font-weight: 800; color: #38bdf8; }

.btn-primary { background: #0284c7; color: #fff; border: none; padding: 10px 24px; font-size: 0.88rem; font-weight: 800; border-radius: 8px; cursor: pointer; }
.btn-primary:hover { background: #0369a1; }
.btn-retry { background: #dc2626; }
.btn-retry:hover { background: #b91c1c; }
.btn-row { display: flex; gap: 10px; }
.btn-secondary { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.15); color: #fff; padding: 10px 18px; font-size: 0.82rem; font-weight: 700; border-radius: 8px; cursor: pointer; }

/* Help Modal Grid */
.help-grid { display: flex; gap: 16px; margin: 12px 0; text-align: left; }
.help-col { flex: 1; display: flex; flex-direction: column; gap: 8px; background: rgba(255, 255, 255, 0.03); padding: 14px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.08); }
.help-col h3 { font-size: 0.78rem; color: #38bdf8; font-weight: 800; letter-spacing: 1px; }
.help-col p { font-size: 0.78rem; color: #cbd5e1; }

.vignette { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 5; box-shadow: inset 0 0 100px rgba(239, 68, 68, 0); transition: box-shadow 0.4s ease; }
.vignette.danger { box-shadow: inset 0 0 120px rgba(239, 68, 68, 0.6); }

/* GTA 5 Style Smartphone UI (Compact Floating Above Vitals Stack) */
.phone-container {
    position: fixed;
    bottom: 145px;
    right: 20px;
    width: 235px;
    height: 380px;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    display: flex;
}
.phone-container.hidden {
    transform: translateY(440px);
    opacity: 0;
    pointer-events: none;
    display: none;
}
.phone-frame {
    width: 100%;
    height: 100%;
    background: rgba(9, 13, 22, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.75), 0 0 18px rgba(56, 189, 248, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 5px;
}
.phone-header {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 18px 18px 0 0;
    padding: 4px 8px 3px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.phone-notch {
    width: 50px;
    height: 8px;
    background: #020617;
    border-radius: 5px;
    margin-bottom: 2px;
}
.phone-top-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.54rem;
    font-weight: 700;
    color: #94a3b8;
}
.phone-salam { color: #38bdf8; font-size: 0.54rem; }
.phone-screen {
    flex: 1;
    background: rgba(3, 7, 18, 0.8);
    border-radius: 0 0 18px 18px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}
.phone-screen::-webkit-scrollbar {
    width: 3px;
}
.phone-screen::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 3px;
}
.phone-app-header {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #f59e0b;
    text-align: center;
    background: rgba(245, 158, 11, 0.12);
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.phone-players-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.phone-player-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    padding: 3px 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.phone-player-card.p-you {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.12);
}
.p-avatar { font-size: 0.88rem; }
.p-details { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.p-name { font-size: 0.58rem; font-weight: 800; color: #f8fafc; display: flex; justify-content: space-between; align-items: center; }
.p-tag { font-size: 0.48rem; font-weight: 800; padding: 1px 3px; border-radius: 3px; }
.tag-active { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.tag-downed { background: rgba(239, 68, 68, 0.25); color: #f87171; }
.p-hp-bar { height: 3px; background: rgba(255, 255, 255, 0.12); border-radius: 2px; overflow: hidden; margin-top: 1px; }
.p-hp-fill { height: 100%; background: #22c55e; transition: width 0.3s ease; }
.p-sub { font-size: 0.5rem; color: #94a3b8; font-weight: 600; }
.btn-phone-action {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid #38bdf8;
    color: #38bdf8;
    font-size: 0.5rem;
    font-weight: 800;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
}
.btn-phone-action:hover { background: #38bdf8; color: #000; }
.phone-apps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
}
.phone-app-btn {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 0.52rem;
    font-weight: 700;
    padding: 4px 2px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}
.phone-app-btn:hover { background: rgba(56, 189, 248, 0.2); color: #fff; border-color: #38bdf8; }
.phone-info-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    padding: 3px 5px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 0.52rem;
}
.info-row { display: flex; justify-content: space-between; color: #cbd5e1; font-weight: 600; }
.btn-phone-close {
    width: 100%;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(185, 28, 28, 0.4) 100%);
    border: 1px solid #ef4444;
    color: #f8fafc;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: auto;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-phone-close:hover {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

/* Phone Screen Views Layout & Page Isolation */
.phone-home-view,
.phone-app-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
    height: 100%;
}

.phone-lock-screen.hidden,
.phone-home-view.hidden,
.phone-app-view.hidden {
    display: none !important;
}

/* Phone Lock Screen */
.phone-lock-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 10px 6px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(2, 6, 23, 0.95) 100%);
    border-radius: 0 0 18px 18px;
}
.lock-clock-box { text-align: center; margin-top: 5px; }
.lock-time { font-size: 2.2rem; font-weight: 800; color: #f8fafc; letter-spacing: -1px; line-height: 1; }
.lock-date { font-size: 0.58rem; color: #38bdf8; font-weight: 700; margin-top: 2px; }
.lock-notifications { width: 100%; display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.lock-notif-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 0.52rem;
    color: #e2e8f0;
}
.btn-unlock-phone {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid #38bdf8;
    color: #38bdf8;
    width: 100%;
    padding: 6px;
    font-size: 0.58rem;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.5px;
}
.btn-unlock-phone:hover { background: #38bdf8; color: #000; }

/* Phone Home & Apps Screen */
.phone-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.56rem;
    font-weight: 800;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.9);
    padding: 3px 6px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-phone-back {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #38bdf8;
    font-size: 0.52rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    cursor: pointer;
}
.phone-home-apps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px 0;
}
.phone-app-tile {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}
.phone-app-tile:hover {
    transform: translateY(-2px);
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
}
.app-tile-icon { font-size: 1.2rem; }
.app-tile-name { font-size: 0.54rem; font-weight: 800; color: #f8fafc; }

/* X/O Tic-Tac-Toe Game App Styles */
.xo-mode-select { width: 100%; margin-bottom: 2px; }
.xo-mode-select select {
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-size: 0.52rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 5px;
    outline: none;
}

.xo-status-bar {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 2px 4px;
    text-align: center;
    font-size: 0.54rem;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.xo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.xo-cell {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    height: 48px;
}

.xo-cell:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
}

.xo-cell.x-mark {
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.xo-cell.o-mark {
    color: #22c55e;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.xo-score-card {
    display: flex;
    justify-content: space-around;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    padding: 2px 4px;
    font-size: 0.5rem;
    font-weight: 700;
    margin-top: 2px;
}
.xo-score-item { display: flex; gap: 3px; color: #cbd5e1; }

/* Binome Messenger Chat App Styles */
.chat-recipient-select { width: 100%; margin-bottom: 3px; }
.chat-recipient-select select {
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-size: 0.52rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 5px;
    outline: none;
}

.chat-feed-box {
    flex: 1;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    max-height: 200px;
    min-height: 160px;
}

.chat-feed-box::-webkit-scrollbar { width: 3px; }
.chat-feed-box::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 3px;
}

.chat-bubble {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    padding: 4px 7px;
    border-radius: 8px;
    font-size: 0.52rem;
    line-height: 1.35;
    word-break: break-word;
}

.chat-bubble.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.8) 0%, rgba(3, 105, 161, 0.9) 100%);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.chat-bubble.received {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-bottom-left-radius: 2px;
}

.chat-sender-name {
    font-size: 0.48rem;
    font-weight: 800;
    margin-bottom: 1px;
    display: flex;
    justify-content: space-between;
    gap: 6px;
}
.chat-bubble.sent .chat-sender-name { color: #bae6fd; }
.chat-bubble.received .chat-sender-name { color: #38bdf8; }

.chat-time {
    font-size: 0.44rem;
    opacity: 0.7;
    font-weight: 600;
}

.chat-input-bar {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    width: 100%;
}

#phone-chat-input {
    flex: 1;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #f8fafc;
    font-size: 0.54rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    outline: none;
}

#phone-chat-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.btn-chat-send {
    background: rgba(34, 197, 94, 0.25);
    border: 1px solid #22c55e;
    color: #4ade80;
    font-size: 0.52rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-chat-send:hover {
    background: #22c55e;
    color: #000000;
}

/* Full Island Map Modal Overlay */
.full-map-box {
    width: 920px;
    max-width: 94vw;
    height: 85vh;
    max-height: 650px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(8, 14, 26, 0.95);
    border: 2px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.25);
    border-radius: 16px;
    overflow: hidden;
    box-sizing: border-box;
}
#fullMapCanvas {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.5);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
    background: #020813;
    cursor: grab;
    display: block;
}
#fullMapCanvas:active {
    cursor: grabbing;
}
