/* ============================================
   DR. FEELGOOD'S QUESTIONABLE CLINIC
   Complete Stylesheet — AAA Quality UI
   happystoner5420 Games © 2026
   ============================================ */

/* RESET & BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }

@keyframes pulse { 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.05); } }
@keyframes glow { 0%,100%{ text-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88; } 50%{ text-shadow: 0 0 40px #00ffaa, 0 0 80px #00ffaa, 0 0 120px #00ff88; } }
@keyframes slideIn { from{ transform:translateY(40px); opacity:0; } to{ transform:translateY(0); opacity:1; } }
@keyframes shake { 0%,100%{ transform:translateX(0); } 25%{ transform:translateX(-8px) rotate(-1deg); } 75%{ transform:translateX(8px) rotate(1deg); } }
@keyframes bubbleFloat { 0%{ transform:translateY(0) scale(1); opacity:0.8; } 100%{ transform:translateY(-200px) scale(0.3); opacity:0; } }
@keyframes heartbeat { 0%,100%{ transform:scale(1); } 15%{ transform:scale(1.15); } 30%{ transform:scale(1); } 45%{ transform:scale(1.1); } }
@keyframes drip { 0%{ transform:translateY(-10px); opacity:0; } 50%{ opacity:1; } 100%{ transform:translateY(30px); opacity:0; } }
@keyframes scanline { 0%{ transform:translateY(-100%); } 100%{ transform:translateY(100vh); } }
@keyframes colorShift { 0%{ filter:hue-rotate(0deg); } 100%{ filter:hue-rotate(360deg); } }
@keyframes fadeIn { from{ opacity:0; } to{ opacity:1; } }
@keyframes popIn { 0%{ transform:scale(0); opacity:0; } 70%{ transform:scale(1.1); } 100%{ transform:scale(1); opacity:1; } }

html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    user-select: none;
    -webkit-user-select: none;
}

/* SCREENS */
.screen {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    z-index: 1;
}
.screen.active { display: flex; }

