/* ===================================
   Boxing Day Event - Premium CSS
   BYD OWAY Sài Gòn
   =================================== */

/* --- CSS Custom Properties --- */
:root {
    --navy: #1a2340;
    --navy-dark: #111827;
    --navy-light: #2a3256;
    --accent-blue: #0d4f8b;
    --accent-blue-hover: #0b3d6e;
    --white: #ffffff;
    --off-white: #f4f6f9;
    --gray-100: #f1f3f6;
    --gray-200: #e2e5eb;
    --gray-300: #c9ced8;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --red: #dc2626;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: #F4F8FD;
    line-height: 1.6;
    overflow-x: hidden;
}

.registration-form input,
.registration-form select,
.registration-form textarea,
.registration-form button,
.registration-form label {
    font-family: inherit;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #252728;
    padding: 0 60px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.nav-left, .nav-right {
    display: flex;
    gap: 36px;
    flex: 1;
}

.nav-left .nav-link, .nav-right .nav-link {
    justify-content: center;
}


.nav-left {
    justify-content: flex-start;
    padding-right: 48px;
}

.nav-right {
    justify-content: flex-end;
    padding-left: 48px;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.nav-link-button {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.nav-mega {
    position: static;
    display: flex;
    align-items: center;
}

.car-mega-panel {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    padding: 30px 0;
    z-index: 19;
}

.car-mega-inner {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.car-mega-sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
    padding-top: 8px;
}

.car-cat-btn {
    appearance: none;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.car-cat-btn:hover {
    color: var(--text-primary);
}

.car-cat-btn.is-active {
    color: var(--text-primary);
    font-weight: 700;
    background: rgba(0,0,0,0.04);
}

.car-mega-content {
    flex: 1;
    min-width: 0;
}

.car-mega-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.car-mega-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.car-mega-card:hover {
    transform: translateY(-10px);
    background: rgba(255,255,255,0.9);
}

.car-mega-card img {
    width: 100%;
    max-width: 200px;
    height: 100px;
    object-fit: contain;
}

.car-mega-name {
    color: #1f2937;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.car-mega-price {
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 400;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: rgba(255,255,255,0.85);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: rgba(255,255,255,0.85);
}

.nav-link:hover::after {
    width: 100%;
}

/* LÁI THỬ button style */
.nav-link.nav-cta {
    background: #4ade80;
    color: #000;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-link.nav-cta::after {
    display: none;
}

.nav-link.nav-cta:hover {
    background: #22c55e;
    color: #000;
    transform: translateY(-1px);
}

/* Logo */
.nav-logo {
    flex-shrink: 0;
}

.nav-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 20px;
    width: auto;
    object-fit: contain;
}

.logo-img-mobile {
    display: none;
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: absolute;
    right: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: var(--transition);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 2000;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu-overlay.active {
    display: flex;
    animation: slideInMenu 0.3s ease;
}

@keyframes slideInMenu {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-logo img {
    display: block;
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #333;
    transition: color 0.2s ease;
}

.mobile-menu-close:hover {
    color: #000;
}

.mobile-menu-body {
    padding: 0 24px;
    flex: 1;
}

.mobile-menu-logo-center {
    display: flex;
    justify-content: center;
    padding: 32px 0 24px;
}

.mobile-menu-logo-center img {
    display: block;
}

.mobile-menu-search {
    position: relative;
    margin-bottom: 24px;
}

.mobile-search-input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.2s ease;
}

.mobile-search-input::placeholder {
    color: #aaa;
}

.mobile-search-input:focus {
    border-color: #333;
}

.mobile-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-nav-item:first-child {
    border-top: 1px solid #eee;
}

.mobile-nav-item:has(.mobile-nav-toggle) {
    padding: 0;
}

.mobile-nav-item:hover {
    color: #0d4f8b;
}

.mobile-nav-item svg {
    color: #999;
    flex-shrink: 0;
}

.mobile-nav-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.mobile-nav-toggle svg {
    transition: transform 0.2s ease;
}

.mobile-nav-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.mobile-car-panel {
    border-bottom: 1px solid #eee;
    padding: 10px 0 16px;
}

.mobile-car-grid {
    display: grid;
    gap: 10px;
}

.mobile-car-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    padding: 8px 10px;
    color: #1f2937;
    background: #fff;
}

.mobile-car-card img {
    width: 86px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.mobile-car-card span {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}


/* --- Main Content --- */
.main-content {
    padding-top: 100px;
    padding-bottom: 80px;
    min-height: 100vh;
    background: #F4F8FD;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* --- Event Info (Left Column) --- */
.event-info {
    padding-right: 20px;
}

.event-flyer {
    margin-bottom: 40px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.event-flyer:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.flyer-image {
    width: 100%;
    transition: transform 0.5s ease;
}

.event-flyer:hover .flyer-image {
    transform: scale(1.02);
}

.event-title {
    font-size: 42px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 28px;
    letter-spacing: -0.5px;
}

.event-title .highlight {
    background: #000;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.event-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.event-description p {
    margin-bottom: 16px;
}

.event-description .subtitle {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 24px;
}

.participation-rules,
.prize-list {
    margin: 16px 0 24px;
}

.rule-item,
.prize-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    transition: var(--transition);
}

.rule-item:hover,
.prize-item:hover {
    background: var(--gray-200);
    transform: translateX(4px);
}

.rule-icon,
.prize-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.cta-text {
    font-weight: 600;
    color: var(--accent-blue);
    font-size: 15px;
    margin-top: 24px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(13,79,139,0.05), rgba(13,79,139,0.1));
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-blue);
}

.contact-info {
    margin-top: 32px;
}

.contact-divider {
    width: 80px;
    height: 2px;
    background: var(--gray-300);
    margin-bottom: 20px;
}

.contact-info p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.contact-info a {
    color: var(--accent-blue);
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-icon {
    flex-shrink: 0;
}

/* --- Form Container (Right Column) --- */
.form-container {
    position: sticky;
    top: 90px;
    background: #F4F8FD;
    padding: 0;
}

.form-stage[hidden],
.thank-you-card[hidden] {
    display: none !important;
}

.form-feedback {
    display: none;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(220, 38, 38, 0.16);
    background: rgba(220, 38, 38, 0.08);
    color: #991b1b;
    font-size: 13px;
    line-height: 1.6;
}

.form-feedback.is-visible {
    display: block;
}

.thank-you-card {
    padding: 28px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(13,79,139,0.16), transparent 34%),
        linear-gradient(145deg, #ffffff 0%, #edf4fb 100%);
    border: 1px solid rgba(13,79,139,0.12);
    box-shadow: var(--shadow-lg);
}

.thank-you-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.thank-you-badge.is-pending {
    background: rgba(13,79,139,0.1);
    color: var(--accent-blue);
}

.thank-you-badge.is-success {
    background: rgba(16,185,129,0.12);
    color: #047857;
}

.thank-you-title {
    margin-top: 18px;
    font-size: 32px;
    line-height: 1.1;
    color: var(--navy-dark);
    letter-spacing: -0.04em;
}

.thank-you-message {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.thank-you-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.7);
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 500;
}

.thank-you-meta {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.thank-you-meta-item {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(13,79,139,0.1);
}

.thank-you-meta-item[hidden] {
    display: none !important;
}

.thank-you-meta-label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.thank-you-meta-item strong {
    display: block;
    font-size: 15px;
    line-height: 1.5;
    color: var(--navy-dark);
}

/* Form Toggle */
.form-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    transition: var(--transition);
}

.toggle-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.toggle-option input[type="radio"]:checked {
    border-color: var(--accent-blue);
}

.toggle-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--accent-blue);
    border-radius: 50%;
}

.toggle-option.active {
    color: var(--accent-blue);
}

/* Form Groups */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.qr-scan-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--accent-blue);
    background: var(--accent-blue);
    color: var(--white);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    line-height: 1.3;
}

