* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Chakra Petch', sans-serif;
    background-color: #040814;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #040814;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loader-logo {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(227, 10, 23, 0.6);
    animation: pulseLogo 1.5s infinite alternate;
}

.loader-bar-container {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #e30a17;
    animation: loadingScan 1.5s ease-in-out infinite;
}

.loader-text {
    font-size: 12px;
    color: #00c2cb;
    letter-spacing: 2px;
    animation: blinkText 1s infinite;
}

.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

.glowing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    opacity: 0.4;
    animation: floatOrb 12s infinite alternate ease-in-out;
}

.orb-1 {
    width: 350px;
    height: 350px;
    background: #e30a17;
    top: 5%;
    left: 10%;
}

.orb-2 {
    width: 450px;
    height: 450px;
    background: #0056b3;
    bottom: 5%;
    right: 5%;
    animation-delay: -6s;
}

.national-card {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 420px;
    background: rgba(10, 18, 40, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 45px 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    opacity: 0;
    transform: translateY(20px);
    animation: cardEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 1.8s;
}

.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #e30a17, #00c2cb);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.logo-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: #0a1228;
    border: 2px solid #e30a17;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
    transform: rotate(45deg);
    box-shadow: 0 0 25px rgba(227, 10, 23, 0.25);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.national-card:hover .logo-wrapper {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 0 35px rgba(0, 194, 203, 0.4);
    border-color: #00c2cb;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    transform: rotate(-45deg);
    letter-spacing: 1px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.national-card:hover .logo-text {
    transform: rotate(0deg);
}

h1 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

p {
    font-size: 15px;
    color: #8a9bbd;
    margin-bottom: 35px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.link-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tech-btn {
    display: block;
    text-decoration: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.btn-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    position: relative;
    z-index: 2;
}

.btn-icon {
    font-size: 20px;
    margin-right: 15px;
    color: #00c2cb;
    width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
}

.tech-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #e30a17;
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom;
    z-index: 3;
}

.tech-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-20deg);
    transition: none;
    z-index: 1;
}

.tech-btn:hover {
    background: linear-gradient(90deg, rgba(227, 10, 23, 0.15), rgba(0, 194, 203, 0.05));
    border-color: rgba(227, 10, 23, 0.5);
    transform: translateX(8px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tech-btn:hover .btn-icon {
    color: #e30a17;
    text-shadow: 0 0 10px rgba(227, 10, 23, 0.5);
    transform: scale(1.1);
}

.tech-btn:hover::before {
    transform: scaleY(1);
}

.tech-btn:hover::after {
    left: 200%;
    transition: all 0.7s ease-in-out;
}

.tech-btn.connecting {
    background: rgba(227, 10, 23, 0.15);
    border-color: #e30a17;
    transform: scale(0.98);
    box-shadow: inset 0 0 20px rgba(227, 10, 23, 0.3);
    pointer-events: none;
}

.tech-btn.connecting::before {
    transform: scaleY(1);
    width: 100%;
    background: rgba(227, 10, 23, 0.2);
    z-index: 1;
}

.tech-btn.connecting .btn-content {
    justify-content: center;
}

.tech-btn.connecting .btn-icon {
    color: #ffffff;
    margin-right: 10px;
}

.tech-btn.connecting .btn-text {
    color: #ffffff;
    font-size: 15px;
}

.pulse-icon {
    animation: iconPulse 1s infinite alternate;
}

.blink-text {
    animation: blinkText 0.8s infinite;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 60px) scale(1.1); }
}

@keyframes pulseLogo {
    0% { opacity: 0.6; text-shadow: 0 0 10px rgba(227, 10, 23, 0.4); }
    100% { opacity: 1; text-shadow: 0 0 25px rgba(227, 10, 23, 0.9); }
}

@keyframes loadingScan {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes blinkText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes iconPulse {
    0% { transform: scale(0.9); text-shadow: 0 0 5px rgba(255,255,255,0.5); }
    100% { transform: scale(1.2); text-shadow: 0 0 15px rgba(255,255,255,1); }
}

@keyframes cardEntrance {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}