:root {
    --color-primary: #061029;
    --color-secondary: #16427c;
    --color-accent: #2a6db5;
    --color-accent-light: #4a90d9;
    --color-text-light: #e2e8f0;
    --inter-font: 'Inter', 'Segoe UI', 'Microsoft JhengHei', '微軟正黑體', sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--inter-font);
    background-color: var(--color-primary);
    color: var(--color-text-light);
    margin: 0;
}

/* ─── Mobile Nav ─── */
#mobile-menu {
    background: rgba(6,16,41,0.98);
    backdrop-filter: blur(12px);
}

/* ─── Navbar ─── */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 40;
    background: rgba(6,16,41,0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(22,66,124,0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 64px;
}

.site-nav .nav-logo {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
}

.site-nav .nav-logo img {
    height: 36px;
    width: auto;
    display: block;
}

.site-nav .nav-links {
    display: none;
    gap: 2rem;
    list-style: none;
    margin: 0; padding: 0;
}
@media (min-width: 768px) {
    .site-nav .nav-links { display: flex; }
}

.site-nav .nav-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}
.site-nav .nav-links a:hover { color: var(--color-accent-light); }

/* ─── Hero (image-only, 16:9) ─── */
.hero-section {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 64px;   /* clear the fixed nav (nav is 64px tall) */
    overflow: hidden;
    background: #061029;
    display: block;
}

.hero-bg-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;   /* container matches 16:9 so nothing is cropped */
    object-position: center;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(6,16,41,0.45) 0%,
        rgba(6,16,41,0.6) 60%,
        rgba(6,16,41,0.85) 100%
    );
}

/* Override glows — not needed for image version */
.hero-glow { display: none; }

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    background: rgba(22,66,124,0.5);
    border: 1px solid rgba(74,144,217,0.4);
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 1.25rem;
}

.hero-title span {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hero-desc {
    font-size: 1.0625rem;
    color: #ffffff;
    line-height: 1.8;
    max-width: 640px;
    margin: 0 auto 2rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cbd5e1;
    font-size: 0.9375rem;
    font-weight: 500;
}

.hero-meta-item svg {
    color: #4a90d9;
    flex-shrink: 0;
}

.hero-cta {
    display: inline-block;
    background: linear-gradient(135deg, #16427c, #2a6db5);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.875rem 2.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: all 0.3s;
    border: 1px solid rgba(74,144,217,0.4);
    box-shadow: 0 0 24px rgba(22,66,124,0.5);
}
.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(42,109,181,0.7);
}

/* ─── Hero sponsors ─── */
.hero-sponsors {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem 3rem;
}

.hero-sponsor-group {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.hero-sponsor-label {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hero-sponsor-logo {
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    background: rgba(255,255,255,0.95);
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
}

/* ─── Section base ─── */
.section-dark {
    background: var(--color-primary);
    padding: 5rem 1.5rem;
}

.section-mid {
    background: #0a1828;
    padding: 5rem 1.5rem;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 0.75rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #16427c, #4a90d9);
    border-radius: 2px;
    margin: 0.75rem auto 0;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 0.9375rem;
    margin-bottom: 3rem;
}

/* ─── Intro ─── */
.intro-card {
    background: #0d1f3c;
    border: 1px solid rgba(22,66,124,0.4);
    border-radius: 1rem;
    padding: 2.5rem;
    max-width: 860px;
    margin: 0 auto;
}

.intro-card p {
    color: #cbd5e1;
    line-height: 1.9;
    margin-bottom: 1rem;
    font-size: 1.1875rem;
}

.intro-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.intro-list li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    color: #cbd5e1;
    font-size: 1.1875rem;
    line-height: 1.7;
}

.intro-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    min-width: 6px;
    background: #4a90d9;
    border-radius: 50%;
    margin-top: 0.6rem;
}

.intro-list li strong {
    color: #e2e8f0;
}

.intro-note {
    display: inline-block;
    background: rgba(22,66,124,0.25);
    border-left: 3px solid #4a90d9;
    color: #93c5fd;
    padding: 0.75rem 1.25rem;
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 0.9375rem;
    margin-top: 0.5rem;
}

/* ─── Agenda ─── */
.agenda-table {
    background: #0d1f3c;
    border: 1px solid rgba(22,66,124,0.4);
    border-radius: 1rem;
    overflow: hidden;
    max-width: 860px;
    margin: 0 auto;
}

.agenda-header {
    display: none;
    grid-template-columns: 140px 1fr 180px;
    gap: 1rem;
    padding: 1rem 1.75rem;
    background: rgba(22,66,124,0.4);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}
@media (min-width: 768px) {
    .agenda-header { display: grid; }
}

.agenda-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid rgba(22,66,124,0.2);
    transition: background 0.2s;
}
@media (min-width: 768px) {
    .agenda-row { grid-template-columns: 140px 1fr 180px; gap: 1rem; align-items: center; }
}
.agenda-row:last-child { border-bottom: none; }
.agenda-row:hover { background: rgba(22,66,124,0.12); }

