* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Oswald', sans-serif;
    background: #000;
    overflow: hidden;
    position: relative;
}

/* Vanta background container */
#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Three.js scene container */
#scene {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Navigation */
.nav {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.navItems {
    padding: 12px 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: ghostwhite;
    border: none;
    border-bottom: 2px solid ghostwhite;
    font-size: 16px;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: inherit;
    backdrop-filter: blur(10px);
}

.navItems:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* MultiWindow Toggle Switch - Top Right */
.multiwindow-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 12px 20px;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid ghostwhite;
}

.toggle-tooltip {
    position: fixed;
    top: 70px;
    right: 20px;
    padding: 12px 16px;
    background-color: rgba(0, 0, 0, 0.9);
    color: ghostwhite;
    font-size: 12px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-bottom: 2px solid ghostwhite;
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
}

.multiwindow-toggle:hover .toggle-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.toggle-label {
    color: ghostwhite;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
}

.switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 18px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.4s;
    border-radius: 24px;
    border: 1px solid ghostwhite;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 4px;
    bottom: 2px;
    background-color: ghostwhite;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

input:checked + .slider {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: ghostwhite;
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: #000;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.slider:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Hamburger Menu for Mobile */
.nav-toggle {
    display: none;
    background-color: rgba(0, 0, 0, 0.7);
    color: ghostwhite;
    border: none;
    border-bottom: 2px solid ghostwhite;
    padding: 12px 20px;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

/* Typewriter Section */
.typewriter {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    width: 90%;
    max-width: 1200px;
    text-align: center;
    
}

.typewriter h1 {
    overflow: hidden;
    border-right: 2px solid ghostwhite;
    white-space: nowrap;
    margin: 0 auto;
    font-size: clamp(24px, 5vw, 40px);
    letter-spacing: 0.15em;
    animation: typing 2.5s steps(40, end), blink-caret 1s step-end infinite;
    color: ghostwhite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    display: inline-block;
}

.typewriter p {
    color: #ffffff;
    font-size: clamp(16px, 2.5vw, 18px);
    margin-top: 20px;
    text-align: center;
    letter-spacing: 0.1em;
    font-family: 'Oswald', sans-serif;
    text-shadow: 0 0 20px rgb(255, 255, 255);
    line-height: 1.6;
    width: 90%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 2s ease-in-out;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: ghostwhite; }
}

/* Custom Alert Styles */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.custom-alert-overlay.show {
    opacity: 1;
}

.custom-alert-box {
    background-color: transparent;
    border: none;
    border-radius: 10px;
    padding: 30px 40px;
    text-align: center;
    backdrop-filter: blur(100px);
    transform: scale(0.7);
    transition: transform 1s ease-in-out;
    animation: pulse 1s ease-in-out infinite;
    width: 90%;
    max-width: 500px;
}

.custom-alert-overlay.show .custom-alert-box {
    transform: scale(1);
}

.custom-alert-message {
    color: ghostwhite;
    font-size: clamp(18px, 3vw, 24px);
    letter-spacing: 0.1em;
    font-family: 'Oswald', sans-serif;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
    margin: 0;
}

.custom-alert-subtext {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(14px, 2vw, 16px);
    letter-spacing: 0.05em;
    margin-top: 15px;
    font-family: 'Oswald', sans-serif;
}

@keyframes pulse {
    from, to { border-color: transparent; }
    50% { border-color: ghostwhite; }
}

/* Media Queries */

/* Tablet Portrait */
@media screen and (max-width: 1024px) {
    .nav {
        left: 10px;
        top: 10px;
    }
    
    .multiwindow-toggle {
        right: 10px;
        top: 10px;
        padding: 10px 15px;
    }
    
    .toggle-label {
        font-size: 12px;
    }
    
    .switch {
        width: 45px;
        height: 22px;
    }
    
    .slider:before {
        height: 16px;
        width: 16px;
    }
    
    input:checked + .slider:before {
        transform: translateX(23px);
    }
    
    .navItems {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Mobile Landscape */
@media screen and (max-width: 1250px) {
    body {
        overflow-y: auto;
    }
    
    /* Show hamburger menu */
    .nav-toggle {
        display: block;
    }
    
    .nav {
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        padding: 10px;
        border-radius: 10px;
        max-height: 60px;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav.active {
        max-height: 400px;
    }
    
    .navItems {
        width: 100%;
        margin: 5px 0;
        display: none;
    }
    
    .nav.active .navItems {
        display: block;
    }
    
    .multiwindow-toggle {
        display: none;
    }
    
    .toggle-tooltip {
        display: none;
    }
    
    .typewriter h1 {
        font-size: clamp(20px, 6vw, 32px);
        white-space: normal;
        border-right: none;
        animation: fadeIn 2s ease-in-out;
    }
}

/* Mobile Portrait */
@media screen and (max-width: 480px) {
    .typewriter h1 {
        font-size: clamp(18px, 7vw, 28px);
        letter-spacing: 0.1em;
    }
    
    .typewriter p {
        font-size: 14px;
        padding: 15px;
    }
    
    .navItems {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .multiwindow-toggle {
        padding: 6px 10px;
    }
    
    .toggle-label {
        font-size: 9px;
    }
    
    .switch {
        width: 35px;
        height: 18px;
    }
    
    .slider:before {
        height: 12px;
        width: 12px;
    }
    
    input:checked + .slider:before {
        transform: translateX(17px);
    }
}

/* Very Small Devices */
@media screen and (max-width: 320px) {
    .typewriter h1 {
        font-size: 20px;
    }
    
    .typewriter p {
        font-size: 12px;
        padding: 10px;
    }
    
    .custom-alert-message {
        font-size: 16px;
    }
    
    .custom-alert-subtext {
        font-size: 12px;
    }
    
    .multiwindow-toggle {
        padding: 5px 8px;
    }
    
    .toggle-label {
        font-size: 8px;
    }
}