/* RESET */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: #0b1020;
    color: #fff;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* --------------- PARTICLES ---------------------- */
#particles {
    position: fixed;
    inset: 0;
    z-index: -1;
}

/* --------------- HEADER ---------------------- */
.header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    padding: 14px 24px;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(12px);
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}


.logo-wrap img {
    height: 40px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(90deg, #4cc9f0, #ff8efb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav a {
    margin-left: 16px;
    color: #fff;
    text-decoration: none;
}

/* --------------- HERO ---------------------- */
.hero {
    min-height: 40vh;
    text-align: center;
    padding: 120px 20px;
}

.gradient-text {
    background: linear-gradient(90deg, #4cc9f0, #7cf2c2, #ff8efb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing {
    color: #4cc9f0;
    min-height: 28px;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* --------------- APP AND GAME ---------------------- */
/* SECTIONS */
.section {
    padding: 60px 20px;
}

/* HORIZONTAL SCROLL */
.scroll-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
}

.row::-webkit-scrollbar {
    display: none;
}

/* ARROWS */
.arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #151b30;
    color: #4cc9f0;
    cursor: pointer;
}

/* CARD */
.card {
    min-width: 280px;
    background: #151b30;
    padding: 16px;
    border-radius: 20px;
    transition: transform .3s, box-shadow .3s;
}

.card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 0 30px rgba(76, 201, 240, .5);
}

.preview {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
}

.meta {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 13px;
}

.badges {
    display: flex;
    gap: 10px;
}

.badges img {
    height: 38px;
    transition: transform .25s ease, filter .25s ease;
}

.badges img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(76, 201, 240, .6));
}


/* YOUTUBE */
.youtube {
    height: 160px;
    margin-top: 8px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}



/* --------------- CONTACT  ---------------------- */
.contact {
    padding: 80px 20px;
    display: flex;
    justify-content: center;
}

.contact-card {
    background: #151b30;
    padding: 32px;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .8);
}

.contact input,
.contact textarea {
    width: 100%;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 14px;
    border: none;
}

.contact button {
    width: 100%;
    padding: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4cc9f0, #7cf2c2);
    border: none;
    font-weight: 600;
}

/* === SUBMIT BUTTON - VIBRANT & FIXED === */
.form-group {
    position: relative;
    margin-bottom: 1.8rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: #f1f2f5;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    color: #0c0c0e;
    font-size: 1rem;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00f5ff;
    background: rgba(209, 207, 246, 0.952);
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.4);
    transform: scale(1.02);
}

.form-group input:invalid:focus,
.form-group textarea:invalid:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.error-message {
    position: absolute;
    bottom: -20px;
    left: 15px;
    font-size: 0.8rem;
    color: #ff6b6b;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.error-message.show {
    opacity: 1;
}

/* === SUBMIT BUTTON - VIBRANT & FIXED === */
.submit-btn {
    padding: 16px 48px;
    min-width: 180px;
    background: linear-gradient(45deg, #00b8d4, #006064);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    /* text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); */
    box-shadow: 0 4px 15px rgba(0, 245, 255, 0.3);
}

.submit-btn:enabled {
    background: linear-gradient(45deg, #00f5ff, #00b8d4);
    color: #000;
    cursor: pointer;
    /* text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); */
    box-shadow: 0 6px 20px rgba(0, 245, 255, 0.5);
}

.submit-btn:enabled:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 245, 255, 0.6);
    background: linear-gradient(45deg, #00b8d4, #00f5ff);
}

.submit-btn .btn-text,
.submit-btn .btn-loading,
.submit-btn .btn-success,
.submit-btn .btn-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    font-size: 1.1rem;
    font-weight: 700;
}

.submit-btn .btn-text {
    opacity: 1;
    color: #000;
}

.submit-btn .btn-loading {
    opacity: 0;
    color: #1e0358;
}

.submit-btn .btn-success {
    opacity: 0;
    color: #04f949;

}

.submit-btn .btn-error {
    opacity: 0;
    color: #eb0909;
}

.submit-btn.loading .btn-text,
.submit-btn.success .btn-text,
.submit-btn.error .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loading {
    opacity: 1;
    animation: pulse 1.5s infinite;
}

.submit-btn.success .btn-success {
    opacity: 1;
}

.submit-btn.error .btn-error {
    opacity: 1;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* === SUCCESS POPUP === */
#success-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 20px;
}

#success-popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid rgba(0, 245, 255, 0.4);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 245, 255, 0.3);
    transform: scale(0.7);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

#success-popup.show .popup-content {
    transform: scale(1);
}

.popup-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.15) 0%, transparent 70%);
    animation: rotateGlow 8s linear infinite;
    pointer-events: none;
    z-index: -1;
}

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

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

.popup-icon {
    font-size: 3.5rem;
    color: #00f5ff;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.8);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {

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

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.popup-content h3 {
    margin: 0 0 10px;
    font-size: 1.6rem;
    background: linear-gradient(45deg, #fff, #00f5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-content p {
    margin: 0 0 20px;
    color: #a8edea;
    font-size: 1rem;
}

#popup-name {
    color: #00f5ff;
    font-weight: 600;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(0, 245, 255, 0.2);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: #00f5ff;
    color: #000;
    transform: rotate(90deg);
}

/* --------------- VISITORS  ---------------------- */
/* ================= VISITORS LAYOUT ================= */

.stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 60px 20px;

    flex-wrap: nowrap;
    /* 🔑 force single row on desktop */
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .stats {
        flex-wrap: wrap;
        /* stack on small screens */
        gap: 16px;
    }

    .stat {
        width: 100%;
        justify-content: center;
    }
}

/* ================= VISITOR CARD ================= */

.stat {
    background: #151b30;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .7);

    display: flex;
    align-items: center;
    /* vertical alignment */
    justify-content: center;
    /* center content */
    gap: 8px;

    text-align: center;
}

.stat strong {
    min-width: 64px;
    text-align: right;
    transition: color .3s ease;
}

/* Highlight on update */
.stat strong.updated {
    color: #4cc9f0;
}

/* ================= VISITOR PULSE EFFECT ================= */

.pulse {
    animation: glow 2.5s infinite;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 0 rgba(76, 201, 240, 0);
    }

    50% {
        box-shadow: 0 0 30px rgba(76, 201, 240, .4);
    }

    100% {
        box-shadow: 0 0 0 rgba(76, 201, 240, 0);
    }
}

.stat.live {
    border: 1px solid #4cc9f0;
}

/* ================= SKELETON SHIMMER ================= */

.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
}

/* Number skeleton size */
.skeleton-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 1em;
    /* match text height */
    min-height: 1.2em;
}

/* Shimmer animation */
.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.25),
            transparent);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* --------------- Footer  ---------------------- */
.footer {
    text-align: center;
    padding: 30px;
    opacity: .85;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 12px;
}

.social {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: transform .25s, box-shadow .25s;
}

.social.x {
    background: #000;
}

.social.fb {
    background: #1877f2;
}

.social.ig {
    background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.social:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 0 25px rgba(76, 201, 240, .5);
}