/* =========================================================
   MISS FPTU CAN THO 2026 — Tech / Sci-fi Theme
   ========================================================= */

@font-face {
    font-family: 'Kaleko 105 Round';
    src: url('../fonts/kaleko-round-book.ttf') format('truetype'),
         url('../fonts/%239Slide03%20KALEKO%20ROUND%20BOOK_1.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kaleko 105 Round';
    src: url('../fonts/kaleko-round-bold.ttf') format('truetype'),
         url('../fonts/%239Slide03%20Kaleko%20105%20Round%20Bold_1.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --c-bg-1: #07021a;
    --c-bg-2: #140531;
    --c-bg-3: #1d0a4a;
    --c-primary: #b46bff;
    --c-primary-2: #6a36ff;
    --c-accent: #ff5fd2;
    --c-accent-2: #59e6ff;
    --c-text: #ecdcff;
    --c-muted: #b9a8da;
    --c-glow: rgba(180, 107, 255, 0.55);
    --c-glass: rgba(20, 8, 50, 0.45);
    --c-glass-border: rgba(180, 107, 255, 0.25);
    --c-error: #ff5b8a;
    --shadow-neon: 0 0 18px rgba(180, 107, 255, 0.6), 0 0 36px rgba(89, 230, 255, 0.25);
    --font-display: 'Kaleko 105 Round', sans-serif;
    --font-slogan: 'Kaleko 105 Round', sans-serif;
    --font-body: 'Kaleko 105 Round', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    color: var(--c-text);
    background: radial-gradient(ellipse at top, #1c0852 0%, #0a0322 45%, #03000f 100%);
    overflow-x: hidden;
    min-height: 100vh;
}

*, *::before, *::after {
    font-family: var(--font-body);
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a0322; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--c-primary), var(--c-accent));
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--c-accent), var(--c-primary)); }

/* ---------- Animated star / particle layer ---------- */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 22%, rgba(180,107,255,0.25), transparent 45%),
        radial-gradient(circle at 82% 78%, rgba(89,230,255,0.18), transparent 50%),
        radial-gradient(circle at 50% 110%, rgba(255,95,210,0.18), transparent 55%);
    pointer-events: none;
    animation: nebula 14s ease-in-out infinite alternate;
}

@keyframes nebula {
    0%   { filter: hue-rotate(0deg) brightness(1); }
    100% { filter: hue-rotate(40deg) brightness(1.15); }
}

/* ---------- Cursor glow follower ---------- */
.cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: 380px; height: 380px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(180,107,255,0.18), rgba(180,107,255,0) 70%);
    transition: opacity .4s ease;
    mix-blend-mode: screen;
}

/* =========================================================
   Header / Navigation
   ========================================================= */
header {
    width: 100%;
    padding: 16px 0;
    background: rgba(7, 2, 26, 0.35);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border-bottom: 1px solid rgba(180,107,255,0.18);
    z-index: 1000;
    position: fixed;
    top: 0;
    transition: background .4s ease, padding .4s ease;
}

header.scrolled {
    padding: 8px 0;
    background: rgba(7, 2, 26, 0.78);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    background: transparent;
}

.logo {
    display: flex;
    align-items: center;
    margin: 0;
}

.logo img {
    height: 60px;
    filter: drop-shadow(0 0 12px rgba(180,107,255,0.6));
    transition: transform .3s ease, filter .3s ease;
}

.logo img:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 18px rgba(89,230,255,0.8));
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 14px;
}

nav ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(180,107,255,0.25);
    background: rgba(255,255,255,0.03);
    color: var(--c-text);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-decoration: none;
    text-transform: uppercase;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
    transform: translateX(-100%);
    transition: transform .6s ease;
}

nav ul li a:hover {
    color: #fff;
    border-color: var(--c-accent-2);
    box-shadow: 0 0 18px rgba(89,230,255,0.55);
    transform: translateY(-2px);
}

nav ul li a:hover::before { transform: translateX(100%); }

nav ul li a img { display: none; } /* hide old PNG nav icons */

.nav-icon-1::after { content: "Thể lệ"; }
.nav-icon-2::after { content: "Giải thưởng"; }

.register-button {
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 999px;
    box-shadow: 0 0 22px rgba(180,107,255,0.55);
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    overflow: hidden;
}

.register-button:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 0 30px rgba(255,95,210,0.7);
}

.register-button a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 13px;
    text-decoration: none;
}

.register-button a img { display: none; }
.register-button a::after { content: "Đăng ký ngay"; }

