/* Custom Styles for Farm Tycoon Simulator */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
    --primary: #0284c7;
    --primary-glow: rgba(2, 132, 199, 0.4);
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: #0b0f19;
    color: #f1f5f9;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-modal {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
    position: relative;
    z-index: 100000 !important;
    pointer-events: auto !important;
}

/* Modal Stacking & Event Isolation - Mencegah klik tembus ke peta */
.game-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important;
}

.game-modal.hidden {
    display: none !important;
    pointer-events: none !important;
}

/* Active speed button */
.active-speed {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Canvas styling */
#phaser-canvas-container {
    width: 100%;
    min-height: 420px;
}

#phaser-canvas-container canvas {
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    touch-action: none;
}

/* Pulsing highlight animation */
@keyframes softPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

.pulse-badge {
    animation: softPulse 2.5s infinite ease-in-out;
}

/* Mobile Friendly Optimization */
@media (max-width: 768px) {
    .glass-modal {
        max-height: 90vh !important;
        width: 95vw !important;
        padding: 1rem !important;
    }

    button, input, select {
        min-height: 38px;
    }
}
