/* ==========================================
   CSS Variables & Theme Setup
========================================== */
:root {
    /* Ocean Colors (Bear Wave Base) */
    --ocean-dark: #008B8B;
    --ocean-primary: #87CEFA;
    --ocean-light: #E0FFFF;
    --wave-cyan: #48D1CC;

    /* Bear Colors (Accents) */
    --bear-brown: #8B4513;
    --bear-tan: #FFE4B5;
    --bear-gold: #FFD700;
    --bear-rust: #FF7F50;

    /* Neutrals */
    --text-main: #2C3E50;
    --text-muted: #7F8C8D;
    --bg-main: #FFF0EB;
    /* Peach/Coral Light Pink */
    --bg-card: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Layout */
    --max-width: 1200px;
    --navbar-height: 80px;
}

/* ==========================================
   Reset & Base Styles
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-height);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hide default cursor only on desktop */
@media (hover: hover) and (pointer: fine) {
    * {
        cursor: none !important;
    }
}

/* Custom SVG Cursor */
#cursor-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    margin-left: -3px;
    margin-top: -23px;
    pointer-events: none;
    z-index: 999999 !important;
    will-change: transform;
    display: none;
    /* Hide on mobile */
}

/* Show custom cursor only on desktop */
@media (hover: hover) and (pointer: fine) {
    #cursor-wrapper {
        display: block;
    }
}

#custom-cursor {
    width: 100%;
    height: 100%;
    transform-origin: 5% 47%;
    transform: rotate(45deg);
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#custom-cursor.recoil {
    transform: rotate(45deg) translate(8px, 0px);
    /* Recoil backwards */
}

/* Water drop animation */
.water-drop {
    position: fixed;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 30% 30%, #E0FFFF, #00E5FF);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 5px rgba(0, 229, 255, 0.5);
    animation: shootWater 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes shootWater {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--dx), calc(var(--dy) + 30px)) scale(0);
        opacity: 0;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================
   Components
========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-family: var(--font-sans);
}

.btn-primary {
    background: linear-gradient(135deg, var(--ocean-light), var(--wave-cyan));
    color: var(--ocean-dark);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.5);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.125rem;
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: var(--wave-cyan);
    color: var(--wave-cyan);
    background: rgba(0, 229, 255, 0.05);
}

.btn.disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ==========================================
   Navbar
========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background 0.3s ease;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to right, var(--ocean-primary), var(--bear-rust));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-logo i {
    color: var(--ocean-primary);
    -webkit-text-fill-color: initial;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.nav-links a:not(.btn):hover {
    color: var(--ocean-primary);
}

/* ==========================================
   Hero Section
========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--navbar-height);
    overflow: hidden;
    background: radial-gradient(circle at center, var(--ocean-primary) 0%, var(--bg-main) 70%);
}

.bubbles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(135, 206, 250, 0.15) 60%, rgba(255, 127, 80, 0.2) 100%);
    border-radius: 50%;
    box-shadow:
        inset 0 0 15px rgba(255, 255, 255, 0.8),
        inset 10px 0 20px rgba(0, 229, 255, 0.2),
        inset -10px 0 20px rgba(255, 127, 80, 0.2),
        0 0 10px rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.8);
    opacity: 0;
    animation: floatUp 15s linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-120vh) scale(1.2);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 24px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    margin-bottom: 24px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.hero-title>span {
    display: block;
    background: linear-gradient(135deg, var(--bear-rust), var(--bear-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: #ffffff;
    /* -webkit-text-stroke: 1px #000000; */
    margin-bottom: 40px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 48px;
    font-size: 1.125rem;
    font-weight: 500;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--bear-tan);
}