/* =========================================================
   Hero / Main cover
   ========================================================= */
.sky {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background: transparent;
}

main {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 70px;
}

.prevent-drag-copy {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

/* HERO COVER — uses MISS26-COVER-FANPAGE4.jpg */
.hero-cover {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7,2,26,0.15) 0%, rgba(7,2,26,0.55) 60%, rgba(7,2,26,0.95) 100%),
        url('../images/2026/background.jpeg') center center / cover no-repeat;
    z-index: 0;
    transform: scale(1.05);
    will-change: transform;
}

.hero-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255,255,255,0.03) 0px,
            rgba(255,255,255,0.03) 1px,
            transparent 1px,
            transparent 3px
        );
    mix-blend-mode: overlay;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 0%, rgba(7,2,26,0.55) 75%),
        linear-gradient(180deg, transparent 60%, var(--c-bg-1) 100%);
}

.logomain-container {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    padding: 0 20px;
    text-align: center;
}

.logomain {
    display: block;
    width: clamp(320px, 64vw, 880px);
    height: auto;
    margin: 0 auto 14px;
    transform-style: preserve-3d;
    filter: drop-shadow(0 0 22px rgba(180,107,255,0.55));
    will-change: transform, filter;
    user-select: none;
    -webkit-user-drag: none;
}

.hero-tagline {
    margin-top: 14px;
    font-family: var(--font-slogan);
    font-size: clamp(14px, 1.6vw, 20px);
    letter-spacing: 10px;
    text-transform: uppercase;
    color: var(--c-text);
    opacity: 0;
    animation: fadeUp 1.4s ease .8s forwards;
}

/* Diamond / sparkle slogan */
.hero-typed {
    font-family: var(--font-slogan);
    font-size: clamp(22px, 3.2vw, 42px);
    letter-spacing: 6px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow:
        0 0 6px rgba(255,255,255,0.85),
        0 0 18px rgba(255,255,255,0.5),
        0 0 28px rgba(180,107,255,0.7),
        0 0 60px rgba(89,230,255,0.45);
    min-height: 1.6em;
    line-height: 1.6;
    padding: 6px 12px;
    position: relative;
    display: inline-block;
}

.hero-typed::before {
    content: "✦";
    position: absolute;
    top: 50%;
    left: -1.4em;
    font-size: 0.55em;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.95), 0 0 22px rgba(180,107,255,0.85);
    transform: translateY(-50%);
    animation: twinkle 2.4s ease-in-out infinite;
    pointer-events: none;
}

/* Twinkling sparkles on both sides of the slogan */
.hero-typed::after {
    content: "✦";
    position: absolute;
    top: 50%;
    right: -1.4em;
    font-size: 0.55em;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.95), 0 0 22px rgba(89,230,255,0.85);
    transform: translateY(-50%);
    animation: twinkle 2.4s ease-in-out infinite;
    animation-delay: 1.2s;
    pointer-events: none;
    mix-blend-mode: normal;
}


@keyframes twinkle {
    0%, 100% { opacity: 0.25; transform: translateY(-50%) scale(0.7) rotate(0deg); }
    50%      { opacity: 1;    transform: translateY(-50%) scale(1.2) rotate(180deg); }
}

.hero-typed .cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--c-accent-2);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s steps(2) infinite;
}

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

.hero-cta {
    margin-top: 26px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 999px;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 13px;
    background: linear-gradient(135deg, rgba(180,107,255,0.85), rgba(255,95,210,0.85));
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 0 24px rgba(180,107,255,0.55), inset 0 0 12px rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    transition: transform .3s ease, box-shadow .3s ease;
    opacity: 0;
    animation: fadeUp 1.4s ease 1.2s forwards;
}

.hero-cta:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 0 35px rgba(255,95,210,0.75);
    color: #fff;
}

.hero-cta .arrow { font-size: 18px; transition: transform .3s ease; }
.hero-cta:hover .arrow { transform: translateX(4px); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.scroll-down-arrow {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(180,107,255,0.45);
    background: rgba(20,5,50,0.45);
    backdrop-filter: blur(6px);
    cursor: pointer;
    animation: floatY 2.6s ease-in-out infinite;
    z-index: 4;
    object-fit: contain;
    padding: 10px;
    box-shadow: 0 0 18px rgba(180,107,255,0.45);
}

@keyframes floatY {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(-10px); }
}

/* =========================================================
   Sections
   ========================================================= */
