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

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg-dark: #f7f7fb;
    --panel-bg: linear-gradient(135deg, rgba(249, 250, 251, 0.92) 0%, rgba(229, 231, 235, 0.92) 100%);
    --border-glow: rgba(23, 32, 51, 0.14);
    
    /* Accordion Project Color Palette */
    --primary-blue: #0f766e;         /* Teal */
    --accent-electric: #22c55e;      /* Green */
    --neon-pink: #1d4ed8;            /* Blue */
    
    --success: #22c55e;
    --error: #fb923c;                /* Orange */
    
    --text-main: #172033;
    --text-cyan: #0f766e;
    --text-muted: #334155;
    
    --glow-cyan: 0 24px 70px rgba(15, 23, 42, 0.1);
    --glow-pink: 0 24px 70px rgba(15, 23, 42, 0.1);
    --glow-green: 0 24px 70px rgba(15, 23, 42, 0.1);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Body Styles (Matching accordion background) */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: radial-gradient(circle at 0% 0%, rgba(15, 118, 110, 0.25) 0%, transparent 40%), radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.15) 0%, transparent 40%), linear-gradient(135deg, #090d16, #0f172a 60%, #1e293b);
    background-attachment: fixed;
    color: #f1f5f9;
    overflow-x: hidden;
    position: relative;
}

/* Floating Ambient Light Spheres disabled for clean accordion style */
body::before, body::after {
    display: none;
}

/* Typography Headings */
h1, h2, h3, h4, .logo h1, .cart-title {
    font-family: Arial, sans-serif;
    color: #ffffff;
    letter-spacing: -0.01em;
    text-transform: none;
    text-shadow: none;
}

/* Card overrides to preserve readability inside light glass panels */
.quiz-card, .card {
    color: #172033 !important;
}
.quiz-card h1, .quiz-card h2, .quiz-card h3, 
.card h1, .card h2, .card h3 {
    color: #172033 !important;
}
.quiz-card p, .card p, .card .status-text {
    color: #334155 !important;
}

/* Header Styles */
.main-header, header {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glow);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
    padding: 1.5rem 2rem !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    height: auto !important;
}

.main-header h1, header h1 {
    font-family: Arial, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: #172033;
}

.main-header h1 span, header h1 span {
    color: #0f766e;
    text-shadow: none;
}

.nav-links a, .nav-btn, .toggle-nav-btn {
    background: linear-gradient(145deg, #0f766e, #22c55e) !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 0 4px 15px rgba(15, 76, 110, 0.15);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.nav-links a:hover, .nav-btn:hover, .toggle-nav-btn:hover {
    transform: scale(1.08) translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(15, 76, 110, 0.3) !important;
    z-index: 10;
    color: #ffffff !important;
}

.nav-links a:active, .nav-btn:active, .toggle-nav-btn:active {
    transform: scale(0.96) translateY(0) !important;
    filter: brightness(0.85);
    box-shadow: 0 4px 10px rgba(15, 76, 110, 0.15) !important;
}

/* Layout Wrappers */
.main-wrapper {
    display: flex;
    height: calc(100vh - 65px);
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

.header-section {
    text-align: center;
    margin-bottom: 40px;
}

/* Grid Layout for Dashboard */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
}

/* Accordion Card Panels */
.quiz-card, .card {
    background: var(--panel-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glow) !important;
    border-radius: 8px !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14) !important;
    padding: 35px;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.quiz-card::before, .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--x, 0px) var(--y, 0px), rgba(255, 255, 255, 0.5), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.quiz-card:hover::before, .card:hover::before {
    opacity: 1;
}

.quiz-card > *, .card > * {
    position: relative;
    z-index: 2;
}

.card:hover {
    border-color: #0f766e !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2) !important;
    transform: translateY(-8px);
}

.card h2 {
    font-size: 1.25rem;
    margin-top: 0;
}

.status-text {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

/* Cyber Progress Bar */
.progress-bar {
    background: rgba(255, 255, 255, 0.05);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-electric));
    box-shadow: 0 0 10px var(--accent-electric);
    height: 100%;
    transition: width 0.6s cubic-bezier(0.1, 0.8, 0.3, 1);
}

/* Sidebar Questions list */
.sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-glow);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(10px);
}

.nav-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 12px;
    align-content: start;
}

/* Circular glowing buttons in Sidebar */
.nav-item {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-glow);
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.nav-item:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.nav-item.active {
    background: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    color: white !important;
    transform: scale(1.1);
}

.nav-item.done-correct {
    background: linear-gradient(145deg, #0f766e, #22c55e) !important;
    border-color: var(--success) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}

.nav-item.done-wrong {
    background: linear-gradient(145deg, #7c2d12, #fb923c) !important;
    border-color: var(--error) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}

/* Question content wrapper */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Question slide animations */
.q-block {
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Answer option buttons */
.ans-btn {
    display: flex;
    align-items: center;
    text-align: left;
    width: 100%;
    margin: 12px 0;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid var(--border-glow) !important;
    border-radius: 10px;
    color: var(--text-main) !important;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.ans-btn:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--primary-blue) !important;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08) !important;
    transform: translateX(6px);
}

.ans-btn.correct {
    background: linear-gradient(145deg, #0f766e, #22c55e) !important;
    border-color: var(--success) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.15) !important;
}

.ans-btn.incorrect {
    background: linear-gradient(145deg, #7c2d12, #fb923c) !important;
    border-color: var(--error) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 25px rgba(251, 146, 60, 0.15) !important;
}

.already-done {
    pointer-events: none;
}

/* Button & Action Elements */
.btn, .btn-save, .btn-reset, .nav-control-btn, .dropbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: var(--transition-fast);
    font-size: 0.95rem;
    font-family: Arial, sans-serif;
    letter-spacing: 0.02em;
    text-transform: none;
}

.btn {
    flex: 1;
}

.btn-start {
    background: linear-gradient(145deg, #0f766e, #22c55e) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.1);
}

.btn-start:hover {
    background: linear-gradient(145deg, #0f766e, #22c55e) !important;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.2) !important;
    transform: translateY(-2px);
}

.btn-save {
    background: linear-gradient(145deg, #0f766e, #22c55e) !important;
    color: #ffffff !important;
    flex: 2;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.1);
}

.btn-save:hover {
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.2) !important;
    transform: translateY(-2px);
}

.btn-reset {
    background: linear-gradient(145deg, #7c2d12, #fb923c) !important;
    color: #ffffff !important;
    flex: 1;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.1);
}

.btn-reset:hover {
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.2) !important;
    transform: translateY(-2px);
}

.nav-control-btn {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-glow) !important;
    color: var(--text-main);
}

