*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #080808;
    --color-bg-card: #111111;
    --color-bg-input: #161616;
    --color-border: #1e1e1e;
    --color-border-focus: #dc2626;
    --color-red: #dc2626;
    --color-red-hover: #ef4444;
    --color-text-primary: #f5f5f5;
    --color-text-secondary: #a3a3a3;
    --color-text-muted: #525252;
    --font-family: 'Inter', sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition-fast: 0.18s ease;
    --transition-normal: 0.28s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ─── VIDEO BACKGROUND ────────────────────────────────────── */

.video-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.842);
}

#app-root {
    position: relative;
    z-index: 1;
}

/* ─── LANDING ─────────────────────────────────────────────── */

.landing-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
}

.enter-text {
    font-size: clamp(1rem, 3vw, 1.4rem);
    font-weight: 400;
    color: rgba(245, 245, 245, 0.85);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0;
    transform: translateY(14px);
    animation: enterTextReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) 2s forwards;
    position: relative;
    user-select: none;
    transition: color var(--transition-normal), letter-spacing var(--transition-normal);
    display: inline-block;
}

.enter-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: rgba(245, 245, 245, 0.4);
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.enter-text:hover {
    color: rgba(245, 245, 245, 0.5);
    letter-spacing: 0.3em;
}

.enter-text:hover::after {
    width: 100%;
}

@keyframes enterTextReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-wrapper.exit-up {
    animation: landingExitUp 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes landingExitUp {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-56px); }
}

/* ─── APPLY PAGE ──────────────────────────────────────────── */

.apply-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 12px 40px;
}

.apply-container {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.apply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: color var(--transition-fast), transform var(--transition-fast);
    cursor: pointer;
    background: none;
    border: none;
}

.back-link:hover {
    color: var(--color-text-primary);
    transform: translateX(-3px);
}

.apply-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.apply-brand i {
    color: var(--color-red);
    font-size: 0.95rem;
}

.apply-card {
    background: rgba(17, 17, 17, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px 28px 24px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.02), 0 16px 48px rgba(0,0,0,0.6);
}

.apply-card-header {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
}

.apply-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.apply-desc {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}

/* ─── APPLY STAGGER ANIMATION ─────────────────────────────── */

.apply-anim {
    opacity: 0;
    transform: perspective(600px) translateZ(-20px) translateY(10px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.apply-anim.visible {
    opacity: 1;
    transform: perspective(600px) translateZ(0) translateY(0);
}

/* ─── FORM ────────────────────────────────────────────────── */

#applicationForm {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    letter-spacing: 0.01em;
}

.form-label i {
    color: var(--color-red);
    font-size: 0.72rem;
    width: 12px;
    text-align: center;
}

.form-input,
.form-textarea {
    width: 100%;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-family: var(--font-family);
    font-size: 0.875rem;
    color: var(--color-text-primary);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-muted);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
    background: #1a1a1a;
}

.form-input.is-invalid,
.form-textarea.is-invalid {
    border-color: #f87171;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.55;
}

.char-counter {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    text-align: right;
    margin-top: 2px;
}

.char-counter.near-limit {
    color: #f59e0b;
}

.char-counter.at-limit {
    color: var(--color-red);
}

/* ─── FORM NOTE ───────────────────────────────────────────── */

.form-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.form-note i {
    color: var(--color-red);
    font-size: 0.85rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.form-note a {
    color: var(--color-red);
    text-decoration: none;
    font-weight: 600;
}

.form-note a:hover {
    text-decoration: underline;
}

/* ─── SUBMIT BUTTON ───────────────────────────────────────── */

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 24px;
    background: linear-gradient(135deg, var(--color-red), #b91c1c);
    color: #fff;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    margin-top: 4px;
    letter-spacing: 0.01em;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 36px rgba(220, 38, 38, 0.55);
    background: linear-gradient(135deg, var(--color-red-hover), #dc2626);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─── ALREADY APPLIED NOTICE ──────────────────────────────── */

.already-applied-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(220, 38, 38, 0.07);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: var(--radius-lg);
    color: var(--color-text-primary);
}

.already-applied-notice i {
    color: var(--color-red);
    font-size: 1.4rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.already-applied-notice strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.already-applied-notice p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ─── ERROR / ACTION RESULT PAGES ────────────────────────── */

.error-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.error-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.error-code {
    font-size: clamp(5rem, 15vw, 9rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #1e1e1e 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.error-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.error-desc {
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-width: 360px;
}

.brand-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.05));
    border: 1px solid rgba(220, 38, 38, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--color-red);
}

.enter-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 13px 28px;
    background: linear-gradient(135deg, var(--color-red), #b91c1c);
    color: #fff;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 1px solid rgba(220, 38, 38, 0.5);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
}

.enter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 36px rgba(220, 38, 38, 0.55);
}

/* ─── SWEETALERT2 OVERRIDES ───────────────────────────────── */

.swal2-popup {
    background: #111111 !important;
    border: 1px solid #1e1e1e !important;
    border-radius: 16px !important;
    font-family: var(--font-family) !important;
    color: #f5f5f5 !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7) !important;
}

.swal2-title {
    color: #f5f5f5 !important;
    font-weight: 800 !important;
    font-size: 1.4rem !important;
}

.swal2-html-container {
    color: #a3a3a3 !important;
    font-size: 0.95rem !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    font-family: var(--font-family) !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    padding: 12px 28px !important;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.35) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

.swal2-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.55) !important;
}

.swal2-icon.swal2-success {
    border-color: #dc2626 !important;
    color: #dc2626 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(220, 38, 38, 0.3) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #dc2626 !important;
}

.swal2-icon.swal2-error {
    border-color: #f87171 !important;
    color: #f87171 !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #f87171 !important;
}

.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 640px) {
    .apply-wrapper {
        padding: 16px 10px 32px;
    }

    .apply-card {
        padding: 20px 16px 18px;
        border-radius: var(--radius-md);
    }

    .apply-card-header {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .apply-title {
        font-size: 1.1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #applicationForm {
        gap: 12px;
    }

    .apply-header {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .apply-brand span {
        display: none;
    }

    .submit-btn {
        padding: 12px 20px;
        font-size: 0.875rem;
    }
}

@media (max-width: 400px) {
    .apply-card {
        padding: 16px 12px 14px;
    }

    .form-input,
    .form-textarea {
        font-size: 0.82rem;
        padding: 8px 10px;
    }
}