.qr-scan-btn svg {
    flex-shrink: 0;
}

.qr-scan-btn:hover {
    background: var(--accent-blue-hover);
    border-color: var(--accent-blue-hover);
}

.qr-scan-btn:active {
    transform: scale(0.97);
}

.qr-scan-btn.is-secondary {
    background: var(--white);
    color: var(--text-primary);
    border-color: var(--gray-200);
}

.qr-scan-btn.is-secondary:hover {
    border-color: var(--gray-300);
    background: var(--off-white);
}

.qr-floating-actions {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1400;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.qr-floating-actions.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
}

.qr-floating-actions .qr-scan-btn {
    min-width: 160px;
    box-shadow: var(--shadow-lg);
}

.qr-scan-hint {
    margin-top: 8px;
    color: var(--gray-500);
    font-size: 12px;
    line-height: 1.5;
}

.qr-scan-feedback {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
}

.qr-scan-feedback[hidden] {
    display: none;
}

.qr-scan-feedback.is-visible.is-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.qr-scan-feedback.is-visible.is-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.qr-floating-actions {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1400;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.qr-floating-actions.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
}

.qr-floating-actions .qr-scan-btn {
    min-width: 170px;
    box-shadow: var(--shadow-lg);
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.required {
    color: var(--red);
}

.field-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 6px;
    margin-top: -2px;
}

