/* ===============================
   PRELOADER
================================ */

#preloader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #0b1f2a, #060b10);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hide {
    opacity: 0;
    visibility: hidden;
}

#preloader p {
    margin-top: 24px;
    font-size: 14px;
    letter-spacing: 2px;
    color: hsl(185, 100%, 50%);
    text-transform: uppercase;
    opacity: 0.85;
}

/* Loader animation */
.loader {
    display: flex;
    gap: 12px;
}

.loader span {
    width: 14px;
    height: 14px;
    background: hsl(185, 100%, 50%);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
    box-shadow: 0 0 15px hsla(185, 100%, 50%, 0.8);
}

.loader span:nth-child(1) {
    animation-delay: 0s;
}

.loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {

    0%,
    80%,
    100% {
        transform: scale(0.4);
        opacity: 0.3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}


/* ========================================
   Footer
   ======================================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 4rem 0 1rem;
}

.footer-grid {
    display: grid;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 3fr 1fr 1fr;
    }
}

.footer-brand p {
    color: var(--muted-foreground);
    margin-top: 1rem;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    border-radius: var(--radius);
    color: var(--muted-foreground);
    transition: all 0.2s ease;
}

.social-links a:hover {
    color: var(--primary);
    background: hsla(220, 20%, 14%, 0.8);
}

.footer-links h4 {
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
}

.footer-links a {
    color: var(--muted-foreground);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links p {
    color: var(--muted-foreground);
    transition: color 0.2s ease;
}


.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-bottom p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: var(--primary);
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: hsla(220, 20%, 10%, 0.5);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid hsla(220, 20%, 18%, 0.5);
    padding: 0.75rem 0;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    -webkit-text-fill-color: var(--foreground);
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--muted-foreground);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-cta {
    display: none;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--foreground);
}

.menu-icon {
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--foreground);
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--foreground);
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    top: 8px;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: #000;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    z-index: 100;
}

.mobile-menu.active {
    display: flex;
}

.mob-menu-main {
    display: flex;
    flex-direction: column;
}

.mob-menu-main .logo {
    position: absolute;
    bottom: 0;
}

.mobile-menu-close {
    position: absolute;
    top: 4%;
    right: 4%;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #ffffff20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu a {
    color: var(--muted-foreground);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    display: block;
}

.mobile-menu a:hover {
    color: var(--primary);
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }

    .nav-cta {
        display: inline-flex;
    }

    .mobile-menu-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    nav .nav-btn {
        display: none;
    }
}

/* popup */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 15px;
}

.form-group label {
    font-weight: 500;
    color: var(--foreground);
}

.form-group input,
.form-group select {
    padding: 0.75rem 1rem;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input::placeholder {
    color: var(--muted-foreground);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.form-group select option {
    background: var(--card);
    color: var(--foreground);
}

/* BACKDROP */
.custom-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow-y: auto;
    padding: 10px;
}

/* MAIN BOX */
.modal-box {
    display: flex;
    width: 900px;
    max-width: 95%;
    max-height: 90vh;
    background: var(--card);
    border-radius: var(--radius);
    overflow: auto;
    border: 1px solid var(--border);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.1);
    animation: fadeIn 0.4s ease;
    position: relative;
}

/* LEFT SIDE */
.modal-left {
    flex: 1;
    padding: 40px;
    background: linear-gradient(135deg,
            rgba(0, 255, 255, 0.1),
            rgba(140, 0, 255, 0.1));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* MAIN TEXT */
.modal-left .main-text {
    margin-bottom: 20px;
    color: var(--muted-foreground);
}

/* FEATURES CONTAINER */
.features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

/* EACH ITEM */
.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: 0.3s;
}

/* ICON */
.feature-item i {
    color: var(--primary);
    font-size: 18px;
}

/* TEXT */
.feature-item span {
    font-size: 14px;
}

/* HOVER EFFECT */
.feature-item:hover {
    transform: translateX(5px);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

/* RIGHT SIDE */
.modal-right {
    flex: 1;
    padding: 40px;
}

.modal-right h3 {
    margin-bottom: 20px;
}

/* FORM */
.modal-right input {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
    font-size: 14px;
}

.modal-right input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.modal-right select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--background);
    font-size: 14px;
}

.modal-right select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.register-select {
    color: #8fa3b8 !important;
}

.register-select.active {
    color: #fff !important;
}


.error-msg {
    display: block;
    color: red;
    font-size: 12px;
    margin-top: 6px;
    margin-bottom: 10px;
}

input.error,
select.error {
    border: 1px solid red !important;
}

/* BUTTON */
.modal-right button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 20px;
}

.modal-right button:hover {
    transform: scale(1.05);
}

/* CLOSE BUTTON */
.close-btn-main {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}

.close-btn-main:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.close-btn {
    font-size: 22px;
    color: var(--foreground);
}

/* ANIMATION */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* TABLET */
@media (max-width: 768px) {

    .modal-box {
        flex-direction: column;
        width: 95%;
        max-height: 95vh;
    }

    .modal-left {
        padding: 20px;
        text-align: center;
        align-items: center;
    }

    .modal-left img {
        margin-bottom: 10px;
    }

    .modal-left h2 {
        font-size: 22px;
    }

    .modal-left p {
        font-size: 14px;
    }

    .modal-right {
        padding: 20px;
    }

    .modal-right h3 {
        font-size: 20px;
        text-align: center;
    }

    .modal-right input {
        padding: 10px;
        font-size: 14px;
    }

    .modal-right button {
        padding: 10px;
        font-size: 14px;
    }

    .close-btn-main {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
    }

    .close-btn {
        font-size: 18px;
    }

    /* Mobile animation */
    .modal-box {
        animation: slideUpMobile 0.4s ease;
    }
}

/* SMALL MOBILE */
@media (max-width: 480px) {

    .modal-left h2 {
        font-size: 18px;
    }

    .modal-left p {
        font-size: 13px;
    }

    .modal-right h3 {
        font-size: 18px;
    }

    .modal-box {
        border-radius: 10px;
    }
}

/* MOBILE SLIDE ANIMATION */
@keyframes slideUpMobile {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* popup */


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    background: hsla(185, 100%, 50%, 0.9);
    color: var(--primary-foreground);
}

.btn-gradiant {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.btn-gradiant:hover {
    background: linear-gradient(135deg,
            color-mix(in srgb, var(--primary) 90%, transparent),
            color-mix(in srgb, var(--accent) 90%, transparent));
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background: var(--secondary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-md {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}