*{
    margin: 0%;
    padding: 0%;
    box-sizing: border-box;
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}
html,body{
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}
body{
    background: linear-gradient(135deg, #1F1E23 0%, #2C2B33 50%, #1F1E23 100%);
    color: #ffffff;
    position: relative;
}

/* Animated Background Particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%);
    animation: backgroundShift 10s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}

@keyframes backgroundShift {
    0% { transform: translateX(-20px) translateY(-20px); }
    100% { transform: translateX(20px) translateY(20px); }
}

/* Loading Screen */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1F1E23 0%, #2C2B33 50%, #1F1E23 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.spinner-ring:nth-child(1) {
    border-top: 4px solid #7F7CF8;
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    border-right: 4px solid #FF77C6;
    animation-delay: 0.3s;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

.spinner-ring:nth-child(3) {
    border-bottom: 4px solid #7F7CF8;
    animation-delay: 0.6s;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
}

.loading-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #7F7CF8, #FF77C6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.loading-progress {
    margin: 20px 0;
    width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7F7CF8, #FF77C6);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.loading-content p {
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Warning Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1F1E23 0%, #2a2930 50%, #1F1E23 100%);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.5s ease-in;
}

.warning-content {
    text-align: center;
    padding: 50px 40px;
    background: rgba(31, 30, 35, 0.95);
    border-radius: 25px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(127, 124, 248, 0.3);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
    position: relative;
    overflow: hidden;
}

.warning-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #7F7CF8, #FF77C6, #7F7CF8);
    background-size: 200% 100%;
    animation: borderGlow 2s linear infinite;
}

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.warning-icon {
    font-size: 80px;
    margin-bottom: 25px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(127, 124, 248, 0.3));
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.warning-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #7F7CF8, #FF77C6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.warning-content h3 {
    font-size: 20px;
    font-weight: 300;
    margin: 0 0 25px 0;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
}

.countdown-circle {
    width: 100px;
    height: 100px;
    border: 4px solid rgba(127, 124, 248, 0.3);
    border-top: 4px solid #7F7CF8;
    border-radius: 50%;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 30px rgba(127, 124, 248, 0.4);
}

.loading-bar {
    width: 250px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-fill {
    height: 100%;
    background: linear-gradient(90deg, #7F7CF8, #FF77C6);
    border-radius: 3px;
    animation: loading 5s linear forwards;
    box-shadow: 0 0 20px rgba(127, 124, 248, 0.5);
}

.visit-now-btn {
    background: linear-gradient(135deg, #7F7CF8 0%, #FF77C6 100%);
    color: #ffffff;
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.visit-now-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.visit-now-btn:hover::before {
    left: 100%;
}

.visit-now-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(127, 124, 248, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Show overlay only on mobile */
@media screen and (max-width: 768px) {
    #main {
        display: none; /* Hide main content on mobile until check is done */
    }
}
#main{
    position: relative;
    overflow: hidden;
}
#page{
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: transparent;
}
#page1{
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: transparent;
}
#page2{
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: transparent;
}
#page3{
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: transparent;
}
#page4{
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: transparent;
}
canvas{
    position: relative;
    z-index: 9;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

#loop{
    display: flex;
    position: absolute;
    top: 25%;
    height: 30%;
    width: 100%;
    font-size: 100px;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
    align-items: center;
    overflow: visible;
}
#loop>h1{
    font-weight: 700;
    animation: textSlide 15s linear infinite;
    background: linear-gradient(90deg, #ffffff, #7F7CF8, #FF77C6, #ffffff);
    background-size: 300% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textSlide 15s linear infinite, gradientShift 3s ease-in-out infinite;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    height: 100%;
}
#loop>h1>span{
    -webkit-text-stroke: 2px #7F7CF8;
    color: transparent;
    font-weight: 800;
    text-shadow: 0 0 30px rgba(127, 124, 248, 0.5);
}

@keyframes textSlide{
    0%{ transform: translateX(0%); }
    100%{ transform: translateX(-100%); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
#nav{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 7%;
    width: 100%;
    position: fixed;
    z-index: 99;
    padding: 0px 30px;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    transition: all 0.3s ease;
}

#nav:hover {
    background: rgba(31, 30, 35, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#nav>h3{
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 22px;
    letter-spacing: 1px;
}
#nav>h3>a{
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}
#nav>h3>a:hover{
    color: #7F7CF8;
    text-shadow: 0 0 20px rgba(127, 124, 248, 0.5);
}

#nav>h3>a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7F7CF8, #FF77C6);
    transition: width 0.3s ease;
}

#nav>h3>a:hover::after {
    width: 100%;
}

#nav>button{
    padding: 12px 24px;
    border-radius: 25px;
    background: linear-gradient(135deg, #7F7CF8 0%, #FF77C6 100%);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

#nav>button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

#nav>button:hover::before {
    left: 100%;
}

#nav>button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(127, 124, 248, 0.4);
}
#page>h3{
    position: absolute;
    top: 55%;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    color: rgba(255,255,255,0.8);
    left: 5%;
    right: 5%;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