/* Input Styles */
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(13,79,139,0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Custom Select (Nice Select Style) */
.custom-select-wrapper {
    position: relative;
}

.custom-select-wrapper select {
    display: none;
}

.nice-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 18px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    user-select: none;
    position: relative;
    line-height: 1.5;
    min-height: 44px;
}

.nice-select:hover {
    border-color: var(--gray-300);
}

.nice-select.open {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(13,79,139,0.12);
}

.nice-select .current {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nice-select .current.placeholder {
    color: var(--gray-400);
}

/* Nice Select Arrow */
.nice-select::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--gray-400);
    border-bottom: 2px solid var(--gray-400);
    transform: rotate(45deg) translateY(-2px);
    transition: all 0.2s ease;
    margin-left: 12px;
    flex-shrink: 0;
}

.nice-select.open::after {
    transform: rotate(-135deg) translateY(-2px);
    border-color: var(--accent-blue);
}

/* Nice Select Dropdown List */
.nice-select .list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 1px rgba(68,68,68,0.11);
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: scaleY(0.95) translateY(-4px);
    transform-origin: top center;
    transition: all 0.2s ease;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nice-select.open .list {
    opacity: 1;
    visibility: visible;
    transform: scaleY(1) translateY(0);
}

/* Scrollbar styling */
.nice-select .list::-webkit-scrollbar {
    width: 6px;
}

.nice-select .list::-webkit-scrollbar-track {
    background: transparent;
}

.nice-select .list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.nice-select .list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Nice Select Options */
.nice-select .option {
    padding: 10px 18px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease;
    line-height: 1.5;
}

.nice-select .option:hover {
    background: #f6f6f6;
}

.nice-select .option.selected {
    font-weight: 600;
    color: var(--accent-blue);
}

.nice-select .option.focus {
    background: #f6f6f6;
}

.nice-select .option:first-child {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.nice-select .option:last-child {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* Keep the old select-arrow hidden for backwards compat */
.select-arrow {
    display: none;
}

/* File Upload */
.file-input {
    display: none;
}

.file-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-100);
    min-height: 120px;
}

.file-upload-area:hover {
    border-color: var(--accent-blue);
    background: rgba(13,79,139,0.04);
}

.upload-icon {
    color: var(--gray-400);
    margin-bottom: 8px;
}

.file-upload-area:hover .upload-icon {
    color: var(--accent-blue);
}

.upload-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.upload-hint {
    font-size: 12px;
    color: var(--gray-400);
}

.file-preview {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1.5px solid var(--gray-200);
}

.file-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.remove-file {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    border: none;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.remove-file:hover {
    background: var(--red);
}

/* Checkbox Group (Multi-select) */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 2px 0;
}

.checkbox-option:hover {
    color: var(--text-primary);
}

.checkbox-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-option input[type="checkbox"]:checked {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.checkbox-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 24px;
    margin-top: 4px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.radio-option:hover {
    color: var(--text-primary);
}

.radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked {
    border-color: var(--accent-blue);
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--accent-blue);
    border-radius: 50%;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.submit-btn:hover {
    opacity: 0.9;
}

.submit-btn:active {
    opacity: 0.8;
}

/* Field validation error */
.registration-form input:invalid:not(:placeholder-shown),
.registration-form select:invalid,
.registration-form textarea:invalid:not(:placeholder-shown),
.registration-form .field-error {
    border-color: #dc2626 !important;
}

.registration-form.was-validated input:invalid,
.registration-form.was-validated select:invalid,
.registration-form.was-validated textarea:invalid {
    border-color: #dc2626 !important;
}

.nice-select.is-error {
    border-color: #dc2626 !important;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.secondary-submit-btn {
    margin-top: 24px;
    background: transparent;
    color: var(--navy);
    border: 1px solid rgba(26,35,64,0.14);
}

.secondary-submit-btn:hover {
    background: rgba(255,255,255,0.7);
}

.qr-scanner-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qr-scanner-modal[hidden] {
    display: none;
}

.qr-scanner-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17,24,39,0.7);
    backdrop-filter: blur(4px);
}

