/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, #1988FF 0%, #0b0f2b 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.8s ease-in-out;
}

.splash-screen.hide {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

/* Animated Background */
.splash-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="100" r="2" fill="rgba(255,255,255,0.3)"><animate attributeName="cy" values="100;0" dur="8s" repeatCount="indefinite" /><animate attributeName="opacity" values="0.3;1;0.3" dur="2s" repeatCount="indefinite"/></circle><circle cx="80" cy="110" r="1.5" fill="rgba(255,255,255,0.4)"><animate attributeName="cy" values="110;0" dur="10s" repeatCount="indefinite" /><animate attributeName="opacity" values="0.4;1;0.4" dur="3s" repeatCount="indefinite"/></circle><circle cx="30" cy="120" r="1" fill="rgba(255,255,255,0.5)"><animate attributeName="cy" values="120;0" dur="9s" repeatCount="indefinite" /><animate attributeName="opacity" values="0.5;1;0.5" dur="2.5s" repeatCount="indefinite"/></circle><circle cx="70" cy="130" r="2.5" fill="rgba(255,255,255,0.2)"><animate attributeName="cy" values="130;0" dur="7s" repeatCount="indefinite" /><animate attributeName="opacity" values="0.2;0.8;0.2" dur="1s" repeatCount="indefinite"/></circle></svg>') repeat;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}


/* Logo Animation */
.logo-splash {
    width: 150px;
    height: 150px;
    background-color: #c2c2c2;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 30px 4px rgba(0, 0, 0, 0.5) inset,
        0 5px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    /* Thêm flexbox để căn giữa text */
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-splash::before,
.logo-splash:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 45%;
    top: -40%;
    background-color: #fff;
    animation: wave 5s linear infinite;
}

.logo-splash:before {
    border-radius: 30%;
    background: rgba(255, 255, 255, 0.4);
    animation: wave 5s linear infinite;
}

.logo-text {
    position: relative;
    z-index: 2;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 12px 44px rgba(0, 0, 0, 0.3);
    /* Đảm bảo text không bị co giãn */
    flex-shrink: 0;
}

@keyframes wave {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* Welcome Text */
.welcome-text {
    margin-top: 24px;
    color: white;
    text-align: center;
    margin-bottom: 40px;
    animation: slideUp 1s ease-out 0.5s both;
    padding-inline: 20px;
}

.welcome-text h1 {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-text span {
    font-size: 4rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
    background: #ffffff;
    background-clip: text;
}

.welcome-text p {
    color: aliceblue;
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    padding-inline: 40px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Start Button */
.start-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #667eea;
    background: linear-gradient(45deg, #fff, #f8f9ff);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideUp 1s ease-out 1s both;
    position: relative;
    overflow: hidden;
}

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

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #f8f9ff, #fff);
}

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

.start-btn:active {
    transform: translateY(-1px);
}

/* Main Content */
/* .main-content {
            opacity: 0;
            transition: opacity 1s ease-in-out 0.3s;
            padding: 40px;
            text-align: center;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .main-content.show {
            opacity: 1;
        }

        .main-content h1 {
            color: #333;
            font-size: 2.5rem;
            margin-bottom: 20px;
            animation: fadeInUp 1s ease-out;
        }

        .main-content p {
            color: #666;
            font-size: 1.2rem;
            max-width: 600px;
            line-height: 1.6;
            animation: fadeInUp 1s ease-out 0.2s both;
        }*/

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animation {
  font: bold 200% Consolas, Monaco, monospace;
  border-right: .1em solid black; /* Tạo hiệu ứng con trỏ nhấp nháy */
  width: 28ch; /* <-- THAY ĐỔI: Chiều rộng bằng đúng 28 ký tự */
  
  white-space: nowrap; /* Giữ văn bản trên một dòng */
  overflow: hidden; /* Ẩn các ký tự chưa xuất hiện */

  /* Dành cho trình duyệt cũ (WebKit) */
  -webkit-animation: typing 3s steps(28, end) forwards /* <-- THAY ĐỔI: 3s và 28 bước */
	                   blink-caret .75s step-end infinite alternate;
  
  /* Tiêu chuẩn cho trình duyệt hiện đại */
  animation: typing 3s steps(28, end), /* <-- THAY ĐỔI: 3s và 28 bước */
	           blink-caret .75s step-end infinite alternate;
}

/* Keyframes cho hiệu ứng gõ chữ */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 28ch; /* <-- THAY ĐỔI: Phải khớp với width ở trên */
  }
}

@-webkit-keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 28ch; /* <-- THAY ĐỔI: Phải khớp với width ở trên */
  }
}

/* Keyframes cho con trỏ nhấp nháy */
@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: rgb(255, 255, 255);
  }
}

@-webkit-keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: rgb(255, 255, 255);
  }
}


/* Loading Animation */
/* .loading {
    margin-top: 30px;
    animation: slideUp 1s ease-out 1.5s both;
}

.loading-dots {
    display: flex;
    gap: 5px;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: loadingDot 1.4s infinite both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingDot {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
} */

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-text h1 {
        font-size: 2rem;
    }

    .welcome-text p {
        font-size: 1rem;
    }

    .start-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .logo {
        width: 100px;
        height: 100px;
    }

    .logo::before {
        font-size: 40px;
    }
}