:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --accent-color: #38bdf8;
    --accent-secondary: #818cf8;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    /* Prevent scrolling, use slides */
    height: 100vh;
    width: 100vw;
}

/* Background Animations */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: 2s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #c084fc;
    top: 40%;
    left: 40%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

/* Language Switcher */
.lang-switch {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: bold;
    box-shadow: 0 0 10px var(--accent-color);
}

/* Creator Footer */
.creator-footer {
    position: fixed;
    bottom: 20px;
    left: 30px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    z-index: 1000;
    font-weight: 300;
    pointer-events: none;
}

/* Navigation Buttons */
.nav-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 15px;
    z-index: 100;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.nav-btn:hover:not(:disabled) {
    background: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-color);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Slides */
#app {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.95);
    padding: 2rem;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.content-wrapper {
    max-width: 1100px;
    width: 100%;
    z-index: 10;
}

.content-wrapper.centered {
    text-align: center;
}

h1.main-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.accent {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
}

.subtitle {
    font-size: 1.5rem;
    color: #cbd5e1;
    margin-bottom: 3rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

p.instruction {
    margin-bottom: 2rem;
    color: #94a3b8;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cards (Principles) */
.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    /* filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.5)); */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    opacity: 0;
}

.card.open .card-details {
    max-height: 200px;
    opacity: 1;
    margin-top: 1rem;
}

/* Comparison */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.col {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
}

.col.premium {
    background: rgba(56, 189, 248, 0.05);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}

.badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--accent-color);
    color: #000;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 0 10px var(--accent-color);
}

.feature-list {
    margin-top: 1.5rem;
    text-align: left;
}

.feature-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-item.highlight {
    font-weight: bold;
    color: #818cf8;
}

.interactive-item {
    cursor: pointer;
    transition: color 0.2s;
}

.interactive-item:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

/* Deep Dive (Static View) */
.static-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    height: 65vh;
    /* Fixed height for scrolling */
    margin-top: 1rem;
}

.static-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    overflow-y: auto;
    /* Allow scrolling inside panel */
    text-align: left;
    transition: all 0.3s;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) rgba(255, 255, 255, 0.1);
}

.static-panel::-webkit-scrollbar {
    width: 6px;
}

.static-panel::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
}

.static-panel:hover {
    background: rgba(255, 255, 255, 0.08);
}

.static-panel.defender {
    border-top: 4px solid #3b82f6;
}

.static-panel.purview {
    border-top: 4px solid #a855f7;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.panel-header .icon {
    font-size: 2.5rem;
}

.panel-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.static-panel .teaser {
    font-style: italic;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.side-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.static-content h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.static-content ul {
    list-style: none;
    padding: 0;
}

/* Comparison Rows Layout */
.comparison-rows {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comp-row {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1rem;
    transition: background 0.3s;
}

.comp-row:hover {
    background: rgba(0, 0, 0, 0.3);
}

.comp-side {
    flex: 1;
    font-size: 0.9rem;
    position: relative;
    padding-top: 1.5rem;
}

.comp-side h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.comp-side p {
    color: #94a3b8;
    line-height: 1.4;
    font-size: 0.85rem;
}

.comp-side.base {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 1rem;
    opacity: 0.8;
}

.comp-side.addon h4 {
    color: var(--accent-color);
}

.comp-side.addon p {
    color: #e2e8f0;
}

.comp-arrow {
    display: flex;
    align-items: center;
    color: var(--text-color);
    opacity: 0.3;
}

/* Badges */
.badg {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.badg.base {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.badg.addon {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-color);
}

.side.disabled .badg {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

/* Summary */
.summary-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    padding: 3rem;
    border-radius: 20px;
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-card p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* NIS2 Styles */
.nis2-panel.highlight-panel {
    border-color: var(--accent-color);
    background: rgba(56, 189, 248, 0.05);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}

.nis2-list li {
    margin-bottom: 1.5rem;
}

.check-list li {
    list-style: none;
    border-left: none;
    padding-left: 0;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.compliance-feature {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.compliance-feature strong {
    color: var(--accent-color);
    font-size: 1.1em;
}

.restart-btn {
    padding: 1rem 2rem;
    background: var(--accent-color);
    border: none;
    border-radius: 10px;
    color: #000;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.restart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-color);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    border: 1px solid var(--accent-color);
    z-index: 200;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s, transform 0.3s;
}

.check-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.check-list li:last-child {
    border-bottom: none;
}


.toast.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

/* Mobile Responsiveness */
/* Shiny Icon Effects */
.icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    overflow: hidden;
    /* Restored to mask the shine */
    border-radius: 12px;
    /* Restored */
    /* Ensure no background or box remains */
    background: transparent !important;
    padding: 0;
    box-shadow: none !important;
}

.shiny-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    display: block;
}

/* Mirror Reflection Effect */
.icon-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 40%,
            rgba(255, 255, 255, 0.7) 50%,
            rgba(255, 255, 255, 0.4) 60%,
            transparent 100%);
    transform: skewX(-25deg);
    z-index: 2;
    pointer-events: none;
    /* Animation handled by JS for randomness */
    left: -150%;
}

/* Class triggered by JS for random shines */
.icon-wrapper.shining::after {
    animation: shine 2s forwards;
}

/* Hover Effect: Change shine color and trigger immediately */
.static-panel:hover .icon-wrapper::after,
.card:hover .icon-wrapper::after {
    background: linear-gradient(120deg,
            transparent 0%,
            rgba(96, 165, 250, 0.4) 40%,
            /* Blue tint */
            rgba(129, 140, 248, 0.8) 50%,
            /* Indigo core */
            rgba(96, 165, 250, 0.4) 60%,
            transparent 100%);
    animation: shine 1s forwards;
}

@keyframes shine {
    0% {
        left: -150%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
        /* Stay out of view for the rest of the duration */
    }
}

/* Adjust panel header to accommodate larger icons */
.panel-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    body {
        overflow: hidden;
        /* Main body still hidden, content scrolls in slides */
    }

    .slide {
        padding: 4rem 1rem 6rem 1rem;
        /* Space for Top Lang and Bottom Nav */
        overflow-y: auto;
        display: block;
        /* Disable flex centering to allow scrolling */
        height: 100%;
    }

    .content-wrapper {
        min-height: 100%;
        /* Ensure content fills scrollable area */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .content-wrapper.centered {
        justify-content: center;
    }

    /* Typography */
    h1.main-title {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    /* Grids to Stacks */
    .cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .static-grid {
        grid-template-columns: 1fr;
        height: auto;
        /* Allow full expansion */
        overflow: visible;
    }

    .static-panel {
        overflow: visible;
        /* Show all content */
        max-height: none;
    }

    /* Fixed UI Elements adjustments */
    .lang-switch {
        top: 15px;
        right: 15px;
    }

    .creator-footer {
        left: 15px;
        bottom: 15px;
        font-size: 0.7rem;
    }

    .nav-buttons {
        right: 15px;
        bottom: 15px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
    }

    /* Slide 4 specific */
    .comp-row {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .comp-side {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 1rem;
        padding-right: 0;
    }

    .comp-side:last-child {
        border-bottom: none;
    }

    .comp-arrow {
        transform: rotate(90deg);
        justify-content: center;
        margin: 0.5rem 0;
    }

    /* Background shapes tone down */
    .shape {
        filter: blur(60px);
        opacity: 0.4;
    }
}