section {
    position: relative;
    padding: 110px 24px;
    overflow: hidden;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 900;
    text-align: center;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 0 auto 18px;
    background: linear-gradient(120deg, #fff 0%, var(--c-accent-2) 50%, var(--c-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(180,107,255,0.18);
}

.section-subtitle {
    text-align: center;
    color: var(--c-muted);
    margin: 0 auto 60px;
    max-width: 700px;
    font-size: 15px;
    letter-spacing: 1px;
}

/* Reveal-on-scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Prizes / banner imagery */
#prizes {
    text-align: center;
}

#prizes center { display: block; }

#bg-image {
    max-width: 88%;
    width: auto;
    height: auto;
    margin: 12px auto;
    filter: drop-shadow(0 14px 28px rgba(180,107,255,0.25));
    transition: transform .6s ease;
}

#bg-image:hover { transform: translateY(-6px) scale(1.02); }

/* =========================================================
   Registration section
   ========================================================= */
#register {
    padding: 60px 20px 120px;
    position: relative;
}

#register > center img {
    max-width: 360px;
    width: 60%;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 18px rgba(180,107,255,0.35));
}

#register form {
    max-width: 1180px;
    margin: 20px auto 0;
    padding: 44px clamp(20px, 4vw, 56px);
    border-radius: 28px;
    color: var(--c-text);
    background: linear-gradient(135deg, rgba(40, 12, 90, 0.55) 0%, rgba(10, 3, 36, 0.55) 100%);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(180,107,255,0.28);
    box-shadow:
        0 30px 80px rgba(0,0,0,0.45),
        inset 0 0 0 1px rgba(255,255,255,0.04),
        0 0 60px rgba(180,107,255,0.15);
    position: relative;
    overflow: hidden;
}

#register form::before {
    content: "";
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 30px;
    padding: 2px;
    background: linear-gradient(135deg, var(--c-primary), transparent 40%, transparent 60%, var(--c-accent));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: .55;
    pointer-events: none;
}

#register form label {
    display: block;
    color: var(--c-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-family: var(--font-display);
}

#register form .form-control,
#register form .form-select,
#register form textarea {
    width: 100%;
    background: rgba(7, 2, 26, 0.55);
    border: 1px solid rgba(180,107,255,0.25);
    color: #fff;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 15px;
    font-family: var(--font-body);
    transition: all .3s ease;
    margin-bottom: 6px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

#register form .form-control::placeholder {
    color: rgba(236, 220, 255, 0.45);
}

#register form .form-control:focus,
#register form .form-select:focus,
#register form textarea:focus {
    outline: none;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 4px rgba(255,95,210,0.18), 0 0 22px rgba(180,107,255,0.35);
    background: rgba(20, 8, 50, 0.7);
}

#register form .form-select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--c-primary) 50%),
                      linear-gradient(135deg, var(--c-primary) 50%, transparent 50%);
    background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px;
}

#register form .form-select option {
    background: #140531;
    color: #fff;
}

#register form textarea {
    min-height: 130px;
    resize: vertical;
}

#register form .row { margin: 0 -10px; display: flex; flex-wrap: wrap; }
#register form [class^="col-"], #register form [class*=" col-"] { padding: 0 10px; }
#register form .mb-3, #register form .mb-4 { margin-bottom: 20px; }

#register form .btn {
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff;
    border: none;
    padding: 16px 56px;
    border-radius: 999px;
    font-size: 14px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 26px;
    box-shadow: 0 10px 26px rgba(180,107,255,0.45), 0 0 30px rgba(255,95,210,0.25);
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    overflow: hidden;
}

#register form .btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
    transform: translateX(-100%);
    transition: transform .8s ease;
}

#register form .btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 36px rgba(255,95,210,0.5);
}

#register form .btn:hover::before { transform: translateX(100%); }

/* Countdown */
.flipdown {
    margin: 10px auto 40px !important;
}

#flipdown .rotor,
#flipdown .rotor-leaf {
    
    color: #fff !important;
}

/* Alerts */
.alert {
    max-width: 800px;
    margin: 0 auto 24px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(180,107,255,0.3);
    background: rgba(20, 8, 50, 0.55);
    backdrop-filter: blur(8px);
    color: #fff;
    text-align: center;
}

.alert-success { border-color: rgba(89,230,255,0.45); box-shadow: 0 0 22px rgba(89,230,255,0.25); }
.alert-danger  { border-color: rgba(255,91,138,0.55); box-shadow: 0 0 22px rgba(255,91,138,0.25); }

