/* ICT Quest - Premium Digital Style */

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

:root {
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-primary: #6366f1;
    /* Indigo-500 */
    --color-primary-dark: #4f46e5;
    --color-success: #10b981;
    /* Emerald-500 */
    --color-danger: #f43f5e;
    /* Rose-500 */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(15, 23, 42, 0.6);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: #f8fafc;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

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

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Utility Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Isometric Card transform utility */
.isometric-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.isometric-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Game Specific */
.drop-zone {
    transition: all 0.2s;
}

.drop-zone.hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
}

/* Noise Texture (Subtle) */
.bg-noise::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 50;
}

/* Global Overlay */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.7);
    z-index: 100 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Drawer & Layout */
@media (max-width: 1024px) {
    #main-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100 !important;
    }

    #main-sidebar.active {
        transform: translateX(0);
    }

    .level-wrapper {
        padding: 1rem !important;
    }

    #app-root {
        flex-direction: column;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.animate-shake {
    animation: shake 0.2s ease-in-out infinite;
    animation-iteration-count: 2;
}