.wave-divider {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-bottom {
    bottom: -1px;
}

.wave-top {
    top: -1px;
    transform: rotate(180deg);
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(130% + 1.3px);
    height: 120px;
}

.wave-divider .shape-fill {
    fill: var(--bg-main);
}

/* ==========================================
   About Section
========================================== */
.about {
    padding: 120px 0;
    background: var(--bg-main);
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 3fr 7fr;
    gap: 64px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.highlight {
    color: var(--bear-gold);
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 24px;
}

.feature-list {
    margin-top: 32px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.feature-list i {
    color: var(--wave-cyan);
    font-size: 1.5rem;
}

.map-link {
    color: var(--ocean-dark);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.map-link:hover {
    color: var(--bear-rust);
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background: linear-gradient(135deg, var(--ocean-primary), var(--bear-tan));
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.8);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 24px;
}

.image-placeholder i {
    font-size: 4rem;
}

.panorama-container {
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: var(--ocean-dark);
}

.panorama-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.panorama-wrapper::-webkit-scrollbar {
    display: none;
}

.panorama-wrapper:active {
    cursor: grabbing;
}

.panorama-img {
    height: 100%;
    width: auto;
    max-width: none;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.panorama-overlay {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    backdrop-filter: blur(4px);
    pointer-events: none;
    opacity: 0.8;
}

/* ==========================================
   Schedule Section
========================================== */
.schedule {
    padding: 120px 0;
    background: linear-gradient(to bottom, var(--bg-main), var(--ocean-dark));
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 64px;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 120px;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(0, 0, 0, 0.1);
}

.timeline-item {
    display: flex;
    gap: 48px;
    margin-bottom: 48px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.time {
    width: 100px;
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bear-gold);
    text-align: right;
    padding-top: 4px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 115px;
    top: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--wave-cyan);
    box-shadow: 0 0 10px var(--wave-cyan);
}

.content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 32px;
    border-radius: 16px;
    flex-grow: 1;
    backdrop-filter: blur(10px);
}

.content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.content p {
    color: var(--text-muted);
}

.timeline-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline-column {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.column-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--ocean-dark);
    margin-bottom: 24px;
    text-align: center;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.1);
    padding-bottom: 16px;
}

.compact-timeline {
    position: relative;
}

.compact-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(0, 0, 0, 0.1);
}

.compact-timeline-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
    position: relative;
    padding-left: 28px;
}

.compact-timeline-item:last-child {
    margin-bottom: 0;
}

.compact-timeline-item::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--wave-cyan);
    box-shadow: 0 0 8px var(--wave-cyan);
}

.compact-time {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--bear-rust);
}

.compact-content h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.4;
}

.compact-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .timeline-container {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Registration Section
========================================== */
.register {
    padding: 120px 0;
    background: var(--bg-main);
}

.register .section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-top: -48px;
    margin-bottom: 64px;
}

.register-card {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(255, 255, 255, 0.4) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.required {
    color: var(--bear-rust);
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--wave-cyan);
    box-shadow: 0 0 0 3px rgba(72, 209, 204, 0.2);
}

/* Radio Group */
.radio-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.radio-label {
    display: block;
    position: relative;
    cursor: pointer;
    margin: 0;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-label span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.radio-label input:checked~span {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--bear-gold);
    color: var(--bear-brown);
}

.btn-submit {
    width: 100%;
    margin-top: 24px;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 32px 0;
}

.success-message.hidden {
    display: none;
}

.success-icon {
    font-size: 4rem;
    color: var(--wave-cyan);
    margin-bottom: 24px;
}

.success-message h3 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.success-message p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* ==========================================
   Footer
========================================== */
.footer {
    background: rgba(255, 255, 255, 0.5);
    padding: 64px 0 24px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.footer-brand i {
    color: var(--wave-cyan);
}

.footer-brand p {
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--wave-cyan);
    color: var(--ocean-dark);
    transform: translateY(-4px);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==========================================
   Photo Wall (Home Hero Overlay)
========================================== */
.home-hero {
    flex-direction: column;
}

.home-hero .hero-content {
    margin-bottom: 48px;
    z-index: 3;
}

.photo-wall {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 16px;
    padding: 0 24px;
    width: 100%;
    max-width: var(--max-width);
    height: 300px;
    justify-content: center;
}

.photo-item {
    flex: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2));
    background-size: var(--bg-size, cover);
    background-position: var(--bg-pos-x, 50%) var(--bg-pos-y, 50%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: flex 0.4s ease, transform 0.4s ease, background-size 0.4s ease, background-color 0.4s ease;
    overflow: hidden;
}

.photo-item i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
}

@media (hover: hover) and (pointer: fine) {
    .photo-item:hover {
        flex: 2;
        background-color: rgba(255, 255, 255, 0.8);
        transform: translateY(-10px);
        --bg-size: 130%;
    }
}

/* ==========================================
   Event List Section (Home)
========================================== */
.events {
    padding: 120px 0;
    background: var(--bg-main);
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--wave-cyan);
}

.event-image {
    position: relative;
    height: 240px;
}

.event-image .image-placeholder {
    height: 100%;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.event-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--bear-gold);
    color: var(--ocean-dark);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 16px;
    font-family: var(--font-heading);
}

.event-image .event-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    margin-bottom: 0;
}

.event-content {
    padding: 32px;
    text-align: center;
}

