*{
    margin: 0%;
    padding: 0%;
    box-sizing: border-box;
    font-family: gilroy;
}

/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.8s ease-out;
    backdrop-filter: blur(10px);
}

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

#loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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%),
        radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.3) 70%);
    pointer-events: none;
    animation: backgroundShift 6s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

#loading-text {
    width: 400px;
    height: 80px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    animation: slideUpAndGlow 5s ease-out forwards;
    transform: translateY(80px);
    opacity: 0;
}

#loading-text text {
    font-family: 'Gilroy', Arial, sans-serif;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 3px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: strokeAnimation 5s ease-out forwards;
}

@keyframes slideUpAndGlow {
    0% {
        transform: translateY(80px);
        opacity: 0;
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    }
    20% {
        transform: translateY(60px);
        opacity: 0.3;
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    }
    50% {
        transform: translateY(30px);
        opacity: 0.7;
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
    }
    80% {
        transform: translateY(0);
        opacity: 1;
        filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.7));
    }
    100% {
        transform: translateY(0);
        opacity: 1;
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.9));
    }
}

@keyframes strokeAnimation {
    0% {
        stroke-dashoffset: 400;
        stroke: rgba(255, 255, 255, 0.3);
    }
    30% {
        stroke-dashoffset: 300;
        stroke: rgba(255, 255, 255, 0.6);
    }
    60% {
        stroke-dashoffset: 150;
        stroke: rgba(248, 248, 248, 0.8);
    }
    90% {
        stroke-dashoffset: 0;
        stroke: #fff;
    }
    100% {
        stroke-dashoffset: -30;
        stroke: #f0f0f0;
    }
}

/* Responsive adjustments for loading screen */
@media (max-width: 768px) {
    #loading-text {
        width: 300px;
        height: 60px;
    }
    
    #loading-text text {
        font-size: 22px;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    #loading-text {
        width: 250px;
        height: 50px;
    }
    
    #loading-text text {
        font-size: 18px;
        letter-spacing: 1px;
    }
}

html,body{
    background: #f1f1f1;
    height: 100%;
    width: 100%;
}
#main{
    position: relative;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.5s ease-in;
    min-height: 100vh;
    visibility: visible;
    pointer-events: auto;
}

#main.loading {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
#page{
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: #f1f1f1;
}
#page1{
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: #f1f1f1;
}
#page2{
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: #f1f1f1;
}
#page3{
    position: relative;
    height: 100vh;
    width: 100vw;
    background-color: #f1f1f1;
    pointer-events: auto;
}
canvas{
    position: relative;
    z-index: 9;
    max-width: 100vw;
    max-height: 100vh;
    display: block;
    object-fit: contain;
    width: 100%;
    height: 100%;
}

/* Ensure canvas maintains aspect ratio on different screen sizes */
@media (max-width: 768px) {
    canvas {
        width: 100vw;
        height: 100vh;
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    canvas {
        width: 100vw;
        height: 100vh;
        object-fit: contain;
    }
}
#loop{
    display: flex;
    position: absolute;
    top: 40%;
    height: 25%;
    width: 100%;
    font-size: 100px;
    white-space: nowrap;
    font-family: gilroy;
}
#loop>h1{
    font-weight: 400;
    animation-name: anim;
    animation-duration: 25s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
