:root {
    --bg-main: #FDFBF7; /* Bright elegant background */
    --accent-primary: #E76F51; /* Lively warm terracotta */
    --accent-primary-hover: #D65A31;
    --accent-secondary: #2A9D8F; /* Lively teal/green */
    --accent-gold: #F4A261; /* Bright gold/orange */
    --text-primary: #264653; /* Elegant dark slate */
    --text-secondary: #5C6E76;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 1);
    --glass-shadow: 0 8px 32px 0 rgba(38, 70, 83, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Blobs for Animation */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(231,111,81,0.15) 0%, rgba(253,251,247,0) 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(42,157,143,0.15) 0%, rgba(253,251,247,0) 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(244,162,97,0.15) 0%, rgba(253,251,247,0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5%, 5%) scale(1.05); }
    66% { transform: translate(-5%, 2%) scale(0.95); }
}

/* Glassmorphism utility */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(253, 251, 247, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-primary);
    letter-spacing: 2px;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-primary);
}

/* Buttons */
.btn-primary, .btn-primary-outline, .btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-hover) 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(231, 111, 81, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 111, 81, 0.4);
    color: #ffffff;
}

.btn-primary-outline {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.7rem 1.9rem; /* account for border */
}

.btn-primary-outline:hover {
    background: rgba(231, 111, 81, 0.1);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #ffffff;
    border: 2px solid #ffffff;
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(38, 70, 83, 0.1);
}

.btn-secondary:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    transform: translateY(-2px);
}

/* Layout */
main {
    padding-top: 100px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 5%;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(42, 157, 143, 0.1);
    border: 1px solid rgba(42, 157, 143, 0.3);
    color: var(--accent-secondary);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.title {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.8rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 3px;
}

.description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-card {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1;
    height: auto;
    padding: 15px;
    background: #ffffff; /* Make the polaroid style pop */
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.image-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.02);
}

.dm-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    border: 2px dashed rgba(42, 157, 143, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(42, 157, 143, 0.05);
    background-size: cover;
    background-position: center;
}

.photo-content {
    color: var(--text-secondary);
}

.image-icon {
    font-size: 3rem;
    display: block;
    margin-top: 1rem;
    opacity: 0.5;
}

/* About Section */
.about {
    padding: 6rem 5%;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.about-text {
    flex: 1.2;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.8);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.about-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.about-list li span {
    margin-right: 1rem;
    font-size: 1.5rem;
}

.about-image {
    flex: 1;
}

.about-image .image-wrapper {
    width: 100%;
    height: 450px;
    padding: 15px;
    background: #ffffff;
}

/* Details Section */
.details {
    padding: 6rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.divider {
    height: 4px;
    width: 60px;
    background: var(--accent-secondary);
    margin: 0 auto;
    border-radius: 4px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(38, 70, 83, 0.12);
    border-color: rgba(42, 157, 143, 0.3);
}

.icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.info-card h3 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.highlight {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.price {
    color: var(--accent-primary);
    font-size: 2.2rem;
}

/* Register Section */
.register {
    padding: 4rem 5% 8rem;
    display: flex;
    justify-content: center;
}

.form-container {
    width: 100%;
    max-width: 600px;
    padding: 4rem;
    background: rgba(255, 255, 255, 0.9);
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--accent-primary);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.query-message {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-align: left;
}

.form-header p {
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.phone-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.phone-prefix {
    position: absolute;
    left: 1.2rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    pointer-events: none;
}

.phone-input-wrapper input {
    padding-left: 2.8rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

input, textarea {
    width: 100%;
    background: rgba(253, 251, 247, 0.8);
    border: 2px solid rgba(38, 70, 83, 0.1);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.1);
}

.focus-border {
    display: none; /* Replaced by border-color transition */
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    margin-top: 1rem;
    border-radius: 12px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2.5rem;
    border-top: 1px solid rgba(38, 70, 83, 0.1);
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: #ffffff;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .about-content {
        flex-direction: column-reverse;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        margin-top: 2rem;
    }

    .title {
        font-size: 3.5rem;
    }

    .subtitle {
        font-size: 1.4rem;
    }

    .description {
        margin: 0 auto 2.5rem;
    }

    .cta-group {
        justify-content: center;
    }

    .image-card {
        transform: none;
        height: 500px;
    }

    .image-card:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 600px) {
    .form-container {
        padding: 2rem;
    }
    
    .title {
        font-size: 2.8rem;
    }
}

/* Festival Animations */
.festival-animations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0; 
    overflow: hidden;
}

.floating-element {
    position: absolute;
    top: -10vh;
    opacity: 0.6;
    animation: floatDown linear forwards;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

@keyframes floatDown {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    50% {
        transform: translateY(55vh) rotate(180deg) scale(1.2);
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(110vh) rotate(360deg) scale(1);
        opacity: 0;
    }
}

.dragon-boat-crossing {
    position: fixed;
    bottom: 5vh;
    left: -150px;
    font-size: 3rem;
    pointer-events: none;
    z-index: 90;
    animation: sailAcross 20s linear forwards;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

@keyframes sailAcross {
    0% {
        transform: translateX(0) rotate(-2deg);
    }
    25% {
        transform: translateX(30vw) rotate(2deg) translateY(-10px);
    }
    50% {
        transform: translateX(60vw) rotate(-2deg) translateY(0px);
    }
    75% {
        transform: translateX(90vw) rotate(2deg) translateY(-10px);
    }
    100% {
        transform: translateX(calc(100vw + 150px)) rotate(-2deg);
    }
}
