/* ============================================
   🏠 MY DREAM HOUSE - style.css (Phase 2 FIXED)
   Enhanced UI Styling, Animations, Responsive Design
   ============================================ */

/* ============ CSS VARIABLES ============ */
:root {
    --primary-color: #6c5ce7;
    --primary-hover: #5f3dc4;
    --secondary-color: #00b894;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #2ecc71;
    --dark-bg: #1a1a2e;
    --darker-bg: #16213e;
    --panel-bg: rgba(22, 33, 62, 0.85);
    --panel-border: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #b2bec3;
    --text-accent: #fdcb6e;
    --font-main: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    --font-title: 'Georgia', 'Times New Roman', serif;
    --hud-padding: 12px;
    --hud-gap: 10px;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    --rain-color: rgba(174, 194, 224, 0.6);
    --night-overlay: rgba(25, 25, 112, 0.3);
}

/* ============ RESET & BASE ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-main);
    background: var(--dark-bg);
    color: var(--text-primary);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: manipulation;
}

canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ============ HUD OVERLAY ============ */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hud-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--border-radius);
    padding: var(--hud-padding);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    pointer-events: auto;
    transition: all var(--transition-medium);
}

.hud-panel:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: var(--shadow-md);
}

/* Top-Left: Player Info */
#playerInfo {
    position: fixed;
    top: var(--hud-gap);
    left: var(--hud-gap);
    width: 220px;
    min-width: 180px;
    z-index: 11;
}

#playerNameDisplay {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 4px;
    color: var(--text-accent);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

#levelDisplay {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

#playerStats {
    margin-top: 5px;
    font-size: 0.7em;
    color: #b2bec3;
}

#xpBarContainer {
    width: 100%;
    height: 16px;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}

#xpBarFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe, #fd79a8);
    background-size: 200% 100%;
    animation: xpGradient 3s ease infinite;
    border-radius: 8px;
    transition: width 0.5s ease;
    position: relative;
}

@keyframes xpGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#xpText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.6em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
    pointer-events: none;
    white-space: nowrap;
}

/* Top-Right: Money & Time */
#moneyTime {
    position: fixed;
    top: var(--hud-gap);
    right: var(--hud-gap);
    min-width: 180px;
    text-align: right;
    z-index: 11;
}

#moneyDisplay {
    font-size: 1.4em;
    font-weight: bold;
    color: #fdcb6e;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    letter-spacing: 1px;
}

#timeDisplay {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 2px;
}

#weatherDisplay {
    font-size: 0.8em;
    color: #b2bec3;
}

/* Bottom-Left: Needs Bars */
#needsPanel {
    position: fixed;
    bottom: var(--hud-gap);
    left: var(--hud-gap);
    width: 200px;
    min-width: 160px;
    z-index: 11;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

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

.need-icon {
    font-size: 1em;
    width: 25px;
    text-align: center;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.need-icon:hover {
    transform: scale(1.2);
}

.need-bar {
    flex: 1;
    height: 10px;
    background: rgba(0,0,0,0.4);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.need-fill {
    height: 100%;
    width: 100%;
    border-radius: 5px;
    transition: width 0.3s ease, background-color 0.3s ease;
    position: relative;
}

.need-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    border-radius: 5px 5px 0 0;
}

/* Bottom-Right: Action Buttons */
#actionButtons {
    position: fixed;
    bottom: var(--hud-gap);
    right: var(--hud-gap);
    display: flex;
    gap: 8px;
    z-index: 11;
    pointer-events: auto;
}

.hud-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--panel-bg);
    border: 2px solid var(--panel-border);
    color: var(--text-primary);
    font-size: 1.3em;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.hud-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.hud-btn:hover::before {
    width: 100%;
    height: 100%;
}

.hud-btn:hover {
    background: rgba(108, 92, 231, 0.7);
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.hud-btn:active {
    transform: scale(0.95);
}

/* Interaction Prompt */
#interactionPrompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 12px 24px;
    z-index: 15;
    pointer-events: none;
    animation: pulsePrompt 2s ease-in-out infinite;
}

#interactionText {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(108, 92, 231, 0.8);
}