.agenda-row.break-row { opacity: 0.6; }

.agenda-time {
    color: #4a90d9;
    font-size: 0.9375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.agenda-topic {
    color: #e2e8f0;
    font-size: 1.0625rem;
    font-weight: 500;
}

.agenda-topic.featured {
    color: #fff;
    font-weight: 600;
}

.agenda-speaker {
    color: #94a3b8;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .agenda-time { font-size: 1.0625rem; }
    .agenda-topic { font-size: 1.1875rem; }
    .agenda-topic.featured { font-size: 1.25rem; }
    .agenda-speaker { font-size: 1.0625rem; }
    .agenda-header { font-size: 0.9375rem; }
    .agenda-row { padding: 1.5rem 1.75rem; }
}

/* ─── Speakers ─── */
.speakers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .speakers-grid { grid-template-columns: repeat(3, 1fr); }
}

.speaker-card {
    background: #0d1f3c;
    border: 1px solid rgba(22,66,124,0.4);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.speaker-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74,144,217,0.6);
    box-shadow: 0 12px 40px rgba(22,66,124,0.4);
}

.speaker-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(22,66,124,0.6);
    margin-bottom: 1.25rem;
    transition: transform 0.3s, border-color 0.3s;
}

.speaker-card:hover .speaker-avatar {
    border-color: #4a90d9;
    transform: scale(1.05);
}

.speaker-name {
    font-size: 1.1875rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.speaker-role {
    font-size: 0.9375rem;
    color: #4a90d9;
    font-weight: 500;
    margin-bottom: 0.875rem;
}

.speaker-bio {
    font-size: 0.9375rem;
    color: #94a3b8;
    line-height: 1.7;
    text-align: left;
    padding-top: 0.875rem;
    border-top: 1px solid rgba(22,66,124,0.3);
    width: 100%;
}

/* ─── Prizes ─── */
.prizes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .prizes-grid { grid-template-columns: repeat(3, 1fr); }
}

.prize-card {
    position: relative;
    background: #0d1f3c;
    border: 1px solid rgba(22,66,124,0.4);
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.prize-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74,144,217,0.6);
    box-shadow: 0 12px 40px rgba(22,66,124,0.4);
}

.prize-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #061029;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

