/* Welcome Animation Styles */

#welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    background-image: radial-gradient(circle at center, rgba(10, 132, 255, 0.1) 0%, transparent 70%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    overflow: hidden;
}

.welcome-content {
    text-align: center;
    color: white;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.welcome-text {
    position: absolute;
    font-size: 0;
    opacity: 0;
}

.welcome-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.creative-text {
    position: relative;
    font-family: 'Poppins', sans-serif;
    font-size: 6vw;
    font-weight: 800;
    color: transparent;
    text-align: center;
    line-height: 1.2;
    z-index: 10;
    transform-style: preserve-3d;
    perspective: 1000px;
}

@media (max-width: 768px) {
    .creative-text {
        font-size: 10vw;
    }
    
    .welcome-word {
        font-size: 1.4rem;
        letter-spacing: 4px;
        top: 25%;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
        bottom: 12%;
    }
    
    .border-container {
        width: 95%;
        height: 60%;
    }
}

.letter {
    display: inline-block;
    position: relative;
    opacity: 0;
    transform: scale(0.5) translateZ(-50px);
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
    margin: 0 1px;
}

.letter.visible {
    opacity: 1;
    transform: scale(1) translateZ(0);
}

.letter-inner {
    position: relative;
    display: inline-block;
}

.letter-front {
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #fff 0%, #0a84ff 50%, #6a11cb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    filter: drop-shadow(0 0 8px rgba(10, 132, 255, 0.5));
}

.letter-back {
    position: absolute;
    left: 0.1em;
    top: 0.1em;
    z-index: 1;
    color: rgba(0, 0, 0, 0.3);
}

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

.welcome-subtitle {
    position: absolute;
    bottom: 15%;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 1.2rem;
    opacity: 0;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    transition: opacity 1s ease 3s;
    text-shadow: 0 0 10px rgba(10, 132, 255, 0.5);
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(100,244,172,0.8), rgba(255,255,255,0.8));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientText 5s linear infinite;
}

/* Particle effects */
.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Spotlight effect */
.spotlight {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.8) 70%);
    opacity: 0;
    transition: opacity 2s ease;
    z-index: 2;
}

.spotlight.visible {
    opacity: 1;
}

/* Lines effect */
.lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
}

.line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(10, 132, 255, 0.2), transparent);
    height: 1px;
    width: 100%;
    transform-origin: left;
    animation: lineMove 8s linear infinite;
    opacity: 0;
}

@keyframes lineMove {
    0% { transform: translateX(-100%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* Glow effect for text */
.glow-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: blur(60px);
    opacity: 0.5;
    z-index: 0;
    background: radial-gradient(ellipse at center, rgba(10, 132, 255, 0.6) 0%, rgba(106, 17, 203, 0.4) 40%, transparent 70%);
    animation: glowPulse 6s ease-in-out infinite;
    transform-origin: center;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8) rotate(0deg); }
    50% { opacity: 0.6; transform: scale(1.2) rotate(15deg); }
}

/* Animated border */
.border-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    height: 70%;
    max-height: 500px;
    z-index: 3;
    opacity: 0;
    transition: opacity 1s ease;
    box-shadow: 0 0 30px rgba(10, 132, 255, 0.2);
}

.border-container.visible {
    opacity: 1;
}

.animated-border {
    position: absolute;
    background: linear-gradient(90deg, #0a84ff, #64f4ac, #6a11cb, #0a84ff);
    background-size: 200% 100%;
    animation: borderGradient 4s linear infinite;
    box-shadow: 0 0 15px rgba(10, 132, 255, 0.7);
}

.border-top, .border-bottom {
    height: 2px;
    width: 0%;
    transition: width 1.5s ease;
}

.border-left, .border-right {
    width: 2px;
    height: 0%;
    transition: height 1.5s ease;
}

.border-top { top: 0; left: 0; }
.border-right { top: 0; right: 0; }
.border-bottom { bottom: 0; right: 0; }
.border-left { bottom: 0; left: 0; }

.border-container.visible .border-top,
.border-container.visible .border-bottom {
    width: 100%;
}

.border-container.visible .border-left,
.border-container.visible .border-right {
    height: 100%;
}

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

/* Animation for the welcome overlay */
@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.welcome-hidden {
    animation: fadeOut 1s ease-in-out forwards;
}

/* Reveal text animation */
.reveal-text {
    position: relative;
    color: transparent;
    overflow: hidden;
}

.reveal-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #fff;
    animation: revealText 1.5s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes revealText {
    0% { left: 0; width: 0%; }
    50% { left: 0; width: 100%; }
    100% { left: 100%; width: 0%; }
}

/* Skip button */
.skip-button {
    position: absolute;
    bottom: 5%;
    right: 5%;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 100;
}

.skip-button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.skip-button.visible {
    opacity: 1;
}

/* Welcome text */
.welcome-word {
    position: absolute;
    font-size: 1.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 8px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
    top: 30%;
    text-shadow: 0 0 10px rgba(10, 132, 255, 0.5);
    width: 100%;
    text-align: center;
}

.welcome-word.visible {
    opacity: 1;
    transform: translateY(0);
}