@keyframes pulsePrompt {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 10px rgba(108, 92, 231, 0.5); }
    50% { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 0 25px rgba(108, 92, 231, 0.8); }
}

/* Mobile Controls */
#mobileControls {
    position: fixed;
    bottom: 80px;
    left: 20px;
    right: 20px;
    z-index: 20;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

#joystickArea {
    pointer-events: auto;
    width: 130px;
    height: 130px;
    position: relative;
}

#joystickBase {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 3px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(5px);
    transition: all var(--transition-fast);
}

#joystickBase:active {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

#joystickStick {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(108, 92, 231, 0.6);
    border: 2px solid rgba(255,255,255,0.5);
    transition: none;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
}

#mobileInteractBtn {
    pointer-events: auto;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 184, 148, 0.8);
    border: 3px solid rgba(255,255,255,0.4);
    color: #fff;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(5px);
    animation: pulseMobileBtn 2s ease-in-out infinite;
    transition: all var(--transition-fast);
}

#mobileInteractBtn:active {
    transform: scale(0.9);
    background: rgba(0, 184, 148, 1);
}

@keyframes pulseMobileBtn {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 184, 148, 0.5); }
    50% { box-shadow: 0 0 25px rgba(0, 184, 148, 0.8); }
}

/* ============ OVERLAYS & MENUS ============ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

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

.menu-content {
    background: linear-gradient(135deg, #2d3436, #1a1a2e);
    border: 2px solid var(--panel-border);
    border-radius: 20px;
    padding: 30px 40px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.menu-title {
    font-family: var(--font-title);
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-accent);
    text-shadow: 0 0 20px rgba(253, 203, 110, 0.5);
    letter-spacing: 2px;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(253, 203, 110, 0.5); }
    50% { text-shadow: 0 0 40px rgba(253, 203, 110, 0.8); }
}

.menu-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1em;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.menu-btn {
    padding: 14px 24px;
    border-radius: var(--border-radius);
    border: 2px solid var(--panel-border);
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.5px;
    min-width: 200px;
    text-align: center;
    font-family: var(--font-main);
    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;
}

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

.menu-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

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

.menu-btn.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.menu-btn.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.menu-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8em;
    color: var(--text-secondary);
}

.menu-hint {
    text-align: center;
    margin-top: 15px;
    font-size: 0.8em;
    color: var(--text-secondary);
    opacity: 0.7;
}

.pause-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8em;
    color: var(--text-accent);
}

/* Dialog Box */
.dialog-box {
    background: linear-gradient(135deg, #2d3436, #1a1a2e);
    border: 2px solid var(--panel-border);
    border-radius: 16px;
    padding: 25px 30px;
    max-width: 400px;
    width: 90vw;
    box-shadow: var(--shadow-lg);
    animation: dialogPop 0.3s ease;
}

@keyframes dialogPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#dialogTitle {
    text-align: center;
    margin-bottom: 12px;
    color: var(--text-accent);
    font-size: 1.3em;
}

#dialogText {
    text-align: center;
    margin-bottom: 18px;
    color: var(--text-primary);
    font-size: 1em;
    line-height: 1.6;
}

#dialogOptions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.dialog-option-btn {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9em;
    font-family: var(--font-main);
    text-align: left;
}

.dialog-option-btn:hover {
    background: rgba(108, 92, 231, 0.3);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.dialog-option-btn:active {
    transform: translateX(2px);
}

/* Work Progress Overlay */
.work-box {
    background: linear-gradient(135deg, #2d3436, #1a1a2e);
    border: 2px solid var(--panel-border);
    border-radius: 16px;
    padding: 25px 30px;
    max-width: 350px;
    width: 90vw;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

#workTitle {
    margin-bottom: 15px;
    color: var(--text-accent);
    font-size: 1.3em;
}

#workProgressContainer {
    width: 100%;
    height: 20px;
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

#workProgressFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00b894, #55efc4, #00b894);
    background-size: 200% 100%;
    animation: workGradient 2s linear infinite;
    border-radius: 10px;
    transition: width 0.1s linear;
}

@keyframes workGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

#workStatus {
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* ============ MINIGAME OVERLAY (Phase 2) ============ */
.minigame-box {
    background: linear-gradient(135deg, #2d3436, #1a1a2e);
    border: 2px solid var(--panel-border);
    border-radius: 16px;
    padding: 25px 30px;
    max-width: 500px;
    width: 90vw;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: dialogPop 0.3s ease;
}

#minigameTitle {
    margin-bottom: 10px;
    color: var(--text-accent);
    font-size: 1.3em;
}

#minigameInstructions {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

#minigameContent {
    margin: 15px 0;
    min-height: 100px;
    position: relative;
}

