/* Base Styles */
body {
    background: linear-gradient(135deg, #1e3a8a, #2563eb, #0f172a);
    background-size: 600% 600%;
    animation: colorShift 20s ease infinite;
    padding-top: 0;
    scroll-padding-top: 80px; /* Space for fixed header */
}

/* Sticky Header */
#main-header {
    transition: all 0.3s ease-in-out;
    will-change: transform, background-color, box-shadow;
}

#main-header.bg-opacity-90 {
    background-color: rgba(30, 58, 138, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

#main-header.-translate-y-full {
    transform: translateY(-100%);
}

/* Mobile Menu */
#mobile-menu {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in-out;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 500px; /* Adjust based on your content */
    opacity: 1;
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #3b82f6;
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

@keyframes colorShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.bubble {
    position: absolute;
    bottom: -50px;
    width: 15px;
    height: 15px;
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    animation: rise 12s linear infinite;
    filter: blur(1px);
    pointer-events: none;
    z-index: 0;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

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

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.wave svg {
    width: 200%;
    height: 100%;
    animation: waveMove 15s linear infinite;
}

@keyframes waveMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

main {
    background-color: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(12px);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.event-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: rgba(99, 102, 241, 0.5);
}

.event-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.event-image img {
    transition: transform 0.7s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.event-status {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.event-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
    transition: color 0.3s ease;
}

.event-card:hover .event-title {
    color: #6366f1;
}

.event-description {
    color: #d1d5db;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.event-meta {
    display: flex;
    align-items: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.event-meta i {
    margin-right: 0.5rem;
    color: #6366f1;
}

.event-type {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #6366f1;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.no-events {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 3rem 2rem;
}

.no-events i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #6366f1;
    opacity: 0.5;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
    font-size: 2.25rem;
    font-weight: 800;
    color: white;
    text-align: center;
    width: 100%;
}

.section-title:after {
    content: "";
    position: absolute;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.emoji-picker-container {
    position: relative;
    display: flex;
    align-items: center;
}

emoji-picker {
    position: absolute;
    bottom: 120%;
    right: 0;
    z-index: 100;
    width: 300px;
    max-height: 250px;
    overflow: auto;
    --emoji-size: 1.2rem;
    --emoji-padding: 0.5rem;
    display: none; /* Tetap di sini kalau class .visible digunakan */
}

emoji-picker.visible {
    display: block;
}

[aria-labelledby="user-menu"] {
    z-index: 9999;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

[aria-labelledby="user-menu"].block {
    opacity: 1;
    transform: translateY(0);
    display: block !important;
}

[aria-labelledby="user-menu"].hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

[x-cloak] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}
/* Improve tap targets on mobile */
a,
button,
[role="button"],
input,
textarea,
select,
label {
    touch-action: manipulation;
}
/* Prevent iOS text size adjust after orientation change */
body {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}
