/* ============================================
   HOMELESS TOWN DRUNK SIMULATOR
   styles.css - AAA Quality UI
   HappyStoner5420 Games
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&family=Roboto:wght@300;400;500;700&family=Bebas+Neue&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --gold: #c9a84c;
    --gold-light: #f0d080;
    --gold-dark: #8a6820;
    --dark-bg: #0a0a0f;
    --panel-bg: rgba(10, 12, 20, 0.95);
    --panel-border: rgba(201, 168, 76, 0.4);
    --text-primary: #e8e0d0;
    --text-secondary: #a09880;
    --red-danger: #c0392b;
    --red-light: #e74c3c;
    --blue-police: #1a3a6e;
    --green-cash: #27ae60;
    --drunk-color: #e67e22;
    --health-color: #e74c3c;
    --heat-color: #e67e22;
    --shadow-heavy: 0 8px 32px rgba(0,0,0,0.8);
    --shadow-gold: 0 0 20px rgba(201,168,76,0.3);
    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--dark-bg);
    font-family: 'Roboto', sans-serif;
    color: var(--text-primary);
}

/* ============================================
   SCREENS & CONTAINER
   ============================================ */

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

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

.screen.active {
    display: flex;
}

/* ============================================
   MAIN MENU
   ============================================ */

#main-menu {
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(139, 90, 20, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(20, 40, 80, 0.4) 0%, transparent 60%),
        linear-gradient(180deg, #0a0a0f 0%, #1a1020 40%, #0f0a18 100%);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.menu-bg-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(201,168,76,0.02) 2px,
            rgba(201,168,76,0.02) 4px
        );
    pointer-events: none;
}

.menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    z-index: 2;
}

.game-title {
    text-align: center;
    position: relative;
}

.title-main {
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(52px, 8vw, 110px);
    letter-spacing: 12px;
    color: var(--gold);
    text-shadow:
        0 0 30px rgba(201,168,76,0.6),
        0 0 60px rgba(201,168,76,0.3),
        0 4px 8px rgba(0,0,0,0.9),
        3px 3px 0 rgba(0,0,0,0.5);
    line-height: 0.9;
    animation: titlePulse 4s ease-in-out infinite;
}

.title-sub {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(18px, 3vw, 38px);
    font-weight: 600;
    letter-spacing: 6px;
    color: var(--text-primary);
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    margin-top: 6px;
}

.title-tag {
    font-size: clamp(10px, 1.5vw, 14px);
    color: var(--gold-dark);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 12px;
    font-family: 'Oswald', sans-serif;
}

@keyframes titlePulse {
    0%, 100% { text-shadow: 0 0 30px rgba(201,168,76,0.6), 0 0 60px rgba(201,168,76,0.3), 0 4px 8px rgba(0,0,0,0.9), 3px 3px 0 rgba(0,0,0,0.5); }
    50% { text-shadow: 0 0 50px rgba(201,168,76,0.9), 0 0 100px rgba(201,168,76,0.5), 0 4px 8px rgba(0,0,0,0.9), 3px 3px 0 rgba(0,0,0,0.5); }
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 340px;
}

/* ============================================
   BUTTONS
   ============================================ */

.menu-btn {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, rgba(20,20,30,0.95) 0%, rgba(30,28,45,0.95) 100%);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 3px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: var(--transition);
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    white-space: nowrap;
    line-height: 1.4;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,0.15), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    box-shadow: 0 4px 24px rgba(0,0,0,0.6), var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.08);
    transform: translateY(-2px);
}

.menu-btn:active {
    transform: translateY(0);
}