#minigameProgressContainer {
    width: 100%;
    height: 20px;
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

#minigameProgressFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00b894, #55efc4);
    border-radius: 10px;
    transition: width 0.1s linear;
}

.sequence-display {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.seq-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #6c5ce7;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.seq-btn:hover {
    background: #5f3dc4;
    transform: scale(1.1);
}

.seq-btn:active {
    transform: scale(0.9);
}

.targets-container {
    position: relative;
    width: 100%;
    height: 300px;
}

.target-btn {
    position: absolute;
    font-size: 2em;
    cursor: pointer;
    transition: all 0.3s;
    background: none;
    border: none;
}

.target-btn:hover {
    transform: scale(1.3);
}

.timing-bar {
    position: relative;
    width: 100%;
    height: 40px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    overflow: hidden;
    margin: 20px 0;
}

.timing-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fdcb6e;
    border-radius: 50%;
    top: 10px;
    left: 0%;
    transition: left 0.1s linear;
    box-shadow: 0 0 10px #fdcb6e;
}

.timing-target {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #e74c3c;
    border-radius: 50%;
    top: 0px;
    left: 50%;
    opacity: 0.5;
    transition: background 0.3s;
}

/* Notification Container */
#notificationContainer {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.notification {
    background: rgba(0,0,0,0.85);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    animation: slideDown 0.4s ease, fadeOut 0.4s ease 2.6s forwards;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(5px);
    pointer-events: auto;
}

.notification.success {
    border-color: var(--success-color);
}

.notification.warning {
    border-color: var(--warning-color);
}

.notification.danger {
    border-color: var(--danger-color);
}

.notification.achievement {
    border-color: #fdcb6e;
    background: rgba(253, 203, 110, 0.2);
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* How To Play Box */
.howto-box {
    max-width: 500px;
    max-height: 70vh;
    overflow-y: auto;
}

.howto-box h2 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-accent);
}

.howto-text {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.howto-text p {
    margin-bottom: 8px;
}

.howto-text strong {
    color: var(--text-primary);
}

/* Credits Text */
.credits-text {
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.credits-text strong {
    color: var(--text-accent);
}

/* ============ UTILITY CLASSES ============ */
.hidden {
    display: none !important;
}

/* ============ RESPONSIVE DESIGN ============ */
/* Desktop Large */
@media (min-width: 1367px) {
    #playerInfo {
        width: 250px;
        padding: 15px;
    }
    
    #moneyTime {
        min-width: 220px;
        padding: 15px;
    }
    
    #needsPanel {
        width: 230px;
        padding: 15px;
    }
    
    .hud-btn {
        width: 56px;
        height: 56px;
        font-size: 1.5em;
    }
    
    #moneyDisplay {
        font-size: 1.6em;
    }
    
    .menu-title {
        font-size: 3em;
    }
}

/* Desktop Medium */
@media (max-width: 1366px) {
    #playerInfo {
        width: 200px;
        padding: 10px;
    }
    
    #needsPanel {
        width: 180px;
        padding: 10px;
    }
    
    .hud-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2em;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    #playerInfo {
        width: 180px;
        padding: 8px;
    }
    
    #needsPanel {
        width: 160px;
        padding: 8px;
    }
    
    .hud-btn {
        width: 42px;
        height: 42px;
        font-size: 1.1em;
    }
    
    #moneyDisplay {
        font-size: 1.1em;
    }
    
    #moneyTime {
        min-width: 150px;
        padding: 8px;
    }
    
    .menu-title {
        font-size: 2em;
    }
    
    .menu-content {
        padding: 20px 25px;
    }
}