.qr-scanner-dialog {
    position: relative;
    width: min(100%, 420px);
    background: var(--white);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.qr-scanner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 12px;
}

.qr-scanner-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
}

.qr-scanner-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.qr-scanner-body {
    position: relative;
    padding: 0 20px 20px;
}

.qr-scanner-body video {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    background: #0f172a;
}

.qr-scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(58vw, 220px);
    height: min(58vw, 220px);
    transform: translate(-50%, -58%);
    border: 2px solid rgba(255,255,255,0.95);
    border-radius: 20px;
    box-shadow: 0 0 0 999px rgba(15,23,42,0.24);
    pointer-events: none;
}

.qr-scanner-status {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-secondary);
}

.qr-scanner-status.is-error {
    color: #b91c1c;
}

@media (max-width: 767px) {
    .qr-floating-actions {
        left: 12px;
        right: 12px;
        bottom: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        flex-direction: row;
        gap: 8px;
        padding: 10px 12px;
        background: rgba(255,255,255,0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-radius: 18px;
        border: 1px solid rgba(0,0,0,0.06);
        box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    }

    .qr-floating-actions .qr-scan-btn {
        flex: 1;
        min-width: 0;
        padding: 12px 14px;
        font-size: 13px;
        box-shadow: none;
        border-radius: 12px;
    }

    .qr-floating-actions .qr-scan-btn:first-child {
        background: var(--accent-blue);
        color: var(--white);
        border-color: var(--accent-blue);
    }

    .qr-floating-actions .qr-scan-btn:first-child:hover,
    .qr-floating-actions .qr-scan-btn:first-child:active {
        background: var(--accent-blue-hover);
    }

    .qr-floating-actions .qr-scan-btn.is-secondary {
        background: var(--gray-100);
        border-color: transparent;
    }
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}   

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Footer --- */
.site-footer {
    background: #151515;
    color: rgba(255,255,255,0.7);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 48px;
}

.footer-brand .footer-logo {
    margin-bottom: 16px;
}

.footer-brand .footer-logo .logo-img {
    height: 32px;
}

.company-name {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.company-desc {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 24px;
    color: rgba(255,255,255,0.5);
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
    font-size: 14px;
}

.social-icon:hover {
    background: #4ade80;
    color: #000;
    transform: translateY(-3px);
}

.footer-heading {
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 14px;
}

.footer-links a {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    transition: var(--transition);
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.6;
}

.contact-icon-footer {
    flex-shrink: 0;
    margin-top: 3px;
    color: rgba(255,255,255,0.4);
    width: 16px;
}

.footer-contact a {
    color: rgba(255,255,255,0.7);
}

.footer-contact a:hover {
    color: #4ade80;
}

.footer-bottom {
    margin-top: 48px;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.3);
}

/* --- Toast Notification --- */
.toast-notification {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid #10b981;
    animation: slideIn 0.5s ease;
}

.toast-notification.fade-out {
    animation: slideOut 0.5s ease forwards;
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.toast-text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.toast-text p {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* --- Scroll Animations --- */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
    .site-header {
        padding: 0 20px;
        background: #fff;
        border-bottom: 1px solid rgba(0,0,0,0.08);
    }

    .nav-left, .nav-right {
        display: none;
    }

    .car-mega-panel {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn span {
        background: #000;
    }

    .logo-img {
        display: none;
    }

    .logo-img-mobile {
        display: block;
    }

    .header-nav {
        justify-content: flex-start;
    }

    .main-content {
        padding-top: 90px;
        padding-bottom: 48px;
    }

    .event-info {
        padding-right: 0;
    }

    .form-container {
        position: static;
    }

    .event-title {
        font-size: 32px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }

    .container {
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 24px;
    }

    .event-title {
        font-size: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .event-title {
        font-size: 24px;
    }

    .form-container {
        padding: 20px;
        border-radius: var(--radius-md);
    }

    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
}