.menu-btn.primary-btn {
    background: linear-gradient(135deg, #8a5e10 0%, #c9a84c 50%, #8a5e10 100%);
    border-color: var(--gold-light);
    color: #1a1005;
    font-size: 20px;
    box-shadow: 0 6px 24px rgba(201,168,76,0.4), 0 2px 8px rgba(0,0,0,0.6);
}

.menu-btn.primary-btn:hover {
    background: linear-gradient(135deg, #a07020 0%, #f0d080 50%, #a07020 100%);
    color: #0a0800;
    box-shadow: 0 8px 32px rgba(201,168,76,0.6), 0 2px 8px rgba(0,0,0,0.6);
}

.menu-btn.danger-btn {
    border-color: rgba(192, 57, 43, 0.5);
    color: #e74c3c;
}

.menu-btn.danger-btn:hover {
    border-color: #e74c3c;
    color: #ff6b5b;
    box-shadow: 0 4px 24px rgba(0,0,0,0.6), 0 0 20px rgba(231,76,60,0.3);
}

.menu-btn.small-btn {
    width: auto;
    min-width: 140px;
    padding: 10px 20px;
    font-size: 14px;
    letter-spacing: 2px;
}

.btn-icon {
    margin-right: 8px;
}

/* ============================================
   OVERLAY PANELS (HTP / CREDITS)
   ============================================ */

#how-to-play, #credits {
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.overlay-panel {
    background: linear-gradient(160deg, #0f111a 0%, #0a0c14 100%);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy), var(--shadow-gold);
    display: flex;
    flex-direction: column;
    gap: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dark) transparent;
    padding-bottom: 80px; /* Extra padding at bottom to prevent button cutoff */
}

.overlay-panel::-webkit-scrollbar { width: 4px; }
.overlay-panel::-webkit-scrollbar-track { background: transparent; }
.overlay-panel::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 2px; }

.panel-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 42px;
    letter-spacing: 8px;
    color: var(--gold);
    text-align: center;
    text-shadow: 0 0 20px rgba(201,168,76,0.4);
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 16px;
}

.htp-content {
    flex: 1;
    overflow-y: visible;
}

.htp-section {
    margin-bottom: 16px;
}

.htp-section h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    letter-spacing: 4px;
    color: var(--gold);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.htp-section p, .htp-section li {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.htp-section ul {
    list-style: none;
    padding-left: 0;
}

.htp-section li {
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.htp-section li::before {
    content: '▸';
    color: var(--gold);
    position: absolute;
    left: 0;
}

.stat-label {
    font-weight: 600;
    color: var(--text-primary);
}

/* CREDITS */
.credits-panel {
    text-align: center;
}

.credits-logo {
    font-size: 48px;
    filter: drop-shadow(0 0 10px rgba(201,168,76,0.5));
}

.credits-studio {
    font-family: 'Bebas Neue', cursive;
    font-size: 28px;
    letter-spacing: 6px;
    color: var(--gold);
}

.credits-tag {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 13px;
    letter-spacing: 2px;
}

.credits-game {
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    color: var(--text-primary);
    margin: 8px 0 24px;
}

.credits-list {
    border-top: 1px solid var(--panel-border);
    border-bottom: 1px solid var(--panel-border);
    padding: 16px 0;
    margin-bottom: 16px;
    text-align: left;
}

.credit-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(201,168,76,0.08);
    font-size: 13px;
}

.credit-role {
    color: var(--text-secondary);
    font-style: italic;
}

.credit-name {
    color: var(--gold-light);
    font-weight: 500;
}

.credits-disclaimer {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.6;
    opacity: 0.7;
}

/* ============================================
   GAME HUD
   ============================================ */

#hud {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(5,5,10,0.98) 0%, rgba(8,8,15,0.95) 100%);
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 24px;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

.hud-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hud-icon {
    font-size: 20px;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.2));
}

.hud-info {
    display: flex;
    flex-direction: column;
    min-width: 80px;
}

.hud-label {
    font-family: 'Oswald', sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.hud-value {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--gold-light);
}

.hud-bar-wrap {
    width: 80px;
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.hud-bar {
    height: 100%;
    width: 100%;
    border-radius: 4px;
    transition: width 0.5s ease, background 0.3s ease;
}

.drunk-bar {
    background: linear-gradient(90deg, #e67e22, #d35400);
    box-shadow: 0 0 8px rgba(230,126,34,0.6);
}

.health-bar {
    background: linear-gradient(90deg, #27ae60, #e74c3c);
    box-shadow: 0 0 8px rgba(231,76,60,0.4);
}

.heat-bar {
    background: linear-gradient(90deg, #f39c12, #c0392b);
    box-shadow: 0 0 8px rgba(192,57,43,0.5);
}

.hud-menu-btn {
    margin-left: auto;
    padding: 8px 20px;
    background: rgba(201,168,76,0.15);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    color: var(--gold);
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
}

.hud-menu-btn:hover {
    background: rgba(201,168,76,0.25);
    border-color: var(--gold);
}

/* ============================================
   SCENE AREA
   ============================================ */

#game-screen {
    flex-direction: column;
    background: #06060a;
}

#scene-area {
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    height: calc(100vh - 60px - 54px - 90px - 110px);
    overflow: hidden;
}

#scene-image-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#scene-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.75) contrast(1.1) saturate(0.9);
    transition: all 0.8s ease;
}

#scene-npc-container {
    position: absolute;
    bottom: 0;
    right: 12%;
    height: 90%;
    display: flex;
    align-items: flex-end;
}