/* Mobile Landscape */
@media (max-width: 850px) and (orientation: landscape) {
    #playerInfo {
        width: 150px;
        padding: 6px;
        font-size: 0.8em;
    }
    
    #needsPanel {
        width: 130px;
        padding: 6px;
    }
    
    .need-bar {
        height: 8px;
    }
    
    .hud-btn {
        width: 38px;
        height: 38px;
        font-size: 1em;
    }
    
    #moneyTime {
        min-width: 120px;
        padding: 6px;
    }
    
    #moneyDisplay {
        font-size: 1em;
    }
    
    #timeDisplay {
        font-size: 0.7em;
    }
}

/* Mobile Portrait */
@media (max-width: 600px) {
    #playerInfo {
        width: 130px;
        padding: 6px;
        font-size: 0.75em;
        top: 5px;
        left: 5px;
    }
    
    #playerNameDisplay {
        font-size: 0.9em;
    }
    
    #levelDisplay {
        font-size: 0.7em;
    }
    
    #xpBarContainer {
        height: 10px;
    }
    
    #xpText {
        font-size: 0.5em;
    }
    
    #moneyTime {
        min-width: 100px;
        padding: 6px;
        top: 5px;
        right: 5px;
    }
    
    #moneyDisplay {
        font-size: 0.9em;
    }
    
    #timeDisplay {
        font-size: 0.65em;
    }
    
    #needsPanel {
        width: 110px;
        padding: 6px;
        bottom: 5px;
        left: 5px;
        gap: 3px;
    }
    
    .need-icon {
        font-size: 0.8em;
        width: 18px;
    }
    
    .need-bar {
        height: 6px;
        border-radius: 3px;
    }
    
    .need-fill {
        border-radius: 3px;
    }
    
    #actionButtons {
        bottom: 5px;
        right: 5px;
        gap: 5px;
    }
    
    .hud-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9em;
        border-width: 1.5px;
    }
    
    #mobileControls {
        bottom: 60px;
        left: 10px;
        right: 10px;
    }
    
    #joystickArea {
        width: 100px;
        height: 100px;
    }
    
    #joystickBase {
        width: 85px;
        height: 85px;
    }
    
    #joystickStick {
        width: 40px;
        height: 40px;
    }
    
    #mobileInteractBtn {
        width: 60px;
        height: 60px;
        font-size: 0.7em;
    }
    
    .menu-content {
        padding: 20px 15px;
        margin: 10px;
        max-width: 95vw;
    }
    
    .menu-title {
        font-size: 1.6em;
    }
    
    .menu-btn {
        padding: 12px 18px;
        font-size: 0.9em;
        min-width: 160px;
    }
    
    .dialog-box {
        padding: 20px;
        max-width: 300px;
    }
    
    .minigame-box {
        padding: 20px;
        max-width: 350px;
    }
    
    #interactionText {
        font-size: 0.9em;
    }
    
    #interactionPrompt {
        padding: 8px 16px;
    }
    
    #notificationContainer {
        top: 60px;
        width: 95%;
    }
    
    .notification {
        font-size: 0.8em;
        padding: 8px 14px;
    }
}

/* Small Mobile */
@media (max-width: 380px) {
    #playerInfo {
        width: 110px;
        padding: 4px;
        font-size: 0.7em;
    }
    
    #needsPanel {
        width: 90px;
        padding: 4px;
    }
    
    .hud-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8em;
    }
    
    #moneyDisplay {
        font-size: 0.8em;
    }
    
    .menu-title {
        font-size: 1.4em;
    }
    
    #joystickArea {
        width: 80px;
        height: 80px;
    }
    
    #joystickBase {
        width: 70px;
        height: 70px;
    }
    
    #joystickStick {
        width: 35px;
        height: 35px;
    }
    
    .seq-btn {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
    
    .target-btn {
        font-size: 1.5em;
    }
}

/* ============ ANIMATIONS & EFFECTS ============ */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.3s ease;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(108, 92, 231, 0.5); }
    50% { box-shadow: 0 0 20px rgba(108, 92, 231, 0.9); }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.bounce {
    animation: bounce 1s ease infinite;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}