.event-content h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* Word Art Sticker Style */
.art-text-blue {
    position: relative;
    font-family: 'Arial Black', 'Impact', var(--font-heading), sans-serif;
    font-size: 1.3em;
    display: inline-block;
    letter-spacing: 2px;
    font-weight: 900;
    margin-left: 4px;
    white-space: nowrap;
    text-align: left;

    /* Main element handles the white text and thick white borders */
    color: #fff;
    -webkit-text-fill-color: #fff;
    text-shadow:
        -3px -3px 0 #fff,
        3px -3px 0 #fff,
        -3px 3px 0 #fff,
        3px 3px 0 #fff,
        -4px 0 0 #fff,
        4px 0 0 #fff,
        0 -4px 0 #fff,
        0 4px 0 #fff,
        0 6px 10px rgba(0, 0, 0, 0.15);
    /* Soft drop shadow */
}

/* Pseudo element draws the gradient text exactly ON TOP of the white base */
.art-text-blue::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    text-align: left;
    z-index: 1;
    white-space: nowrap;
    letter-spacing: inherit;
    /* Gradient fill */
    background: linear-gradient(to bottom, #f6b903 0%, #6eb5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    /* No shadow on the gradient layer */
    pointer-events: none;
}

.event-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.event-content .btn {
    width: 100%;
}

