@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@900&family=Roboto:wght@400;700&display=swap');

:root {
    --bg-dark: #050506;
    --surface: #0f0f12;
    --primary: #ff1f1f;
    --primary-glow: rgba(255, 31, 31, 0.6);
    --text-main: #ffffff;
    --text-dim: #555555;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    /* Fix voor mobiel: gebruik een vaste achtergrond */
    background-image: 
        linear-gradient(rgba(255, 31, 31, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 31, 31, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed; /* Zorgt dat het raster niet mee-scrollt en beter zichtbaar blijft */
}

/* Extra tweak voor betere zichtbaarheid op kleine schermen */
@media (max-width: 600px) {
    body {
        background-size: 30px 30px; /* Kleiner raster op mobiel voor meer detail */
    }
}

/* Branding Elements */
.logo-box {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px;
    border: 2px solid var(--primary);
    background: rgba(255, 31, 31, 0.1);
    box-shadow: 0 0 15px var(--primary-glow), inset 0 0 5px var(--primary-glow);
}

.logo-box::before {
    content: "K";
    font-family: 'Orbitron', sans-serif;
    font-weight: 900; font-size: 24px;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.logo-text {
    font-family: monospace; letter-spacing: 5px;
    font-weight: 900; margin-left: 12px;
    color: var(--text-main);
}

/* Auth Page */
.auth-container { display: flex; justify-content: center; align-items: center; height: 100vh; }
.auth-card {
    background: var(--surface); padding: 3rem; border-radius: 4px;
    width: 100%; max-width: 360px;
    border: 1px solid var(--primary); box-shadow: 0 0 30px var(--primary-glow);
    text-align: center;
}

/* Shared UI Components */
.btn-main {
    width: 100%; padding: 14px; margin-top: 1rem;
    background-color: transparent; color: var(--primary);
    border: 2px solid var(--primary); border-radius: 2px;
    font-weight: 900; cursor: pointer; text-transform: uppercase;
    letter-spacing: 2px; transition: 0.2s;
}

.btn-main:hover {
    background: var(--primary); color: #000;
    box-shadow: 0 0 25px var(--primary);
}

input {
    width: 100%; padding: 14px; margin: 10px 0;
    background: #000; border: 1px solid #333;
    border-radius: 2px; color: var(--primary);
    box-sizing: border-box; outline: none; font-family: monospace;
}

input:focus { border-color: var(--primary); box-shadow: 0 0 10px var(--primary-glow); }

/* Dashboard UI */
.top-app-bar {
    height: 70px; display: flex; align-items: center; padding: 0 25px;
    background: #000; justify-content: space-between;
    border-bottom: 2px solid var(--primary); box-shadow: 0 0 20px var(--primary-glow);
    position: sticky; top: 0; z-index: 100;
}

.brand { display: flex; align-items: center; }

.current-board-info {
    color: var(--text-dim); font-family: monospace; font-size: 0.75rem;
    margin-left: 20px; border-left: 1px solid #333; padding-left: 20px;
}

.board-tabs { display: flex; gap: 10px; padding: 15px; background: rgba(0,0,0,0.5); overflow-x: auto; }
.tab { padding: 8px 16px; border: 1px solid #333; font-family: monospace; color: var(--text-dim); cursor: pointer; white-space: nowrap; }
.tab.active { border-color: var(--primary); color: var(--primary); box-shadow: inset 0 0 8px var(--primary-glow); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; padding: 20px; }

.sound-card { 
    aspect-ratio: 1/1; border: 2px solid var(--primary);
    background: rgba(0, 0, 0, 0.8); color: var(--text-main);
    font-weight: 700; text-transform: uppercase; cursor: pointer;
    transition: 0.2s; clip-path: polygon(0 0, 100% 0, 100% 85%, 85% 100%, 0 100%);
    display: flex; align-items: center; justify-content: center; padding: 15px; text-align: center;
}

.sound-card:hover { box-shadow: 0 0 20px var(--primary-glow), inset 0 0 15px var(--primary-glow); transform: scale(1.02); }

/* Modals & Popups */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 1000; justify-content: center; align-items: center; }
.modal-content { background: #000; padding: 30px; border: 2px solid var(--primary); width: 90%; max-width: 450px; box-shadow: 0 0 40px var(--primary-glow); }

#snackbar { visibility: hidden; min-width: 250px; background-color: var(--primary); color: #000; text-align: center; padding: 16px; position: fixed; z-index: 2000; left: 50%; bottom: 30px; transform: translateX(-50%); font-weight: 900; text-transform: uppercase; }
#snackbar.show { visibility: visible; }

/* Mobile Optimization */
@media (max-width: 600px) {
    .logo-text, .current-board-info {
        display: none; /* Verberg tekst op kleine schermen */
    }

    .brand {
        gap: 0;
    }

    .top-app-bar {
        padding: 0 15px;
    }

    /* Optioneel: Maak de grid iets compacter op mobiel */
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
        padding: 15px;
    }

    .fab-container {
        position: fixed;
        bottom: 30px;
        right: 30px;
        display: flex;
        flex-direction: column;
        gap: 15px;
        z-index: 9999;
    }

    .fab {
        width: 55px;
        height: 55px;
        background: rgba(0, 0, 0, 0.9);
        color: var(--primary);
        border: 2px solid var(--primary);
        cursor: pointer;
        box-shadow: 0 0 15px var(--primary-glow);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        font-weight: bold;
        transition: all 0.2s ease;
        /* De iconische Tron-hoek */
        clip-path: polygon(0 0, 100% 0, 100% 75%, 75% 100%, 0 100%);
    }

    .fab:hover {
        background: var(--primary);
        color: #000 !important;
        box-shadow: 0 0 25px var(--primary);
    }

    @media (max-width: 600px) {
        .fab-container {
            right: 20px;
            bottom: 20px;
        }
    }
}