/* ============================================
   LIQUOR STORE INSANITY SIMULATOR - STYLES
   AAA Quality CSS - 2026 Edition
   ============================================ */

@import url('data:text/css,');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --neon-green: #39ff14;
    --neon-pink: #ff1493;
    --neon-blue: #00d4ff;
    --neon-orange: #ff6600;
    --dark-bg: #0a0a0f;
    --panel-bg: rgba(15, 15, 25, 0.92);
    --card-bg: rgba(25, 25, 40, 0.9);
    --gold: #ffd700;
    --danger: #ff3333;
    --success: #33ff33;
    --text-primary: #e8e8f0;
    --text-secondary: #8888aa;
    --glass-border: rgba(255,255,255,0.08);
}

body {
    background: var(--dark-bg);
    color: var(--text-primary);
    font-family: 'Bahnschrift', 'Trebuchet MS', 'Segoe UI', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    user-select: none;
    -webkit-user-select: none;
}

#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;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   MAIN MENU
   ========================================== */

#main-menu {
    background: linear-gradient(135deg, #0a0010 0%, #1a0030 30%, #0d001a 60%, #0a0a1a 100%);
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

#main-menu::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255,20,147,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(57,255,20,0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(0,212,255,0.06) 0%, transparent 50%);
    animation: menuBgRotate 30s linear infinite;
}

@keyframes menuBgRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.menu-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.menu-title-wrapper {
    margin-bottom: 3rem;
}

.menu-title {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    background: linear-gradient(180deg, #fff 0%, #ffd700 50%, #ff6600 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(255,165,0,0.4));
    line-height: 1.1;
}

.menu-subtitle {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.5em;
    color: var(--neon-pink);
    text-shadow: 0 0 20px rgba(255,20,147,0.6), 0 0 40px rgba(255,20,147,0.3);
    margin-top: 0.5rem;
    animation: subtitlePulse 2s ease-in-out infinite;
}

@keyframes subtitlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.menu-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-style: italic;
    letter-spacing: 0.1em;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.menu-btn {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 280px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.menu-btn:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0,212,255,0.2), inset 0 0 20px rgba(0,212,255,0.05);
    transform: translateY(-2px);
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.exit-btn:hover {
    border-color: var(--danger);
    box-shadow: 0 0 20px rgba(255,51,51,0.2), inset 0 0 20px rgba(255,51,51,0.05);
}

.btn-icon {
    margin-right: 0.5rem;
}

.menu-footer {
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
}

/* ==========================================
   HOW TO PLAY
   ========================================== */

#how-to-screen {
    background: linear-gradient(135deg, #0a0010 0%, #1a0030 50%, #0a0a1a 100%);
    flex-direction: column;
}

.how-to-content {
    max-width: 800px;
    padding: 2rem;
    text-align: center;
}

.how-to-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--gold);
}

.instructions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.instruction-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
    backdrop-filter: blur(10px);
}

.instruction-card h3 {
    color: var(--neon-green);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.instruction-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================
   GAME SCREEN
   ========================================== */

#game-screen {
    background: #0a0a0f;
}

#game-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

/* ==========================================
   HUD
   ========================================== */

#hud {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 80%, transparent 100%);
    z-index: 10;
}

.hud-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hud-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
    font-weight: 600;
}

.hud-value {
    font-size: 1.3rem;
    font-weight: 700;
}

#hud-cash .hud-value {
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(57,255,20,0.4);
}

#hud-day .hud-value {
    color: var(--neon-blue);
}

.rep-bar, .chaos-bar {
    width: 120px;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.rep-fill {
    height: 100%;
    width: 75%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-green));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.chaos-fill {
    height: 100%;
    width: 10%;
    background: linear-gradient(90deg, var(--neon-orange), var(--danger));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ==========================================
   ACTION PANEL
   ========================================== */

#action-panel {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, calc(100vw - 270px));
    background:
        linear-gradient(180deg, rgba(38, 23, 18, 0.95) 0%, rgba(18, 15, 20, 0.94) 100%);
    border: 1px solid rgba(255, 210, 148, 0.18);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    padding: 1.1rem 1.2rem 1.2rem;
    z-index: 10;
    backdrop-filter: blur(24px);
    box-shadow: 0 -12px 32px rgba(0,0,0,0.35);
    animation: panelSlideUp 0.4s ease;
}