/* Event Detail Hero Backgrounds */
.event-hero.tamsui-bg {
    background: linear-gradient(135deg, #48c6ef 0%, #6f86d6 100%);
    position: relative;
    overflow: hidden;
}

.event-hero.parade-bg {
    background: radial-gradient(circle at center, #7e22ce 0%, var(--bg-main) 70%);
}

/* ==========================================
   Responsive Design
========================================== */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        flex-direction: column;
        gap: 16px;
    }

    .timeline-item::after {
        left: -6px;
        top: 0;
    }

    .time {
        text-align: left;
        padding-left: 24px;
        width: auto;
    }

    .photo-wall {
        height: 200px;
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    .nav-links a {
        display: none;
    }

    .btn-lang {
        margin-left: 0;
    }

    .hero-meta {
        flex-direction: column;
        gap: 16px;
    }

    .radio-group {
        grid-template-columns: 1fr;
    }

    .register-card {
        padding: 32px 24px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .photo-wall {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 16px;
    }

    .photo-item {
        flex: 0 0 75%;
        scroll-snap-align: center;
    }
}

/* ==========================================
   Register & Inquiry Hub (活動報名處)
   ========================================== */
.register-hub {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 48px;
    max-width: 720px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.hub-tabs {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 8px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: clamp(0.875rem, 2vw, 1.05rem);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.tab-btn:hover {
    color: #1A4B82;
    background: rgba(26, 75, 130, 0.05);
}

.tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #1A4B82 0%, #48c6ef 100%);
    box-shadow: 0 4px 15px rgba(26, 75, 130, 0.2);
}

.tab-content {
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hub-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hub-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.hub-form .form-group label {
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-form .form-group label i {
    color: #1A4B82;
}

.hub-form input[type="text"],
.hub-form input[type="email"] {
    padding: 14px 18px;
    border-radius: 12px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.hub-form input[type="text"]:focus,
.hub-form input[type="email"]:focus {
    border-color: #48c6ef;
    box-shadow: 0 0 0 4px rgba(72, 198, 239, 0.15);
    background: #ffffff;
}

.btn-full {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 成功展示卡片樣式 */
.success-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(46, 125, 50, 0.15);
    padding: 32px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.bank-info-box {
    background: linear-gradient(135deg, rgba(72, 198, 239, 0.05) 0%, rgba(26, 75, 130, 0.05) 100%);
    border: 1.5px dashed rgba(26, 75, 130, 0.15);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.bank-row {
    font-size: 1.05rem;
    color: var(--text-main);
}

.bank-row span {
    color: var(--text-muted);
}

.bank-row strong {
    font-weight: 700;
    color: #1A4B82;
}

.btn-copy {
    background: #1A4B82;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background: #48c6ef;
    transform: translateY(-1px);
}

.btn-copy:active {
    transform: translateY(0);
}

.alert-box {
    background: rgba(2, 136, 209, 0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #0288d1;
}

/* 統一提示訊息 */
.hub-message {
    margin-top: 20px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.hub-message.hidden {
    display: none;
}

.hub-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.hub-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* 🎫 電子門票/活動通行證樣式 */
.ticket-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-top: 10px;
    animation: fadeIn 0.5s ease forwards;
}

.ticket-header {
    background: linear-gradient(135deg, #1A4B82 0%, #48c6ef 100%);
    color: #ffffff;
    padding: 18px 24px;
    font-weight: 800;
    letter-spacing: 1.5px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
}

.ticket-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

/* 實體票券的左右圓孔裝飾線 */
.ticket-body::before,
.ticket-body::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    /* 跟大卡片的毛玻璃底色一致 */
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.ticket-body::before {
    left: -10px;
    transform: translateY(-50%);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.ticket-body::after {
    right: -10px;
    transform: translateY(-50%);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px dashed rgba(0, 0, 0, 0.05);
    padding-bottom: 14px;
}

.ticket-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ticket-row .label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.ticket-row .val {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.05rem;
}

/* 匯款狀態彩色 Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge.status-未匯款 {
    background: #ffebee;
    color: #c62828;
    border: 1px solid rgba(198, 40, 40, 0.15);
}

.badge.status-已登記 {
    background: #fff4e0;
    color: #e65100;
    border: 1px solid rgba(230, 81, 0, 0.15);
}

.badge.status-已確認收款 {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.15);
}

.table-badge {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(72, 198, 239, 0.1);
    color: #1A4B82;
    border: 1px solid rgba(26, 75, 130, 0.15);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .register-hub {
        padding: 24px;
    }

    .hub-tabs {
        flex-direction: column;
        gap: 6px;
    }

    .tab-btn {
        width: 100%;
        padding: 10px;
    }
}

/* ==========================================
   Global Utilities
   ========================================== */
.hidden {
    display: none !important;
}

/* ==========================================
   Custom Glassmorphic Modals (自訂彈出視窗)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 75, 130, 0.4);
    /* 浪熊深藍半透明背景 */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease forwards;
}

.modal-card {
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
    padding: 40px;
    max-width: 540px;
    width: 100%;
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    transform: rotate(90deg);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 576px) {
    .modal-card {
        padding: 24px;
        border-radius: 20px;
    }
}

/* ==========================================
   Multi-language Switcher (多語系切換)
   ========================================== */
.btn-lang {
    background: rgba(26, 75, 130, 0.1);
    color: #1A4B82;
    border: 1px solid rgba(26, 75, 130, 0.2);
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 20px;
    margin-left: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-lang:hover {
    background: #1A4B82;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(26, 75, 130, 0.2);
}

/* Hiding and showing language spans */
.lang-en:not(body) {
    display: none !important;
}

body.lang-en .lang-zh {
    display: none !important;
}

body.lang-en .lang-en {
    display: inline-block !important;
}

/* Block level display for language elements */
body.lang-en p.lang-en,
body.lang-en div.lang-en,
body.lang-en h2.lang-en,
body.lang-en h3.lang-en {
    display: block !important;
}

/* Handling select input custom styling */
.hub-form select,
.register-card select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%237F8C8D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    padding-right: 48px;
}

/* Optimize English hero title font sizes to prevent overflow */
body.lang-en .hero-title {
    font-size: clamp(2rem, 5.2vw, 3.8rem);
}

body.lang-en .hero-title .art-text-blue {
    font-size: 1.1em;
}

@media (max-width: 576px) {
    body.lang-en .hero-title {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }
}

@media (max-width: 380px) {
    body.lang-en .hero-title {
        font-size: clamp(1.35rem, 6vw, 1.8rem);
    }
}

/* Force English display inside the registration success modal for foreigners */
#reg-success-modal.force-en .lang-zh {
    display: none !important;
}

#reg-success-modal.force-en .lang-en {
    display: inline-block !important;
}

#reg-success-modal.force-en p.lang-en,
#reg-success-modal.force-en div.lang-en,
#reg-success-modal.force-en h2.lang-en,
#reg-success-modal.force-en h3.lang-en {
    display: block !important;
}

/* Accordion for Event Declaration & Notice */
.terms-accordion {
    width: 100%;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 75, 130, 0.05);
    border: 1px solid rgba(26, 75, 130, 0.15);
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    color: #1A4B82;
}

.accordion-content {
    border: 1px solid rgba(26, 75, 130, 0.15);
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: rgba(255, 255, 255, 0.4);
}

.accordion-inner {
    padding: 20px 8px 8px 8px;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.7;
    text-align: left;
}

.terms-list {
    padding-left: 20px;
    list-style-type: decimal;
}

.terms-list li {
    margin-bottom: 16px;
}

.terms-list li ul {
    margin-top: 8px;
    list-style-type: disc;
    padding-left: 20px;
}

.terms-list li ul li {
    margin-bottom: 4px;
}

.highlight {
    color: var(--bear-rust);
    font-weight: 600;
    font-size: 0.95em;
}

.terms-memo {
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 127, 80, 0.06);
    border-left: 4px solid var(--bear-rust);
    border-radius: 0 8px 8px 0;
}

.terms-memo ul {
    margin-top: 8px;
    list-style-type: none;
    padding-left: 0;
}

.terms-memo ul li {
    margin-bottom: 6px;
}

/* ==========================================
   Tab 4: Table Management Grid & Cards Styling
   ========================================== */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.table-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--bear-rust);
}

.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.015);
    border-bottom: 1px solid var(--border-color);
}

.table-card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
}

