:root {
    --font-primary: 'Oswald', sans-serif;
    --font-secondary: 'Teko', sans-serif;
    --trans-speed: 0.7s;
    --bg-dark: #121212;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    height: 100vh;
    overflow: hidden;
    position: relative;
    color: #fff;
}

.overlay-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    pointer-events: none;
    mix-blend-mode: exclusion;
    opacity: 0;
    /* Changed for intro */
    transition: opacity 1.5s ease-in-out;
}

.floating-brand {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    /* Forces pure white */
    opacity: 0.9;
    transition: opacity 0.3s;
}

.floating-brand:hover {
    opacity: 1;
}

.accordion-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.panel {
    position: relative;
    height: 100%;
    flex: 0.5;
    /* Collapsed state flex value */
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    transition: flex var(--trans-speed) cubic-bezier(0.05, 0.61, 0.41, 0.95), transform 1s ease-out, opacity 1s ease-out;
    /* Added transform/opacity for intro */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);

    /* Intro Initial State */
    opacity: 0;
    transform: translateY(100px);
}

/* Visual Enhancements */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind content, above bg */
    pointer-events: none;
}

#cursor-light {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

.panel:last-child {
    border-right: none;
}

.panel:hover,
.panel.active {
    flex: 3;
    /* Expanded state flex value */
    z-index: 5;
    /* Bring to front */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    /* Deep shadow */
}

/* Backgrounds & Textures */
.panel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform var(--trans-speed);
    filter: brightness(0.6) grayscale(100%);
    z-index: -1;
}

.panel:hover .panel-bg,
.panel.active .panel-bg {
    filter: brightness(1) grayscale(0%);
    transform: scale(1.1);
}

/* Specific Panel Styles (Simulating tech textures with CSS gradients for speed) */
.panel-xll .panel-bg {
    /* Excel Green */
    background:
        radial-gradient(circle at 50% 50%, rgba(33, 115, 70, 0.2), transparent),
        linear-gradient(45deg, #0a2615, #1d6f42);
    border-right: 1px solid #1d6f42;
}

.panel-chm .panel-bg {
    /* CHM Warning Yellow & Construct Black */
    background:
        repeating-linear-gradient(45deg,
            rgba(0, 0, 0, 0.5),
            rgba(0, 0, 0, 0.5) 10px,
            transparent 10px,
            transparent 20px),
        linear-gradient(135deg, #FFD700, #1a1a00);
    border-right: 1px solid #FFD700;
}

.panel-lnk .panel-bg {
    /* Shortcut Blue */
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 164, 239, 0.2), transparent),
        linear-gradient(45deg, #001f3f, #0074D9);
    border-right: 1px solid #0074D9;
}

.panel-exe .panel-bg {
    /* System Binary (Silver/Grey/Red Accent) */
    background:
        radial-gradient(circle at 50% 50%, rgba(200, 200, 200, 0.1), transparent),
        linear-gradient(45deg, #1f1f1f, #4a4a4a);
    border-right: 1px solid #a0a0a0;
}

.panel-jar .panel-bg {
    /* Java Orange/Red */
    background:
        radial-gradient(circle at 50% 50%, rgba(248, 152, 29, 0.2), transparent),
        linear-gradient(45deg, #3d0e05, #d35400);
    border-right: 1px solid #d35400;
}

.panel-script .panel-bg {
    /* Script Teal/Cyan */
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.15), transparent),
        linear-gradient(45deg, #051a1a, #008080);
    border-right: 1px solid #008080;
}

.panel-number.small-text {
    font-size: 3rem;
    /* Smaller font for multiple extensions */
    margin-bottom: 2rem;
    transform: translateX(-20px);
    opacity: 0.4;
    white-space: nowrap;
}

/* Content */
.panel-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    transition-delay: 0.1s;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
    width: 100%;
    /* Keep content hidden unless expanded */
    display: none;
}

.panel:hover .panel-content,
.panel.active .panel-content {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.panel-number {
    font-family: var(--font-secondary);
    font-size: 8rem;
    line-height: 1;
    font-weight: 300;
    opacity: 0.2;
    margin-bottom: -20px;
    transform: translateX(-50px);
    transition: transform 0.5s;
}

.panel:hover .panel-number {
    transform: translateX(0);
}

.panel-title {
    font-size: 4rem;
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    position: relative;
}

.panel-desc {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 1rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.btn-arrow {
    display: inline-block;
    border: 1px solid #fff;
    padding: 10px 20px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.btn-arrow:hover {
    background: #fff;
    color: #000;
}

/* Vertical Label (Visible when collapsed) */
.vertical-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 1.5rem;
    /* Slightly larger for readability */
    font-weight: 700;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    transform-origin: center center;
    width: 60vh;
    /* Ensure container is wide enough before rotation */
    text-align: center;
}

.panel:hover .vertical-label,
.panel.active .vertical-label {
    opacity: 0;
}

/* Responsive */
@media (max-width: 800px) {
    .accordion-container {
        flex-direction: column;
    }

    .panel {
        width: 100%;
        height: auto;
        flex: 1;
        /* Collapsed state on mobile */
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        min-height: 60px;
        /* Ensure clickable area */
    }

    .panel:hover,
    .panel.active {
        flex: 8;
        /* Larger expansion on mobile to show content */
    }

    .vertical-label {
        transform: translate(-50%, -50%) rotate(0deg);
        bottom: auto;
        top: 50%;
        left: 50%;
        font-size: 1rem;
        width: auto;
    }

    .panel-title {
        font-size: 2.5rem;
    }

    .panel-content {
        padding: 1rem;
    }

    .panel-desc {
        font-size: 1.1rem;
    }

    #cursor-light {
        display: none;
        /* Disable cursor light on mobile for performance */
    }
}

/* Footer Styling */
.overlay-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 200;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links .sep {
    color: #444;
    margin: 0 10px;
}

.footer-copy {
    color: #555;
    text-transform: uppercase;
}

/* Legal Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    /* Controlled by JS */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    transition: opacity 0.5s;
}

.modal-content {
    background: #0a0a0a;
    border: 1px solid #333;
    width: 90%;
    max-width: 600px;
    padding: 0;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    animation: modalSlide 0.5s ease-out;
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: #111;
    padding: 20px 30px;
    border-bottom: 1px solid #333;
}

.modal-header h2 {
    color: #ff3333;
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.modal-body {
    padding: 30px;
    color: #ccc;
    font-family: sans-serif;
    line-height: 1.6;
    font-size: 0.95rem;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body .highlight {
    color: #fff;
    font-weight: bold;
    letter-spacing: 1px;
    border-left: 3px solid #ff3333;
    padding-left: 10px;
    margin-bottom: 20px;
}

.modal-body .warning {
    color: #ff3333;
    font-size: 0.8rem;
    margin-top: 20px;
    text-align: center;
    letter-spacing: 2px;
    font-weight: bold;
}

.modal-body ul {
    list-style: none;
    margin-bottom: 20px;
    padding-left: 10px;
}

.modal-body ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.modal-body ul li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: #ff3333;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #0e0e0e;
}

.modal-footer button {
    padding: 12px 25px;
    cursor: pointer;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
}

#btn-decline {
    background: transparent;
    color: #666;
    border: 1px solid #333;
}

#btn-decline:hover {
    color: #fff;
    border-color: #666;
}

#btn-accept {
    background: #fff;
    color: #000;
}

#btn-accept:hover {
    background: #ccc;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
    .overlay-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}