:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #f59e0b;
    --accent: #ec4899;
    --bg-dark: #020617;
    --card-bg: rgba(15, 23, 42, 0.6);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* Starry Background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 160px 120px, #ddd, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.15;
    z-index: -1;
    animation: stars 100s linear infinite;
}

@keyframes stars {
    from { transform: translateY(0); }
    to { transform: translateY(-1000px); }
}


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

.blob {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.3;
    animation: move 25s infinite alternate ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #4338ca, transparent);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #7e22ce, transparent);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #1d4ed8, transparent);
    top: 30%;
    left: 10%;
    animation-delay: -10s;
}

.blob-4 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #be185d, transparent);
    bottom: 20%;
    right: 15%;
    animation-delay: -15s;
}

@keyframes move {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(100px, 50px) scale(1.1) rotate(180deg); }
    100% { transform: translate(-50px, 150px) scale(0.9) rotate(360deg); }
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #fff 30%, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.header-badge {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    backdrop-filter: blur(10px);
}

/* Filter Section */
.filter-section {
    margin-bottom: 3.5rem;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    box-shadow: var(--shadow);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.filter-group label, .control-item label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    font-weight: 600;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.control-item select, .control-item input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.control-item select:focus, .control-item input:focus {
    border-color: var(--primary-light);
    background: rgba(0, 0, 0, 0.4);
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

@media (min-width: 1024px) {
    .search-item {
        grid-column: span 2;
    }
}

/* Event Grid */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}

/* Event Card */
.event-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.event-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-image-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

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

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(2, 6, 23, 0.8));
}

.favorite-btn {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.favorite-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.7);
}

.favorite-btn.active {
    color: #ff4d4d;
    background: rgba(255, 255, 255, 0.9);
    border-color: transparent;
}

.card-content {
    padding: 1.8rem;
    flex-grow: 1;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-night {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px rgba(99, 102, 241, 0.2); }
    to { box-shadow: 0 0 15px rgba(99, 102, 241, 0.6); }
}


.badge-festival {
    background: rgba(245, 158, 11, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.event-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    color: white;
}

.event-info-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.event-info-row svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.event-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-top: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    padding: 1.2rem 1.8rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.1);
}

.btn-detail {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-detail:hover {
    opacity: 0.9;
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-dark);
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    border-radius: 2.5rem;
    border: 1px solid var(--glass-border);
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modalSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-header-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.modal-body-content {
    padding: 3rem;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.modal-info-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.2rem;
    border-radius: 1.2rem;
    border: 1px solid var(--glass-border);
}

.modal-info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 700;
}

.modal-info-value {
    font-weight: 600;
    color: white;
}

.modal-description {
    font-size: 1.1rem;
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.btn-map {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    color: white;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-map:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Loading & Empty States */
.loading-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem;
}

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-border);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}
.loader::after {
    content: '';  
    box-sizing: border-box;
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary-light);
    width: 12px;
    height: 12px;
    transform: translate(-50%, 50%);
    border-radius: 50%;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem;
    background: var(--card-bg);
    border-radius: 2rem;
    border: 1px dashed var(--glass-border);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 5rem;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .logo { font-size: 2.8rem; }
    .modal-content { margin: 0; width: 100%; border-radius: 0; min-height: 100vh; }
    .modal-body-content { padding: 1.5rem; }
    .event-grid { grid-template-columns: 1fr; }
}