#scene-npc {
    height: 100%;
    max-height: 340px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(-4px 0 12px rgba(0,0,0,0.8));
    transition: all 0.5s ease;
}

#scene-overlay-text {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

#location-name-banner {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 8px 20px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    font-family: 'Bebas Neue', cursive;
    font-size: 22px;
    letter-spacing: 6px;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(201,168,76,0.4);
}

/* ============================================
   INVENTORY BAR
   ============================================ */

#inventory-bar {
    position: absolute;
    bottom: calc(90px + 110px);
    left: 0; right: 0;
    height: 54px;
    background: linear-gradient(180deg, rgba(5,5,10,0.9) 0%, rgba(8,8,15,0.95) 100%);
    border-top: 1px solid var(--panel-border);
    border-bottom: 1px solid rgba(201,168,76,0.15);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    z-index: 50;
}

.inv-title {
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--text-secondary);
    min-width: 80px;
}

#inventory-slots {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
}

#inventory-slots::-webkit-scrollbar { display: none; }

.inv-slot {
    min-width: 40px;
    height: 40px;
    border: 1px solid rgba(201,168,76,0.25);
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    padding: 2px;
}

.inv-slot:hover {
    border-color: var(--gold);
    background: rgba(201,168,76,0.1);
}

.inv-slot svg {
    width: 24px;
    height: 24px;
}

.inv-slot .item-qty {
    position: absolute;
    bottom: 1px;
    right: 3px;
    font-size: 9px;
    color: var(--gold-light);
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
}

/* ============================================
   NARRATIVE BOX
   ============================================ */

#narrative-box {
    position: absolute;
    bottom: 110px;
    left: 0; right: 0;
    height: 90px;
    background: linear-gradient(135deg, rgba(8,9,18,0.98) 0%, rgba(12,10,22,0.98) 100%);
    border-top: 1px solid var(--panel-border);
    border-bottom: 1px solid rgba(201,168,76,0.12);
    display: flex;
    align-items: stretch;
    z-index: 60;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.6);
}

#narrative-portrait-area {
    width: 90px;
    min-width: 90px;
    border-right: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 4px;
    overflow: hidden;
    position: relative;
}

#narrative-portrait {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 2px;
}

#narrative-speaker {
    position: absolute;
    bottom: 4px;
    left: 0; right: 0;
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--gold);
    background: rgba(0,0,0,0.7);
    padding: 2px 0;
}

#narrative-text-area {
    flex: 1;
    padding: 12px 20px;
    display: flex;
    align-items: center;
}

#narrative-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
}

/* ============================================
   ACTION PANEL
   ============================================ */

#action-panel {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 110px;
    background: linear-gradient(180deg, rgba(6,6,12,0.97) 0%, rgba(4,4,8,0.99) 100%);
    border-top: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 60;
}

#action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.action-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(18,18,28,0.95) 0%, rgba(24,22,38,0.95) 100%);
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,0.1), transparent);
    transition: left 0.4s ease;
}

.action-btn:hover::before { left: 100%; }

.action-btn:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 12px rgba(201,168,76,0.15);
}

.action-btn:active { transform: translateY(0); }

.action-btn.travel-btn {
    border-color: rgba(41,128,185,0.4);
    color: #5dade2;
}

.action-btn.travel-btn:hover {
    border-color: #5dade2;
    color: #aed6f1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 12px rgba(52,152,219,0.2);
}

.action-btn.drink-btn {
    border-color: rgba(230,126,34,0.4);
    color: #e67e22;
}

.action-btn.drink-btn:hover {
    border-color: #e67e22;
    color: #f0a060;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 12px rgba(230,126,34,0.25);
}

.action-btn.sleep-btn {
    border-color: rgba(127,140,141,0.4);
    color: #95a5a6;
}

.action-btn.panhandle-btn {
    border-color: rgba(39,174,96,0.4);
    color: #27ae60;
}

.action-btn.panhandle-btn:hover {
    border-color: #2ecc71;
    color: #58d68d;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 12px rgba(39,174,96,0.2);
}

.action-btn.shop-btn {
    border-color: rgba(155,89,182,0.4);
    color: #9b59b6;
}

.action-btn.shop-btn:hover {
    border-color: #a855f7;
    color: #c084fc;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 12px rgba(155,89,182,0.2);
}

.action-btn.danger-action {
    border-color: rgba(192,57,43,0.4);
    color: #c0392b;
}