#page>h4{
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: #7F7CF8;
    font-size: 16px;
    letter-spacing: 2px;
    animation: bounce 2s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(127, 124, 248, 0.5);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}
#page1>#right-text{
    position: absolute;
    top: 30%;
    left: 10%;
    background: rgba(127, 124, 248, 0.1);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(127, 124, 248, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 40px rgba(127, 124, 248, 0.2);
    transition: all 0.3s ease;
}

#page1>#right-text:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(127, 124, 248, 0.3);
    border-color: rgba(127, 124, 248, 0.5);
}

#page1>#right-text>h3{
    font-weight: 300;
    color: #7F7CF8;
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
}
#page1>#right-text>h1{
    line-height: 1.3;
    font-size: 50px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #7F7CF8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#page1>#left-text{
    position: absolute;
    top: 50%;
    right: 10%;
    text-align: end;
    background: rgba(255, 119, 198, 0.1);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 119, 198, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 40px rgba(255, 119, 198, 0.2);
    transition: all 0.3s ease;
}

#page1>#left-text:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(255, 119, 198, 0.3);
    border-color: rgba(255, 119, 198, 0.5);
}

#page1>#left-text>h1{
    font-size: 50px;
    line-height: 1.3;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #FF77C6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
#page1>#left-text>h3{
    color: #FF77C6;
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 15px;
}
#page2>#text1{
    position: absolute;
    top: 30%;
    left: 10%;
}
#page2>#text1>h3{
    color: rgba(255,255,255,0.75);
    font-weight: 400;
}
#page2>#text1>h1{
    font-size: 60px;
    line-height: 1.5;
}
#page2>#text2{
    position: absolute;
    top: 55%;
    right: 10%;
    text-align: end;
}
#page2>#text2>p{
    color: rgba(255,255,255,0.75);
    font-weight: 400;
}
#page3>#text3{
    position: absolute;
    top: 40%;
    right: 10%;
    text-align: end;
}
#page3>#text3>h3{
    color: rgba(255,255,255,0.75);
    font-weight: 400;
}
#page3>#text3>h1{
    font-size: 70px;

}
#page3>#text1{
    position: absolute;
    top: 30%;
    left: 10%;
}
#page3>#text1>h3{
    color: rgba(255,255,255,0.75);
    font-weight: 400;
}
#page3>#text1>h1{
    font-size: 60px;
    line-height: 1.5;
}
#page3>#text2{
    position: absolute;
    top: 55%;
    right: 10%;
    text-align: end;
}
#page3>#text2>p{
    color: rgba(255,255,255,0.75);
    font-weight: 400;
}
#page4>#text3{
    position: absolute;
    top: 40%;
    right: 10%;
    text-align: end;
}
#page4>#text3>h3{
    color: rgba(255,255,255,0.75);
    font-weight: 400;
}
#page4>#text3>h1{
    font-size: 70px;
}
#page4>#text3>h1>a{
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}
#page4>#text3>h1>a:hover{
    opacity: 0.7;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    canvas{
        position: relative;
        z-index: 9;
        max-width: 100vw;
        max-height: 50vh;
        width: 100% !important;
        height: 50vh !important;
        object-fit: cover;
        object-position: top;
    }
    
    #nav{
        padding: 0px 15px;
        height: 8%;
    }
    
    #nav>h3{
        font-size: 18px;
    }
    
    #nav>button{
        padding: 8px 15px;
        font-size: 12px;
    }
    
    #loop{
        font-size: 40px;
        top: 25%;
    }
    
    #page>h3{
        font-size: 14px;
        top: 50%;
        left: 5%;
        right: 5%;
        text-align: center;
    }
    
    #page>h4{
        font-size: 14px;
        top: 60%;
        left: 50%;
        transform: translateX(-50%);
    }
    
    #page1>#right-text, #page1>#left-text{
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        text-align: center;
        padding: 20px;
    }
    
    #page1>#right-text>h1, #page1>#left-text>h1{
        font-size: 35px;
        line-height: 1.3;
    }
    
    #page2>#text1, #page2>#text2{
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        text-align: center;
        padding: 20px;
    }
    
    #page2>#text1>h1{
        font-size: 40px;
        line-height: 1.3;
    }
    
    #page2>#text2>p{
        font-size: 14px;
        line-height: 1.5;
    }
    
    #page3>#text1, #page3>#text2{
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        text-align: center;
        padding: 20px;
    }
    
    #page3>#text1>h1{
        font-size: 40px;
        line-height: 1.3;
    }
    
    #page3>#text2>p{
        font-size: 14px;
        line-height: 1.5;
    }
    
    #page4>#text3{
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        text-align: center;
        padding: 20px;
    }
    
    #page4>#text3>h1{
        font-size: 45px;
        line-height: 1.3;
    }
    
    #page4>#text3>button{
        padding: 12px 25px;
        font-size: 14px;
    }
}