#loop>h1>span{
    /* -webkit-text-stroke: 1.2px #000; */
    color: #505242;
    font-weight: 500;
}
@keyframes anim{
    0%{
        transform: translateX(0%);
    }
    100%{
        transform: translateX(-100%);
    }
}
#nav{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 7%;
    width: 100%;
    position: fixed;
    z-index: 99;
    padding: 0px 30px;
}
#nav>h3{
    font-family: gilroy;
    font-weight: 400;
    font-size: 22px;
}
#nav>button{
    padding: 10px 20px;
    border-radius: 50px;
    background-color: #000;
    color: #fff;
    border: none;
}
#page>h3{
    position: absolute;
    top: 78%;
    font-family: gilroy;
    font-weight: 400;
    color: #505242;
    left: 5%;
}
#page>h4{
    position: absolute;
    top: 85%;
    left: 15%;
    font-family: gilroy;
    font-weight: 500;
}
#page1>#right-text{
    position: absolute;
    top: 68%;
    left: 5%;
}
#page1>#right-text>h3{
    font-weight: 400;
    color: #505242;
}
#page1>#right-text>h1{
    line-height: 1.5;
    font-size: 50px;
}
#page1>#left-text{
    position: absolute;
    top: 28%;
    right: 5%;
    text-align: end;
}
#page1>#left-text>h1{
    font-size: 70px;
    line-height: 1.5;
}
#page1>#left-text>h3{
    color: #505242;
    font-weight: 400;
}
#page2>#text1{
    position: absolute;
    top: 60%;
    left: 5%;
}
#page2>#text1>h3{
    color: #505242;
    font-weight: 400;
}
#page2>#text1>h1{
    font-size: 50px;
    line-height: 1.5;
}
#page2>#text2{
    position: absolute;
    top: 53%;
    right: 5%;
    text-align: end;
}
#page2>#text2>p{
    color: #505242;
    font-weight: 400;
}
#page3>#text2{
    position: absolute;
    top: 38%;
    font-family: gilroy;
    font-weight: 400;
    color: #505242;
    left: 5%;
    width: 35%;
}
#page3>#text2>p{
    color: #505242;
    font-weight: 400;
}
#page3>#text3{
    position: absolute;
    top: 60%;
    right: 10%;
    text-align: end;
}
#page3>#text3>h3{
    color: #505242;
    font-weight: 400;
}
#page3>#text3>h1{
    font-size: 70px;

}

/* Social Links Styling */
#page3>#text1{
    position: absolute !important;
    top: 92% !important;
    left: 5% !important;
    z-index: 9998 !important;
    pointer-events: auto !important;
}

#page3>#text1>h3{
    color: #505242;
    font-weight: 400;
    margin-bottom: 30px;
}

.social-links {
    display: flex !important;
    gap: 25px !important;
    align-items: center !important;
    position: relative !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
}

.social-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    color: #000 !important;
    padding: 8px !important;
    transition: all 0.3s ease !important;
    border-radius: 50% !important;
    position: relative !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    min-width: 46px !important;
    min-height: 46px !important;
}

.social-link:hover {
    color: #505242 !important;
    background-color: rgba(89, 90, 82, 0.2) !important;
    transform: translateY(-3px) scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.social-link:active {
    transform: translateY(-1px) scale(1.05) !important;
    background-color: rgba(89, 90, 82, 0.3) !important;
}

.social-link svg {
    transition: transform 0.3s ease;
}

.social-link:hover svg {
    transform: scale(1.2);
}

.social-link span {
    font-family: gilroy;
}

/* Fixed Social Overlay - Show only on page3 */
#social-overlay {
    position: fixed !important;
    bottom: 30px !important;
    left: 30px !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 15px !important;
    border-radius: 50px !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) !important;
    transition: all 0.3s ease !important;
}

.fixed-social-links {
    display: flex !important;
    gap: 15px !important;
    align-items: center !important;
    justify-content: center !important;
}

.fixed-social-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50px !important;
    height: 50px !important;
    background: #fff !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    color: #333 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 100000 !important;
    pointer-events: auto !important;
}

.fixed-social-link:hover {
    transform: translateY(-5px) scale(1.1) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    background: #505242 !important;
    color: #fff !important;
    border-color: #505242 !important;
}

.fixed-social-link:active {
    transform: translateY(-3px) scale(1.05) !important;
}

.fixed-social-link svg {
    width: 24px !important;
    height: 24px !important;
    transition: all 0.3s ease !important;
}

.fixed-social-link:hover svg {
    transform: scale(1.1) !important;
}

/* Show overlay only when page3 is in view */
#social-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

#social-overlay.hide {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) !important;
}