.action-btn.danger-action:hover {
    border-color: #e74c3c;
    color: #ff6b5b;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 12px rgba(231,76,60,0.25);
}

/* ============================================
   WORLD MAP
   ============================================ */

#world-map {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(6px);
}

.map-overlay {
    background: linear-gradient(160deg, #0d0f1a 0%, #080a12 100%);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 32px;
    max-width: 680px;
    width: 90%;
    box-shadow: var(--shadow-heavy), var(--shadow-gold);
}

.map-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 32px;
    letter-spacing: 8px;
    color: var(--gold);
    text-align: center;
    margin-bottom: 24px;
    text-shadow: 0 0 15px rgba(201,168,76,0.4);
}

.map-locations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.map-loc-btn {
    padding: 16px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(201,168,76,0.25);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.map-loc-btn:hover {
    background: rgba(201,168,76,0.1);
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 15px rgba(201,168,76,0.15);
}

.map-loc-icon {
    font-size: 28px;
}

.map-loc-name {
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

/* ============================================
   SHOP MODAL
   ============================================ */

#shop-modal {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 200;
}

.shop-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-panel {
    background: linear-gradient(160deg, #0d0f1a 0%, #080a12 100%);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 28px;
    max-width: 700px;
    width: 92%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy), var(--shadow-gold);
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dark) transparent;
}

.shop-panel::-webkit-scrollbar { width: 4px; }
.shop-panel::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 2px; }

.shop-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 30px;
    letter-spacing: 6px;
    color: var(--gold);
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 12px;
}

.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.shop-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: 6px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.shop-item:hover {
    background: rgba(201,168,76,0.08);
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 12px rgba(201,168,76,0.12);
}

.shop-item svg {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.shop-item-name {
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.shop-item-desc {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.shop-item-price {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--gold-light);
}

.shop-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--panel-border);
    padding-top: 16px;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    color: var(--text-secondary);
}

#shop-cash-display {
    color: var(--gold-light);
}

/* ============================================
   POLICE OVERLAY
   ============================================ */

#police-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 300;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.police-scene {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 20px;
    position: relative;
}

#police-img {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    height: 55%;
    max-height: 400px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0,100,255,0.4));
    animation: policeFlash 0.8s ease-in-out infinite alternate;
}

@keyframes policeFlash {
    0% { filter: drop-shadow(0 0 20px rgba(0,100,255,0.4)); }
    100% { filter: drop-shadow(0 0 30px rgba(255,0,0,0.5)); }
}

.police-text-box {
    background: linear-gradient(135deg, rgba(8,12,30,0.98) 0%, rgba(10,8,20,0.98) 100%);
    border: 1px solid rgba(0,100,255,0.4);
    border-radius: 6px;
    padding: 16px 24px;
    max-width: 600px;
    width: 90%;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 16px;
    box-shadow: 0 0 30px rgba(0,100,255,0.2);
    text-align: center;
}

.police-choices {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   JAIL SCENE
   ============================================ */

#jail-scene {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jail-overlay {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.jail-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.4) saturate(0.6);
}

.jail-guard {
    position: absolute;
    bottom: 0;
    right: 10%;
    height: 70%;
    max-height: 450px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(-4px 0 16px rgba(0,0,0,0.9));
}

.jail-text-box {
    position: relative;
    z-index: 10;
    background: linear-gradient(135deg, rgba(8,6,20,0.97) 0%, rgba(12,8,24,0.97) 100%);
    border: 1px solid rgba(192,57,43,0.5);
    border-radius: 8px;
    padding: 32px 40px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 40px rgba(192,57,43,0.3), var(--shadow-heavy);
}

#jail-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 52px;
    letter-spacing: 10px;
    color: var(--red-light);
    text-shadow: 0 0 20px rgba(231,76,60,0.6);
    margin-bottom: 12px;
}

#jail-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ============================================
   PANHANDLE MODAL
   ============================================ */

#panhandle-modal {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 200;
}

.panhandle-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.panhandle-panel {
    background: linear-gradient(160deg, #0d0f1a 0%, #080a12 100%);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 28px;
    max-width: 500px;
    width: 92%;
    box-shadow: var(--shadow-heavy), var(--shadow-gold);
    text-align: center;
}

#panhandle-npc-area {
    margin: 16px 0;
    min-height: 180px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

#panhandle-npc-area img {
    max-height: 180px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.7));
}

.panhandle-result {
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    border: 1px solid rgba(201,168,76,0.15);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 12px 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#panhandle-choices {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 12px;
}

/* ============================================
   NOTIFICATION / TOAST
   ============================================ */