/* GLASS MORPHISM CARDS */
.glass-card {
    background: rgba(15, 25, 40, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(100, 200, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ==================== MAIN MENU ==================== */
#main-menu {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a1628 0%, #1a0a2e 50%, #0a2818 100%);
    position: relative;
}
#menu-bg-canvas {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}
.menu-container {
    position: relative; z-index: 2;
    display: flex; flex-direction: column;
    align-items: center; gap: 30px;
}
.title-glow { text-align: center; animation: fadeIn 1s ease; }
.game-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #00ff88, #00ddff, #ff00aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 3s ease-in-out infinite;
    letter-spacing: 2px;
    line-height: 1.1;
}
.game-subtitle {
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    color: #88ccff;
    font-weight: 300;
    margin-top: 5px;
    letter-spacing: 4px;
    text-transform: uppercase;
}
.tagline {
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    color: #ff6688;
    font-style: italic;
    margin-top: 10px;
    opacity: 0.8;
}
.menu-buttons {
    display: flex; flex-direction: column;
    gap: 12px; width: 320px; max-width: 90vw;
}
.menu-btn {
    background: linear-gradient(135deg, rgba(0,255,136,0.15), rgba(0,200,255,0.1));
    border: 1px solid rgba(0,255,136,0.3);
    color: #e0ffe8;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    backdrop-filter: blur(10px);
}
.menu-btn:hover {
    background: linear-gradient(135deg, rgba(0,255,136,0.3), rgba(0,200,255,0.25));
    border-color: rgba(0,255,136,0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,255,136,0.2);
}
.menu-btn:active { transform: translateY(1px); }
.exit-btn {
    background: linear-gradient(135deg, rgba(255,50,50,0.15), rgba(255,100,50,0.1));
    border-color: rgba(255,80,80,0.3);
    color: #ffcccc;
}
.exit-btn:hover {
    background: linear-gradient(135deg, rgba(255,50,50,0.3), rgba(255,100,50,0.25));
    border-color: rgba(255,80,80,0.6);
    box-shadow: 0 8px 25px rgba(255,50,50,0.2);
}
.btn-icon { font-size: 1.3rem; }
.menu-footer { color: #556; font-size: 0.8rem; margin-top: 20px; }

/* ==================== HOW TO PLAY ==================== */
.overlay-panel {
    background: rgba(10, 18, 30, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(0,255,136,0.2);
    border-radius: 20px;
    padding: 40px;
    max-width: 700px; width: 90vw;
    margin: auto;
    max-height: 90vh;
    overflow-y: auto;
    animation: popIn 0.4s ease;
    display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.overlay-panel h2 {
    font-size: 1.8rem;
    color: #00ff88;
    text-align: center;
}
.instructions-scroll {
    display: flex; flex-direction: column; gap: 16px;
    width: 100%;
}
.instruction-item {
    display: flex; gap: 16px; align-items: flex-start;
    background: rgba(0,255,136,0.05);
    border: 1px solid rgba(0,255,136,0.1);
    border-radius: 12px;
    padding: 16px;
}
.inst-icon { font-size: 2rem; flex-shrink: 0; }
.instruction-item h3 { color: #00ddff; font-size: 1rem; margin-bottom: 4px; }
.instruction-item p { color: #aac; font-size: 0.9rem; line-height: 1.5; }

#how-to-play, #credits-screen {
    align-items: center; justify-content: center;
    background: rgba(5,10,20,0.97);
}

/* ==================== CREDITS ==================== */
.credits-panel { max-width: 550px; }
.credits-content { text-align: center; width: 100%; }
.credit-logo { font-size: 3rem; margin-bottom: 10px; }
.credits-content h3 { color: #00ff88; font-size: 1.3rem; margin-bottom: 20px; }
.credit-line {
    display: flex; justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.credit-role { color: #668; font-size: 0.9rem; }
.credit-name { color: #00ddff; font-size: 0.9rem; font-weight: 600; }
.credit-disclaimer {
    margin-top: 24px; padding: 16px;
    background: rgba(255,50,50,0.1);
    border: 1px solid rgba(255,50,50,0.2);
    border-radius: 8px;
    color: #ff8888; font-size: 0.8rem; line-height: 1.5;
}
.credit-year { color: #445; font-size: 0.75rem; margin-top: 16px; }

/* ==================== GAME SCREEN ==================== */
#game-screen {
    flex-direction: column;
    background: #080c14;
    position: relative;
}
#game-canvas {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}

/* TOP HUD */
#hud-top {
    position: relative; z-index: 10;
    display: flex; align-items: center; gap: 16px;
    padding: 10px 16px;
    background: linear-gradient(180deg, rgba(0,10,20,0.9) 0%, rgba(0,10,20,0) 100%);
    flex-wrap: wrap;
}
.hud-item {
    display: flex; align-items: center; gap: 6px;
    background: rgba(0,20,40,0.7);
    border: 1px solid rgba(0,200,255,0.2);
    border-radius: 8px;
    padding: 6px 14px;
    font-weight: 700;
    font-size: 0.95rem;
}
.hud-icon { font-size: 1.2rem; }
#hud-money { color: #44ff88; }
#hud-patients-cured { color: #88ddff; }
.malpractice-bar {
    width: 100px; height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
}
.malpractice-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #ffcc00, #ff4444);
    border-radius: 6px;
    transition: width 0.5s ease;
}
.hud-btn {
    margin-left: auto;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #aaa;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.hud-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* PATIENT AREA */
#patient-area {
    position: relative; z-index: 10;
    display: flex; gap: 16px;
    padding: 10px 16px;
    flex: 1;
    overflow-y: auto;
    flex-wrap: wrap;
    align-content: flex-start;
}
#patient-card {
    flex: 1; min-width: 280px;
    display: flex; gap: 16px;
    animation: slideIn 0.5s ease;
    align-items: flex-start;
}
#patient-portrait-container {
    flex-shrink: 0;
    border: 2px solid rgba(0,200,255,0.2);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
}
#patient-canvas { display: block; }
#patient-info { flex: 1; }
#patient-name { color: #00ddff; font-size: 1.2rem; margin-bottom: 8px; }
.illness-text {
    color: #ff6688;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 6px;
    padding: 6px 10px;
    background: rgba(255,50,80,0.1);
    border-radius: 6px;
    border-left: 3px solid #ff4466;
}
.symptoms-text { color: #aabb99; font-size: 0.9rem; line-height: 1.5; margin-bottom: 8px; }
#patient-mood { color: #888; font-size: 0.9rem; }
#mood-indicator { font-size: 1.5rem; }

/* TREATMENT AREA */
#treatment-area {
    flex: 1; min-width: 280px;
    display: flex; flex-direction: column; gap: 12px;
}
#treatment-area h3 { color: #00ff88; }
#mix-slots {
    display: flex; gap: 10px;
}
.mix-slot {
    flex: 1;
    background: rgba(0,255,136,0.05);
    border: 2px dashed rgba(0,255,136,0.2);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    color: #556;
    font-size: 0.85rem;
    min-height: 60px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
}
.mix-slot.filled {
    border-style: solid;
    border-color: rgba(0,255,136,0.5);
    color: #aaffcc;
    background: rgba(0,255,136,0.1);
}
#concoction-name {
    text-align: center;
    color: #ffaa00;
    font-weight: 700;
    font-size: 1rem;
    min-height: 24px;
}
#treatment-buttons {
    display: flex; gap: 10px;
}
.action-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.inject-btn {
    background: linear-gradient(135deg, #00cc66, #00aa88);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,204,102,0.3);
}
.inject-btn:hover {
    background: linear-gradient(135deg, #00ee77, #00ccaa);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,204,102,0.5);
}
.inject-btn:disabled {
    background: #333;
    color: #666;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}
.clear-btn {
    background: rgba(255,80,80,0.2);
    color: #ff8888;
    border: 1px solid rgba(255,80,80,0.3);
    flex: 0.5;
}
.clear-btn:hover { background: rgba(255,80,80,0.3); }

/* INVENTORY */
#inventory-area {
    position: relative; z-index: 10;
    margin: 0 16px 10px;
}
#inventory-area h3 { color: #ffaa00; margin-bottom: 10px; }
#ingredient-grid, #lab-ingredient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}
.ingredient-item {
    background: rgba(255,200,0,0.05);
    border: 1px solid rgba(255,200,0,0.15);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}
.ingredient-item:hover {
    background: rgba(255,200,0,0.15);
    border-color: rgba(255,200,0,0.4);
    transform: translateY(-2px);
}
.ingredient-item .ing-icon { font-size: 1.5rem; display: block; margin-bottom: 4px; }
.ingredient-item .ing-name { color: #ddcc88; font-weight: 600; }
.ingredient-item .ing-qty { color: #888; font-size: 0.75rem; }

/* BOTTOM NAV */
#bottom-nav {
    position: relative; z-index: 10;
    display: flex;
    background: rgba(0,10,20,0.9);
    border-top: 1px solid rgba(0,200,255,0.15);
}
.nav-btn {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    color: #668;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border-top: 3px solid transparent;
}
.nav-btn.active {
    color: #00ff88;
    border-top-color: #00ff88;
    background: rgba(0,255,136,0.05);
}
.nav-btn:hover { color: #aaffcc; background: rgba(0,255,136,0.03); }

/* TAB CONTENT */
.tab-content {
    position: absolute; top: 50px; left: 0; right: 0; bottom: 60px;
    z-index: 15;
    overflow-y: auto;
    padding: 16px;
}
.tab-content.hidden { display: none; }

/* LAB */
.lab-card { max-width: 800px; margin: 0 auto; }
.lab-card h2 { color: #00ff88; text-align: center; margin-bottom: 5px; }
.lab-desc { color: #778; text-align: center; margin-bottom: 20px; font-size: 0.9rem; }
#lab-mix-area {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    margin-bottom: 24px;
}
#lab-beaker {
    border: 2px solid rgba(0,255,136,0.2);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
}
#lab-slots { display: flex; gap: 10px; }
.lab-slot {
    width: 120px; padding: 12px;
    background: rgba(0,255,136,0.05);
    border: 2px dashed rgba(0,255,136,0.2);
    border-radius: 10px;
    text-align: center;
    color: #556;
    font-size: 0.85rem;
    transition: all 0.3s;
}
.lab-slot.filled {
    border-style: solid;
    border-color: rgba(0,255,136,0.5);
    color: #aaffcc;
    background: rgba(0,255,136,0.1);
}
.mix-btn {
    background: linear-gradient(135deg, #8800ff, #cc00ff);
    color: #fff;
    box-shadow: 0 4px 15px rgba(136,0,255,0.3);
    width: 200px;
}
.mix-btn:hover {
    box-shadow: 0 6px 20px rgba(136,0,255,0.5);
    transform: translateY(-2px);
}
#lab-result {
    padding: 16px;
    background: rgba(0,255,136,0.1);
    border: 1px solid rgba(0,255,136,0.3);
    border-radius: 10px;
    text-align: center;
    animation: popIn 0.4s ease;
}
#lab-result.hidden { display: none; }

/* SHOP */
.shop-card { max-width: 800px; margin: 0 auto; }
.shop-card h2 { color: #ffaa00; text-align: center; margin-bottom: 5px; }
.shop-desc { color: #778; text-align: center; margin-bottom: 20px; font-size: 0.9rem; font-style: italic; }
#shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.shop-item {
    background: rgba(255,200,0,0.05);
    border: 1px solid rgba(255,200,0,0.15);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.shop-item:hover {
    background: rgba(255,200,0,0.12);
    border-color: rgba(255,200,0,0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,200,0,0.1);
}
.shop-icon { font-size: 2rem; margin-bottom: 8px; }
.shop-name { color: #ffdd88; font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.shop-price { color: #44ff88; font-weight: 700; font-size: 1rem; }
.shop-item.cant-afford { opacity: 0.4; cursor: not-allowed; }

/* RESULT POPUP */
#result-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease;
}
#result-popup.hidden { display: none; }
.result-content {
    max-width: 500px; width: 90vw;
    text-align: center;
    animation: popIn 0.5s ease;
}
#result-title { font-size: 1.8rem; margin-bottom: 12px; }
#result-text { color: #aabb99; font-size: 1rem; line-height: 1.6; margin-bottom: 12px; }
#result-effects { margin-bottom: 12px; }
#result-money { font-size: 1.3rem; font-weight: 700; margin-bottom: 16px; }

/* GAME OVER */
#game-over {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(20,0,0,0.95);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
}
#game-over.hidden { display: none; }
.gameover-content {
    text-align: center;
    animation: popIn 0.6s ease;
}
.gameover-content h1 {
    font-size: 4rem;
    color: #ff4444;
    animation: heartbeat 1s ease-in-out infinite;
}
.gameover-content h2 { color: #ff8888; margin: 16px 0; font-size: 1.3rem; }
#final-stats { color: #aaa; font-size: 1rem; margin-bottom: 24px; line-height: 1.8; }

/* DRUG EFFECT OVERLAY */
.drug-effect-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 50;
    animation: colorShift 3s linear infinite;
    mix-blend-mode: overlay;
    opacity: 0.3;
}

/* SHAKE EFFECT */
.screen-shake { animation: shake 0.3s ease !important; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: rgba(0,255,136,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,255,136,0.5); }

/* RESPONSIVE */
@media (max-width: 768px) {
    #patient-card { flex-direction: column; align-items: center; }
    #patient-area { flex-direction: column; }
    .game-title { font-size: 2.2rem; }
    #mix-slots { flex-direction: column; }
    #lab-slots { flex-direction: column; align-items: center; }
    .menu-buttons { width: 90vw; }
}