.table-card-title i {
    font-size: 1.1rem;
}

.table-card-body {
    padding: 20px 16px;
    flex: 1;
    display: flex;
    align-items: center;
}

.table-card-nickname {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-all;
    line-height: 1.4;
}

.table-card-footer {
    padding: 12px 16px 16px 16px;
}

/* Modals sizing variations */
.modal-card-small {
    max-width: 440px !important;
}

.modal-card-large {
    max-width: 800px !important;
    width: 95% !important;
}

/* ==========================================
   Table Editor Modal - Member Row Design
   ========================================== */
.member-row {
    background: #fbfbfb;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: stretch;
    gap: 16px;
    transition: all 0.25s ease;
}

.member-row:hover {
    background: #f9f9f9;
    border-color: rgba(255, 127, 80, 0.3);
}

.member-index-badge {
    align-self: center;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 6px;
    white-space: normal;
    text-align: center;
    min-width: 80px;
}

#member-row-1 .member-index-badge {
    background: rgba(255, 127, 80, 0.1);
    color: var(--bear-rust);
    border: 1.5px solid rgba(255, 127, 80, 0.2);
}

.member-inputs {
    flex: 1;
    display: grid;
    grid-template-columns: 5.5fr 1.2fr 2fr;
    gap: 18px;
    align-items: center;
}

.member-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.member-input-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.member-input-group input {
    background: #ffffff !important;
}

.member-name-display {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-all;
}

.member-action-col {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 80px;
}

.member-action-col:empty {
    display: none;
}

/* Scroll wrapper for editor body */
.modal-body-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.modal-body-scroll::-webkit-scrollbar {
    width: 6px;
}

.modal-body-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

/* ==========================================
   Responsive adjustments for member-row
   ========================================== */
@media (max-width: 768px) {
    .table-basic-info-box {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .member-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .member-index-badge {
        align-self: flex-start;
        width: 100%;
        text-align: center;
    }

    .member-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .member-action-col {
        justify-content: stretch;
        width: 100%;
    }

    .member-action-col button {
        width: 100%;
        padding: 10px;
    }
}

/* Color states for member rows (Validation Feedback) */
.member-row.row-success {
    background: #e8f5e9 !important;
    /* Pastel Green */
    border-color: #81c784 !important;
}

.member-row.row-success:hover {
    background: #e8f5e9 !important;
}

.member-row.row-error {
    background: #ffebee !important;
    /* Pastel Pink */
    border-color: #e57373 !important;
}

.member-row.row-error:hover {
    background: #ffebee !important;
}

/* Placeholder Color Override (Make placeholder text lighter to distinguish from actual input value) */
input::placeholder,
textarea::placeholder {
    color: #b0bec5 !important;
    /* Soft light blue-grey */
    opacity: 0.8 !important;
    font-weight: 400 !important;
}

/* 西門遊覽車額滿停售選項樣式 */
option.sold-out-option,
select option.sold-out-option {
    color: #ff4d4f !important;
    text-decoration: line-through !important;
}

/* ==========================================
   活動暫停報名公告樣式 (Registration Stopped Notice Card)
========================================== */
.reg-stopped-box {
    background: linear-gradient(135deg, rgba(255, 127, 80, 0.1), rgba(255, 215, 0, 0.08));
    border: 2px solid rgba(255, 127, 80, 0.35);
    border-radius: 16px;
    padding: 32px 24px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(255, 127, 80, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reg-stopped-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.reg-stopped-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bear-rust), var(--bear-gold));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 6px 16px rgba(255, 127, 80, 0.35);
    animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
    0% {
        transform: scale(1);
        box-shadow: 0 6px 16px rgba(255, 127, 80, 0.35);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 10px 24px rgba(255, 127, 80, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 6px 16px rgba(255, 127, 80, 0.35);
    }
}

.reg-stopped-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bear-rust);
    letter-spacing: -0.5px;
}

.reg-stopped-body {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 127, 80, 0.2);
    margin-bottom: 18px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    text-align: left;
}

.reg-stopped-message {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-main);
    font-weight: 600;
    word-break: break-word;
    text-align: left;
}

.reg-stopped-footer {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}