@keyframes panelSlideUp {
    from { transform: translateX(-50%) translateY(100%); }
    to { transform: translateX(-50%) translateY(0); }
}

#customer-info {
    display: flex;
    gap: 1.1rem;
    margin-bottom: 1rem;
    align-items: stretch;
}

.portrait-column {
    width: 116px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

#customer-portrait {
    width: 116px;
    height: 138px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(18,18,22,0.95), rgba(28,20,15,0.95));
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 10px 20px rgba(0,0,0,0.25);
}

#customer-vibe {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-align: center;
    color: #ffd5aa;
    background: rgba(255,255,255,0.05);
    border-radius: 999px;
    padding: 0.4rem 0.55rem;
}

#customer-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.customer-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

#customer-details h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0;
}

#customer-details p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

#customer-tag {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ffd8a5;
    background: rgba(255, 183, 115, 0.1);
    border: 1px solid rgba(255, 183, 115, 0.25);
    border-radius: 999px;
    padding: 0.28rem 0.55rem;
    white-space: nowrap;
}

#customer-state {
    font-weight: 600;
}

.customer-meters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.customer-meter {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.meter-label {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    color: #b7b2c4;
}

.meter-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.meter-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7ffff6, #4cff71);
    transition: width 0.3s ease;
}

.chaos-track .chaos-meter {
    background: linear-gradient(90deg, #ffca5f, #ff5858);
}

.detail-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

#customer-total {
    color: var(--neon-green) !important;
    font-weight: 700;
    font-size: 1rem !important;
    white-space: nowrap;
}

#customer-flavor {
    min-height: 2.4em;
}

#action-buttons {
    display: flex;
    gap: 0.8rem;
}

