:root {
    --bg-dark: #0B0B0B;
    --bg-sidebar: #121212;
    --bg-card: #1A1A1A;
    --accent: #00D1FF;
    --text-main: #E0E0E0;
    --text-dim: #666666;
    --danger: #FF5252;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid #222;
    height: 100vh;
    padding: 20px;
}

.main-content {
    padding: 20px 40px;
}

.detail-sidebar {
    background-color: var(--bg-sidebar);
    border-left: 1px solid #222;
    height: 100vh;
}

.spellbox-logo-text {
    color: var(--accent);
    font-size: 32px;
    font-weight: 900;
    text-align: center;
    margin-top: 0;
}

.nav-header {
    font-size: 10px;
    font-weight: bold;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.btn-nav {
    background: transparent;
    color: var(--text-main);
    border: none;
    text-align: left;
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-nav.active {
    background: #333;
    border-bottom: 2px solid var(--accent);
}

.btn-accent {
    background-color: var(--accent);
    color: black;
    font-weight: bold;
    border: none;
    padding: 10px;
}
.btn-outline-accent {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s;
}
.btn-outline-accent:hover {
    background: var(--accent);
    color: black;
}

.mtg-card-item {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid #222;
    width: 170px;
    margin: 10px;
    overflow: hidden;
    transition: transform 0.2s;
}

.mtg-card-item:hover {
    transform: translateY(-5px);
}

.mtg-card-img {
    width: 100%;
    height: 237px;
    object-fit: cover;
}

.card-info {
    padding: 12px;
}

.card-name {
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-price {
    color: var(--accent);
    font-size: 12px;
    font-weight: bold;
}

.search-input {
    background-color: var(--bg-card);
    border: 1px solid #333;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ============================================================
   MOBILE / RESPONSIVE
   ============================================================ */

/* Top-Bar + Toggle-Buttons standardmäßig ausgeblendet (Desktop) */
.mobile-topbar { display: none; }
.mobile-menu-btn { display: none; }
.mobile-close-btn { display: none; }
.mobile-backdrop { display: none; }

/* Tablets & kleine Desktops: Raster flexibler machen */
@media (max-width: 1199.98px) {
    .main-content { padding: 20px; }
    .mtg-card-item { width: calc(25% - 20px); }
}

/* Mobile: Navigation + Detail-Sidebar werden Overlays */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px !important;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0,0,0,0.7);
    }

    .detail-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        max-width: 100vw;
        z-index: 1060;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    .detail-sidebar.open { transform: translateX(0); }

    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 1020;
        background: var(--bg-sidebar);
        padding: 10px 16px;
        border-bottom: 1px solid #222;
    }
    .mobile-topbar .spellbox-logo-text { font-size: 20px; margin: 0; }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        background: transparent;
        border: 1px solid #333;
        border-radius: 6px;
        color: var(--accent);
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
    }

    .mobile-close-btn { display: inline-flex; }
    .mobile-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 1040;
    }

    .main-content { padding: 12px 14px; }
    .mtg-card-item { width: calc(33.333% - 20px); margin: 5px; }
}

/* Smartphones */
@media (max-width: 575.98px) {
    .main-content { padding: 10px; }

    .mtg-card-item { width: calc(50% - 10px); margin: 5px; }
    .mtg-card-item:hover { transform: none; }
    .mtg-card-img {
        height: auto;
        aspect-ratio: 63 / 88;
    }
    .card-name { font-size: 11px; }
    .card-price { font-size: 10px; }

    /* Collection-Header + Filter umbrechen lassen */
    .main-content .d-flex { flex-wrap: wrap; }
    .main-content h4 { font-size: 16px; }
    .search-input { max-width: 100%; }

    /* Kompakte Deck-Tabelle: TYPE-Spalte ausblenden */
    .table td, .table th { font-size: 11px; padding: 4px 6px !important; }
    .table th:nth-child(4), .table td:nth-child(4) { display: none; }

    /* Modale dehnen sich auf fast volle Breite aus */
    .position-fixed .bg-card { width: calc(100% - 16px) !important; max-width: 98vw !important; max-height: 92vh !important; }
}

/* ============================================================
   FOOTER – Impressum / Datenschutz (linke Sidebar)
   ============================================================ */
.app-footer {
    padding: 16px 0 0 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.app-footer:hover { opacity: 0.7; }
.footer-link {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); text-decoration: underline; }
.footer-sep { color: var(--text-dim); margin: 0 6px; }

/* ============================================================
   LANDING PAGE -- static content visible before Blazor loads
   ============================================================ */
.landing-root {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    box-sizing: border-box;
}
.landing-container { text-align: center; max-width: 520px; }
.landing-logo { margin-bottom: 0; line-height: 0; }
.landing-logo img { border-radius: 16px; max-width: 500px; height: auto; display: block; }
.landing-title { font-size: 48px; font-weight: 900; color: var(--accent); margin: 0; letter-spacing: 2px; }
.landing-subtitle { font-size: 16px; color: var(--text-dim); margin: 0 0 32px 0; font-weight: 500; }
.landing-features { display: flex; flex-direction: column; gap: 20px; margin-bottom: 28px; text-align: left; padding: 0 30px; }
.landing-feature { font-size: 15px; position: relative; padding-left: 16px; }
.landing-feature::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.landing-description { color: var(--text-dim); font-size: 13px; margin: 0 0 28px 0; line-height: 1.6; }
.landing-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.landing-btn { display: inline-block; padding: 12px 32px; border-radius: 6px; font-weight: 700; font-size: 14px; text-decoration: none; text-transform: uppercase; letter-spacing: 1px; transition: opacity 0.2s; }
.landing-btn:hover { opacity: 0.85; }
.landing-btn-primary { background: var(--accent); color: #000; }
.landing-btn-secondary { background: transparent; color: var(--text-main); border: 1px solid #444; }

/* Hide spinner while static landing is visible */
#spellbox-landing ~ .loading-progress, #spellbox-landing ~ .loading-progress-text { display: none !important; }