#notification-container {
    position: fixed;
    top: 70px;
    right: 16px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notification {
    background: linear-gradient(135deg, rgba(10,12,24,0.97) 0%, rgba(15,12,28,0.97) 100%);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    padding: 10px 16px;
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--text-primary);
    box-shadow: var(--shadow-heavy);
    animation: notifSlide 0.3s ease-out;
    max-width: 280px;
}

.notification.success { border-left: 3px solid #27ae60; color: #58d68d; }
.notification.warning { border-left: 3px solid #e67e22; color: #f0a040; }
.notification.danger { border-left: 3px solid #e74c3c; color: #ff6b5b; }
.notification.info { border-left: 3px solid #3498db; color: #7fb3d3; }

@keyframes notifSlide {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   DRUNK SCREEN EFFECT
   ============================================ */

.drunk-effect {
    animation: drunkSway 3s ease-in-out infinite;
}

@keyframes drunkSway {
    0%, 100% { transform: rotate(-0.5deg) translateX(-2px); }
    50% { transform: rotate(0.5deg) translateX(2px); }
}

.very-drunk-effect {
    animation: veryDrunkSway 2s ease-in-out infinite;
    filter: hue-rotate(10deg) saturate(1.2);
}

@keyframes veryDrunkSway {
    0%, 100% { transform: rotate(-2deg) translateX(-4px) translateY(2px); }
    50% { transform: rotate(2deg) translateX(4px) translateY(-2px); }
}

/* ============================================
   HIGH SCREEN EFFECT (DELTA 8)
   ============================================ */

.high-effect {
    animation: highFloat 4s ease-in-out infinite;
    filter: saturate(1.4) brightness(1.1);
}

@keyframes highFloat {
    0%, 100% { transform: translateY(-3px) scale(1.01); }
    50% { transform: translateY(3px) scale(0.99); }
}

.very-high-effect {
    animation: veryHighFloat 3s ease-in-out infinite, colorShift 8s linear infinite;
    filter: saturate(1.6) brightness(1.15) contrast(1.1);
}

@keyframes veryHighFloat {
    0%, 100% { transform: translateY(-5px) scale(1.02) rotate(-0.3deg); }
    50% { transform: translateY(5px) scale(0.98) rotate(0.3deg); }
}

@keyframes colorShift {
    0% { filter: hue-rotate(0deg) saturate(1.6) brightness(1.15); }
    25% { filter: hue-rotate(5deg) saturate(1.7) brightness(1.2); }
    50% { filter: hue-rotate(0deg) saturate(1.6) brightness(1.15); }
    75% { filter: hue-rotate(-5deg) saturate(1.7) brightness(1.2); }
    100% { filter: hue-rotate(0deg) saturate(1.6) brightness(1.15); }
}

/* ============================================
   HIGH BAR STYLES
   ============================================ */

.high-bar {
    background: linear-gradient(90deg, #2a9a40, #40d050) !important;
    box-shadow: 0 0 8px rgba(64, 208, 80, 0.6);
}


/* ============================================
   SCENE TRANSITIONS
   ============================================ */

.scene-fade-in {
    animation: sceneFadeIn 0.6s ease-out;
}

@keyframes sceneFadeIn {
    from { opacity: 0; transform: scale(1.03); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 600px) {
    .hud-stat { gap: 6px; }
    .hud-info { min-width: 60px; }
    .hud-bar-wrap { width: 55px; }
    .title-main { font-size: 42px; }
    #action-buttons { gap: 6px; }
    .action-btn { padding: 8px 12px; font-size: 11px; }
    .map-locations { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
    #hud { gap: 8px; }
    .hud-stat:nth-child(5) { display: none; }
}

/* ============================================
   SCROLLBAR GLOBAL
   ============================================ */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dark) transparent;
}

*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 2px; }

/* ============================================
   UTILITY
   ============================================ */

.text-gold { color: var(--gold-light); }
.text-danger { color: var(--red-light); }
.text-success { color: #58d68d; }
.text-warning { color: #f0a040; }
.text-muted { color: var(--text-secondary); }

.hidden { display: none !important; }

.glow-red { box-shadow: 0 0 20px rgba(231,76,60,0.5); border-color: rgba(231,76,60,0.6) !important; }
.glow-blue { box-shadow: 0 0 20px rgba(52,152,219,0.5); border-color: rgba(52,152,219,0.6) !important; }
.glow-gold { box-shadow: 0 0 20px rgba(201,168,76,0.5); border-color: var(--gold) !important; }
