:root {
    --primary: #FF5E5B;
    --secondary: #FFFFEA;
    --accent: #00CECB;
    --dark: #2C2C2C;
    --text: #333;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --gradient: linear-gradient(135deg, var(--primary), var(--accent));
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--secondary);
    color: var(--text);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--dark);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.header-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(2);
    transform-origin: left center;
    /* Anchors zoom to left, preventing layout shift */
    margin-top: 5px;
    margin-left: 10px;
}

.header-logo-img:hover {
    transform: scale(2.05);
    /* Subtle interactive pop */
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary);
}

.auth-btn {
    padding: 0.5rem 1.5rem;
    background: var(--gradient);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.auth-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    color: #fff;
}

/* Hero Section */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
    /* Offset for fixed header */
    min-height: calc(100vh - 80px);
    /* Adjust height */
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--dark);
    padding: 3rem;
    background: rgba(255, 255, 255, 0.9);
    /* More opaque background for readability */
    backdrop-filter: blur(15px);
    border-radius: 30px;
    max-width: 800px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-transform: uppercase;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 20px rgba(255, 94, 91, 0.3));
    }

    to {
        filter: drop-shadow(0 0 30px rgba(0, 206, 203, 0.4));
    }
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-btn {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    background: var(--gradient);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 206, 203, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.cta-btn:hover::before {
    left: 100%;
}

.cta-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 206, 203, 0.5);
    color: #fff;
}

/* Sections General */
section {
    padding: 5rem 5%;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Countdown */
#countdown {
    background: var(--gradient);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#countdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.timer {
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 4vw, 3rem);
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.time-unit {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.time-unit:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.time-unit span {
    display: block;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1;
}

.time-unit small {
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-top: 0.5rem;
    display: block;
    opacity: 0.9;
}

/* Event Highlights */
.highlight-item {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    /* Ensure images stay inside */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: var(--transition);
}

.highlight-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.highlight-item h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Organizer Cards */
.organizer-card {
    transition: var(--transition);
}

.organizer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Participation Cards */
.participation-card {
    transition: var(--transition);
}

.participation-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Purpose Items */
.purpose-item {
    transition: var(--transition);
}

.purpose-item:hover {
    transform: translateY(-5px);
}

.purpose-item h3 {
    transition: var(--transition);
}

.purpose-item:hover h3 {
    color: var(--accent);
    transform: scale(1.05);
}

/* Footer */
footer {
    background: var(--dark);
    color: #fff;
    padding: 2rem 0 1rem;
    text-align: center;
    width: 100%;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 5%;
}

.footer-logo h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    opacity: 0.7;
}

footer a {
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        /* White mobile menu */
        backdrop-filter: blur(20px);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        transition: right 0.3s ease;
        z-index: 999;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 2rem;
        height: 100%;
    }

    nav a {
        font-size: 1.2rem;
        padding: 1rem;
        border-radius: 10px;
        transition: var(--transition);
        display: block;
        width: 100%;
    }

    nav a:hover {
        background: var(--gradient);
        color: #fff;
        transform: translateX(10px);
    }

    /* Hide ONLY the header auth button */
    header .auth-btn {
        display: none;
    }

    /* Ensure other auth-btns are visible and full width if needed */
    .event-card .auth-btn {
        display: block !important;
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }

    /* Fix Horizontal Scroll Section */
    .horizontal-scroll-container {
        display: flex;
        gap: 1.5rem;
        overflow-x: auto;
        padding-bottom: 2rem;
        width: 100%;
        -webkit-overflow-scrolling: touch;
        /* smooth scroll iOS */
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
    }

    .horizontal-scroll-container::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .hero-content {
        padding: 2rem 1rem;
        margin: 1rem;
        width: 95%;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .timer {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .time-unit {
        padding: 1rem;
        min-width: calc(33% - 0.7rem);
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .highlights-grid {
        grid-template-columns: 1fr;
    }

    /* Fix Hero Overlap on Mobile */
    #hero {
        align-items: flex-start !important;
        /* Prevent centering from pushing content up */
        padding-top: 160px !important;
        /* Ensure content starts below header */
    }

    .hero-content-wrapper {
        margin-top: 2rem;
        /* Additional breathing room */
        padding: 1rem !important;
    }


    /* Contact Page Mobile */
    .contact-container {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }

    /* Upcoming Page Mobile */
    .event-card {
        flex-direction: column !important;
    }

    .event-thumb {
        width: 100% !important;
        height: 250px !important;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .cta-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }

    .time-unit {
        min-width: calc(50% - 0.5rem);
    }

    .section-title {
        font-size: 2rem;
    }

    section {
        padding: 3rem 5%;
    }

    /* Fix Hero Buttons on mobile */
    #hero .hero-content-wrapper>div {
        flex-direction: column;
        align-items: center;
        gap: 1rem !important;
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient);
    z-index: 10000;
    transition: width 0.1s ease;
}

/* Lucky Draw Page */
.luckydraw-hero {
    height: 60vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/luckydraw-hero.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 80px;
    padding: 0 5%;
}

.luckydraw-hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: #fff;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
}

.luckydraw-hero p {
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 4rem 5%;
    background: #fff9f0;
}

.prize-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid rgba(255, 94, 91, 0.1);
    position: relative;
    overflow: hidden;
}

.prize-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 94, 91, 0.2);
}

.prize-rank {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.2rem;
    border-bottom-right-radius: 20px;
    font-weight: 800;
    z-index: 1;
    font-family: var(--font-heading);
}

.prize-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

.prize-title {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.bonus-prize {
    background: var(--gradient);
    color: white;
    padding: 4rem 5%;
    text-align: center;
    border-radius: 40px;
    margin: 4rem 5%;
    box-shadow: 0 15px 40px rgba(255, 94, 91, 0.3);
}

.bonus-prize h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.bonus-prize p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

.luckydraw-form-section {
    background: #fff;
    padding: 4rem 5%;
    max-width: 800px;
    margin: 4rem auto;
    border-radius: 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0,0,0,0.05);
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.luckydraw-form {
    display: grid;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1rem;
}

.form-group input, .form-group textarea {
    padding: 1.2rem;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: #fdfdfd;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 20px rgba(255, 94, 91, 0.1);
    background: #fff;
}

.submit-btn {
    padding: 1.4rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 94, 91, 0.4);
}

.draw-info-footer {
    background: var(--dark);
    color: white;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    font-weight: 600;
    text-align: center;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item small {
    text-transform: uppercase;
    opacity: 0.7;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.success-message {
    text-align: center;
    padding: 4rem 2rem;
}

.coupon-box {
    background: #fff9f0;
    border: 3px dashed var(--primary);
    padding: 2rem;
    border-radius: 20px;
    margin: 2rem 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .luckydraw-hero { height: 50vh; }
    .luckydraw-form-section { margin: 2rem 5%; padding: 2.5rem 1.5rem; }
    .bonus-prize { border-radius: 25px; }
    .draw-info-footer { flex-direction: column; }
}