.prize-badge-alt {
    background: linear-gradient(135deg, #16427c, #4a90d9);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(74,144,217,0.3);
}

.prize-image-wrap {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
    padding: 1rem;
}

.prize-image {
    max-width: 65%;
    max-height: 65%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.prize-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16427c;
}

.prize-icon svg {
    width: 80px;
    height: 80px;
}

.partners-block {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.partners-block:last-child {
    margin-bottom: 0;
}

.partners-label {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .partners-block {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
    .partners-label {
        text-align: left;
        width: 120px;
    }
    .partners-grid {
        flex: 1;
        justify-content: flex-start;
    }
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 100px;
    background: #ffffff;
    border: 1px solid rgba(22,66,124,0.4);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.partner-logo:hover {
    transform: translateY(-4px);
    border-color: rgba(74,144,217,0.6);
    box-shadow: 0 12px 40px rgba(22,66,124,0.4);
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.prize-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.35rem;
}

.prize-desc {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.6;
}

.prize-qty {
    display: inline-block;
    color: #fbbf24;
    font-weight: 600;
    margin-left: 0.25rem;
}

.prize-qty1 {
    display: inline-block;
    color: #fff;
    font-weight: 600;
    margin-top: 0.15rem;
}

/* ─── Location ─── */
.location-card {
    background: #0d1f3c;
    border: 1px solid rgba(22,66,124,0.4);
    border-radius: 1rem;
    overflow: hidden;
    max-width: 860px;
    margin: 0 auto;
}

.location-map {
    width: 100%;
    height: 320px;
    border: none;
    display: block;
}

.location-info {
    padding: 2rem 2rem 2.5rem;
}

.location-detail {
    margin-bottom: 1.5rem;
}

.location-detail-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4a90d9;
    margin-bottom: 0.35rem;
}

.location-detail-value {
    color: #cbd5e1;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.transport-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.transport-list > li {
    color: #cbd5e1;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.transport-list > li strong {
    color: #e2e8f0;
}

.sub-transport-list {
    list-style: lower-alpha;
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* ─── Registration ─── */
.register-wrap {
    background: #0a1828;
    padding: 5rem 1.5rem;
}

.form-card {
    background: #0d1f3c;
    border: 1px solid rgba(22,66,124,0.4);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    max-width: 860px;
    margin: 0 auto;
}

.form-label {
    display: block;
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    background: rgba(6,16,41,0.8);
    border: 1px solid rgba(22,66,124,0.5);
    color: #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.form-input:focus {
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74,144,217,0.15);
}

.form-input::placeholder { color: #334155; }

.form-input.border-red-500 { border-color: #ef4444 !important; }

.form-error {
    color: #f87171;
    font-size: 0.75rem;
    margin-top: 0.35rem;
    display: none;
}

.form-error.visible { display: block; }

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 640px) {
    .form-grid-2 { grid-template-columns: 1fr 1fr; }
}

.form-group { margin-bottom: 0; }

.privacy-text {
    color: #94a3b8;
    font-size: 0.8125rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.privacy-text a {
    color: #fbbf24;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.privacy-text a:hover {
    color: #fcd34d;
}

.register-notice {
    max-width: 860px;
    margin: 1.5rem auto 0;
    padding: 1.25rem 1.5rem;
    background: rgba(6,16,41,0.5);
    border-radius: 0.5rem;
}

.register-notice-title {
    text-align: left;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.register-notice ol {
    list-style: decimal;
    margin: 0;
    padding-left: 1.25rem;
    color: #94a3b8;
    font-size: 0.8125rem;
    line-height: 1.8;
}

.register-notice li {
    margin-bottom: 0.375rem;
    display: list-item;
}

.register-notice li:last-child {
    margin-bottom: 0;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-top: 0.5rem;
}

.checkbox-row input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #4a90d9;
    flex-shrink: 0;
}

.checkbox-row label {
    color: #94a3b8;
    font-size: 0.875rem;
}

.checkbox-row label a {
    color: #4a90d9;
    text-decoration: none;
}
.checkbox-row label a:hover { text-decoration: underline; }

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #16427c, #2a6db5);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(74,144,217,0.4);
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(22,66,124,0.4);
    margin-top: 0.5rem;
    font-family: inherit;
}
.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 36px rgba(42,109,181,0.6);
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6,16,41,0.85);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}
.modal-overlay.active { display: flex; }

.modal-box {
    background: #0d1f3c;
    border: 1px solid rgba(22,66,124,0.5);
    border-radius: 1rem;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s;
}
.modal-box.shown { transform: scale(1); opacity: 1; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid rgba(22,66,124,0.3);
    position: sticky;
    top: 0;
    background: #0d1f3c;
}

.modal-header h3 {
    color: #4a90d9;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.modal-close:hover { color: #e2e8f0; }

.modal-body {
    padding: 1.5rem 1.75rem 2rem;
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.8;
}

.modal-body h4 {
    color: #cbd5e1;
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
}

.modal-body ul {
    list-style: disc;
    margin-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ─── Footer ─── */
.site-footer {
    background: #030b1a;
    border-top: 1px solid rgba(22,66,124,0.3);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #334155;
    font-size: 0.875rem;
}

.site-footer a {
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer a:hover { color: #4a90d9; }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

/* ─── Hamburger ─── */
#hamburger-btn { background: none; border: none; cursor: pointer; padding: 0; color: #fff; }
@media (min-width: 768px) {
    #hamburger-btn { display: none; }
}