/* File inputs */
.custom-file-input-container {
    border: 1.5px dashed rgba(180,107,255,0.45);
    border-radius: 18px;
    padding: 18px 16px 22px;
    text-align: center;
    background: rgba(7, 2, 26, 0.45);
    transition: all .35s ease;
    position: relative;
    overflow: hidden;
}

.custom-file-input-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(180,107,255,0.18), transparent 60%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

.custom-file-input-container:hover {
    border-color: var(--c-accent-2);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(89,230,255,0.18);
}

.custom-file-input-container:hover::before { opacity: 1; }

.custom-file-input-container p {
    color: var(--c-text);
    font-weight: 600;
    margin: 0 0 4px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.custom-file-input-container .note {
    font-size: 12px;
    font-style: italic;
    color: var(--c-muted);
    margin-top: 4px;
}

.custom-file-input-container .btn-file-label {
    background: linear-gradient(135deg, var(--c-primary-2), var(--c-accent));
    color: #fff;
    border-radius: 999px;
    padding: 10px 22px;
    cursor: pointer;
    display: inline-block;
    margin-top: 14px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all .3s ease;
    box-shadow: 0 6px 16px rgba(180,107,255,0.45);
}

.custom-file-input-container .btn-file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(255,95,210,0.55);
}

.form-control-file { display: none; }

/* Checkbox */
.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--c-accent);
    margin-right: 6px;
    vertical-align: middle;
}

.highlighted-link {
    color: var(--c-accent-2);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed var(--c-accent-2);
    transition: color .3s ease, border-color .3s ease, text-shadow .3s ease;
}
.highlighted-link:hover {
    color: var(--c-accent);
    border-bottom-color: var(--c-accent);
    text-shadow: 0 0 12px rgba(255,95,210,0.7);
}

/* Inline form error labels */
.error {
    color: var(--c-error);
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

/* End message */
#end-message {
    text-align: center;
    color: var(--c-muted);
    font-size: 16px;
    margin: 20px auto;
    max-width: 680px;
}

/* =========================================================
   Rules modal
   ========================================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    overflow-y: auto;
    background: rgba(3, 0, 15, 0.78);
    backdrop-filter: blur(8px);
    animation: fadeIn .35s ease;
}

@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }

.modal-content {
    background: linear-gradient(135deg, rgba(40, 12, 90, 0.92), rgba(7, 2, 26, 0.94));
    margin: 60px auto;
    padding: 36px 36px 40px;
    border: 1px solid rgba(180,107,255,0.45);
    max-width: 760px;
    border-radius: 22px;
    position: relative;
    color: var(--c-text);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(180,107,255,0.2);
}

.modal-content h2 {
    font-family: var(--font-display);
    background: linear-gradient(120deg, #fff, var(--c-accent-2), var(--c-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 4px;
}

.modal-content h3, .modal-content h4 {
    color: var(--c-accent-2);
    font-family: var(--font-display);
    letter-spacing: 2px;
    margin-top: 22px;
}

.modal-content a { color: var(--c-accent-2); }

.close-button {
    color: var(--c-muted);
    position: absolute;
    top: 16px; right: 22px;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color .25s ease, transform .25s ease;
}
.close-button:hover {
    color: var(--c-accent);
    transform: rotate(90deg);
}

/* =========================================================
   Menu toggle (mobile)
   ========================================================= */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    background: rgba(20, 8, 50, 0.5);
    border: 1px solid rgba(180,107,255,0.3);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    transition: background .25s ease;
}

.menu-toggle:hover { background: rgba(180,107,255,0.25); }

/* =========================================================
   Footer
   ========================================================= */
footer {
    position: relative;
    background: linear-gradient(180deg, rgba(7,2,26,0.85), #03000f);
    color: var(--c-muted);
    padding: 50px 20px 30px;
    text-align: center;
    border-top: 1px solid rgba(180,107,255,0.18);
}

footer::before {
    content: "";
    position: absolute;
    top: -1px; left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--c-accent), transparent);
    filter: blur(.5px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 18px;
}

.footer-logos img {
    max-height: 56px;
    filter: drop-shadow(0 0 10px rgba(180,107,255,0.45));
}

.footer-info p {
    margin: 4px 0;
    font-size: 14px;
    letter-spacing: .4px;
}

/* =========================================================
   Loading overlay
   ========================================================= */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(20,5,50,0.85), rgba(3,0,15,0.95));
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(8px);
}

/* SweetAlert luôn nổi trên loading overlay */
.swal2-container { z-index: 99999 !important; }