.nav-control-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--primary-blue) !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.nav-control-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.dropbtn {
    background: linear-gradient(145deg, #0f766e, #22c55e) !important;
    color: #ffffff !important;
    border: 1px solid var(--border-glow) !important;
}

.dropbtn:hover {
    background: linear-gradient(145deg, #0f766e, #22c55e) !important;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.2) !important;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-btns {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Form input elements */
.ans-btn[type="text"], .ans-btn[type="password"], .ans-btn[type="email"] {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #172033 !important;
    border: 1px solid var(--border-glow) !important;
    width: 100%;
    box-sizing: border-box;
}

.ans-btn[type="text"]:focus, .ans-btn[type="password"]:focus, .ans-btn[type="email"]:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05) !important;
    background: #ffffff !important;
    outline: none;
}

/* Accordion Layout */
.accordion-container {
    min-height: 480px;
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(23, 32, 51, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
    width: 100%;
    margin-bottom: 24px;
}

.accordion-panel {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    border-radius: 7px;
    color: white !important;
    transition: flex .55s ease, filter .55s ease, transform .55s ease;
    outline: none;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Accordion colorful gradient cycle (matching accordion endergebnis) */
.accordion-panel:nth-child(5n+1) { background: linear-gradient(145deg, #0f766e, #22c55e); }
.accordion-panel:nth-child(5n+2) { background: linear-gradient(145deg, #7c2d12, #fb923c); }
.accordion-panel:nth-child(5n+3) { background: linear-gradient(145deg, #1d4ed8, #38bdf8); }
.accordion-panel:nth-child(5n+4) { background: linear-gradient(145deg, #86198f, #f472b6); }
.accordion-panel:nth-child(5n+5) { background: linear-gradient(145deg, #365314, #bef264); }

.accordion-panel:hover, .accordion-panel:focus-visible {
    flex: 4;
    filter: saturate(1.1);
    transform: translateY(-2px);
}

.accordion-caption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 22px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    text-align: left;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    justify-content: flex-end;
}

.accordion-caption strong {
    display: block;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 6px;
    font-family: Arial, sans-serif;
    color: white !important;
}

.accordion-caption span {
    display: block;
    max-width: 34ch;
    line-height: 1.45;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Small elegant Reset Button */
.btn-reset-small {
    background: rgba(251, 146, 60, 0.25) !important;
    border: 1px solid rgba(251, 146, 60, 0.5) !important;
    color: #ffd8a8 !important;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: Arial, sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    width: fit-content;
}

.btn-reset-small:hover {
    background: rgba(251, 146, 60, 0.55) !important;
    color: white !important;
}

/* Mobiles Nav-Dropdown standardmäßig ausblenden */
.mobile-nav-container {
    display: none;
}

/* Mobile responsive rules */
@media (max-width: 768px) {
    .main-header, header {
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 10px;
        padding: 12px 15px !important;
        align-items: center !important;
    }
    .main-header h1, header h1 {
        font-size: 1.05rem !important;
    }
    .main-header h1 span, header h1 span {
        display: none !important; /* Blendet "Fachinformatiker" auf Handys aus */
    }
    .nav-links a {
        font-size: 0.8rem !important;
        padding: 6px 12px !important;
    }
    
    .main-wrapper {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .nav-list {
        grid-template-columns: repeat(8, 1fr);
        padding: 15px;
    }
    
    .content {
        padding: 20px 15px;
    }
    
    .container {
        padding: 20px 12px !important;
    }
    
    .grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .quiz-card, .card {
        padding: 20px 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Mobiles Nav-Dropdown / Button für Fragenübersicht auf Handys stylen */
    .mobile-nav-container {
        display: block !important;
        margin-bottom: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .toggle-nav-btn {
        width: 100% !important;
        padding: 14px !important;
        box-sizing: border-box;
    }
    
    .mobile-nav-grid {
        background: var(--panel-bg);
        border: 1px solid var(--border-glow);
        border-radius: 8px;
        padding: 15px;
        margin-top: 10px;
        box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
        box-sizing: border-box;
    }
    
    .mobile-nav-grid .nav-list {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)) !important;
        gap: 8px !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .mobile-nav-grid .nav-item {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.9rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        border-radius: 50% !important;
    }

    .accordion-container {
        flex-direction: column;
        min-height: auto;
        gap: 15px;
    }
    
    .accordion-panel {
        min-height: 150px;
    }
    
    .accordion-panel:hover, .accordion-panel:focus-visible {
        flex: 2;
    }
}