.action-btn {
    flex: 1;
    padding: 0.9rem 0.8rem;
    border: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.action-hotkey {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    opacity: 0.85;
}

.sell-btn {
    background: linear-gradient(135deg, #1a8a1a, #0d6b0d);
    color: white;
    box-shadow: 0 4px 15px rgba(26,138,26,0.3);
}

.sell-btn:hover {
    background: linear-gradient(135deg, #22aa22, #15851a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,138,26,0.5);
}

.refuse-btn {
    background: linear-gradient(135deg, #cc6600, #994d00);
    color: white;
    box-shadow: 0 4px 15px rgba(204,102,0,0.3);
}

.refuse-btn:hover {
    background: linear-gradient(135deg, #dd7711, #aa5500);
    transform: translateY(-2px);
}

.cops-btn {
    background: linear-gradient(135deg, #cc0000, #880000);
    color: white;
    box-shadow: 0 4px 15px rgba(204,0,0,0.3);
}

.cops-btn:hover {
    background: linear-gradient(135deg, #ee1111, #aa0000);
    transform: translateY(-2px);
}

/* ==========================================
   INVENTORY PANEL
   ========================================== */

#inventory-panel {
    position: absolute;
    right: 0; top: 60px; bottom: 0;
    width: 220px;
    background: linear-gradient(180deg, var(--panel-bg), rgba(10,10,20,0.95));
    border-left: 1px solid var(--glass-border);
    padding: 1rem;
    z-index: 10;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    backdrop-filter: blur(20px);
}

.inv-title {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    text-align: center;
}

#inventory-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.inv-item {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
}

.inv-item.low-stock {
    border-color: var(--danger);
    animation: lowStockPulse 1.5s ease-in-out infinite;
}

@keyframes lowStockPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(255,51,51,0); }
    50% { box-shadow: 0 0 10px rgba(255,51,51,0.3); }
}

.inv-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.inv-info {
    flex: 1;
    min-width: 0;
}

.inv-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inv-count {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.restock-btn {
    width: 100%;
    padding: 0.7rem;
    background: linear-gradient(135deg, #1a3a8a, #0d2060);
    color: white;
    border: 1px solid rgba(0,100,255,0.3);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
}

.restock-btn:hover {
    background: linear-gradient(135deg, #2255aa, #153080);
    transform: translateY(-1px);
}

#utility-hub {
    position: sticky;
    bottom: 14px;
    margin-top: auto;
    padding-top: 0.85rem;
    padding-bottom: 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    background: linear-gradient(180deg, rgba(10,10,20,0) 0%, rgba(10,10,20,0.92) 28%, rgba(10,10,20,0.98) 100%);
}

.utility-btn {
    width: 100%;
    min-height: 56px;
    padding: 0.88rem 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.84rem;
    line-height: 1.05;
}

.cleanup-btn {
    width: 100%;
    background: linear-gradient(135deg, #0f6f63, #0a4b42);
    color: white;
    border: 1px solid rgba(110,255,220,0.22);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
}

.cleanup-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #149282, #0d6659);
    transform: translateY(-1px);
}

.cleanup-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    background: linear-gradient(135deg, #2f3a40, #21292e);
    border-color: rgba(255,255,255,0.08);
}

.cleanup-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    padding: 0.12rem 0.42rem;
    margin-left: 0.35rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

/* ==========================================
   MODALS
   ========================================== */

.modal {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    min-width: 500px;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
}

.modal-content h2 {
    text-align: center;
    color: var(--gold);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    letter-spacing: 0.1em;
}

#restock-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.restock-item {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.restock-item:hover {
    border-color: var(--neon-blue);
}

.restock-icon {
    width: 48px;
    height: 48px;
}

.restock-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.restock-price {
    font-size: 0.75rem;
    color: var(--neon-green);
}

.restock-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.restock-controls button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.restock-controls button:hover {
    background: rgba(0,212,255,0.2);
    border-color: var(--neon-blue);
}

.restock-qty {
    font-size: 1rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

#order-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon-green);
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
}

/* ==========================================
   NOTIFICATIONS
   ========================================== */

#notifications {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    pointer-events: none;
}

.notification {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: notifSlide 0.3s ease, notifFade 0.5s ease 2.5s forwards;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.notif-sale {
    background: rgba(26,138,26,0.85);
    color: white;
    border: 1px solid rgba(57,255,20,0.3);
}

.notif-chaos {
    background: rgba(204,0,0,0.85);
    color: white;
    border: 1px solid rgba(255,51,51,0.3);
}

.notif-info {
    background: rgba(0,100,200,0.85);
    color: white;
    border: 1px solid rgba(0,212,255,0.3);
}

.notif-funny {
    background: rgba(200,100,0,0.85);
    color: white;
    border: 1px solid rgba(255,165,0,0.3);
}

@keyframes notifSlide {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes notifFade {
    to { opacity: 0; transform: translateY(-10px); }
}

/* ==========================================
   GAME OVER
   ========================================== */

#gameover-screen {
    background: linear-gradient(135deg, #1a0000, #0a0000);
    flex-direction: column;
}

.gameover-content {
    text-align: center;
    padding: 2rem;
}

.gameover-title {
    font-size: 4rem;
    color: var(--danger);
    text-shadow: 0 0 30px rgba(255,0,0,0.5);
    margin-bottom: 1rem;
}

#gameover-reason {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

#gameover-stats {
    margin-bottom: 2rem;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 2;
}

/* ==========================================
   PAUSE BUTTON
   ========================================== */

#pause-btn {
    position: absolute;
    top: 12px;
    right: 240px;
    z-index: 15;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 2px;
}

#pause-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--neon-blue);
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.hidden {
    display: none !important;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .menu-title { font-size: 2.5rem; }
    .menu-subtitle { font-size: 1.5rem; letter-spacing: 0.2em; }
    #inventory-panel { width: 160px; }
    #action-panel { width: calc(100% - 1rem); }
    #customer-info { flex-direction: column; }
    .portrait-column { width: 100%; flex-direction: row; align-items: center; }
    #customer-portrait { width: 96px; height: 116px; }
    .customer-meters { grid-template-columns: 1fr; }
    .detail-row { flex-direction: column; gap: 0.35rem; }
    .instructions-grid { grid-template-columns: 1fr; }
    #restock-grid { grid-template-columns: 1fr; }
    .modal-content { min-width: 90%; }
    #utility-hub {
        bottom: 10px;
        padding-top: 0.65rem;
    }
}