.dot {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(180,107,255,0.7);
    animation: dot-blink 1.1s infinite ease-in-out both;
}

.dot:nth-child(2) { animation-delay: 0.18s; }
.dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes dot-blink {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40%           { transform: scale(1);   opacity: 1;   }
}

/* Hide old assets we no longer want visible */
.image-background, .video-background, #bg-video { display: none; }

/* =========================================================
   Upload status (created by JS in form)
   ========================================================= */
[id$="_status"] {
    border-radius: 12px !important;
    font-size: 13px !important;
    margin-top: 12px !important;
    background: rgba(7,2,26,0.55) !important;
    border: 1px solid rgba(180,107,255,0.35);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
    .header-content { padding: 0 18px; }
    .logo img { height: 50px; }
}

@media (max-width: 900px) {
    .menu-toggle { display: inline-flex; }

    /* Gom hamburger + logo sát nhau bên trái; nút đăng ký đẩy sang phải */
    .header-content {
        justify-content: flex-start;
        gap: 10px;
    }
    .menu-toggle { order: 0; }
    .logo { order: 1; margin: 0; }
    nav { order: 2; }
    .register-button { order: 3; margin-left: auto; }

    /* Dropdown menu xổ xuống bên trái, ngay dưới nút hamburger */
    nav ul {
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 64px;
        left: 16px;
        right: auto;
        background: rgba(7,2,26,0.92);
        border: 1px solid rgba(180,107,255,0.25);
        border-radius: 16px;
        padding: 12px;
        gap: 8px;
        display: none;
        min-width: 220px;
        backdrop-filter: blur(14px);
        box-shadow: 0 18px 40px rgba(0,0,0,0.45);
    }
    nav ul.active { display: flex; }
    nav ul li a { width: 100%; justify-content: center; }

    .sky {
        height: auto;
        min-height: 0;
    }
    main {
        height: auto;
        min-height: 0;
        align-items: flex-start;
        padding-top: clamp(104px, 14vh, 148px);
        padding-bottom: 18px;
    }
    .logomain-container {
        width: min(92vw, 620px);
        justify-content: flex-start;
        padding: 3vh 10px 0;
    }
    .logomain {
        width: min(86vw, 500px);
        margin-bottom: 10px;
    }
    .hero-typed {
        font-size: clamp(20px, 5.6vw, 32px);
        letter-spacing: 1.5px;
        line-height: 1.35;
    }
    .hero-tagline { letter-spacing: 4px; }
    .hero-cta {
        margin-top: 20px;
        padding: 12px 26px;
        font-size: 12px;
        letter-spacing: 2px;
    }

    #register form { padding: 28px 18px; border-radius: 22px; }
    #register form [class^="col-"], #register form [class*=" col-"] { flex: 0 0 100%; max-width: 100%; }

    section { padding: 80px 18px; }
    .section-title { letter-spacing: 2px; }
}

@media (max-width: 600px) {
    .logo img { height: 42px; }
    .register-button a { padding: 10px 16px; font-size: 11px; letter-spacing: 1.4px; }
    .sky,
    main {
        overflow: visible;
    }
    main {
        padding-top: clamp(90px, 12vh, 124px);
        padding-bottom: 14px;
    }
    .logomain-container {
        width: 100%;
        padding: 2vh 6px 0;
    }
    .logomain {
        width: min(88vw, 340px);
        margin-bottom: 12px;
    }
    .hero-typed {
        font-size: clamp(17px, 5.6vw, 24px);
        margin-top: 4px;
    }
    .hero-cta {
        padding: 10px 20px;
        font-size: 11px;
        letter-spacing: 1.4px;
        margin-top: 14px;
    }
    #prizes { padding-top: 42px; }
    .scroll-down-arrow {
        width: 36px;
        height: 36px;
        padding: 7px;
        bottom: -22px;
    }
    .modal-content { margin: 30px 14px; padding: 24px 18px; }
}

/* Bootstrap grid fallback overrides used by the form */
.row { display: flex; flex-wrap: wrap; margin-right: -10px; margin-left: -10px; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; padding-right: 10px; padding-left: 10px; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; padding-right: 10px; padding-left: 10px; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; padding-right: 10px; padding-left: 10px; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; padding-right: 10px; padding-left: 10px; }

@media (max-width: 900px) {
    .col-md-3, .col-md-4, .col-md-6, .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 901px) and (max-width: 1100px) {
    .col-md-3 { flex: 0 0 50%; max-width: 50%; }
}

/* Text helpers */
.text-center { text-align: center; }
