@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary-purple: #8B5CF6;
    --primary-cyan: #06B6D4;
    --neon-pink: #FF10F0;
    --neon-blue: #10D7FF;
    --neon-green: #39FF14;
    --dark-bg: #0A0A0F;
    --card-bg: rgba(15, 15, 25, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #FFFFFF;
    --text-secondary: #B4B4B8;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 60% 30%, rgba(255, 16, 240, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #0A0A0F 0%, #1A1A2E 100%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(45deg); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.header {
    text-align: center;
    margin-bottom: 60px;
    padding: 60px 0;
}

.header h1 {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue), var(--neon-green));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: neonText 3s ease-in-out infinite;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(255, 16, 240, 0.5);
}

@keyframes neonText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header .subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 12px 40px rgba(255, 16, 240, 0.2); }
}

.section {
    margin-bottom: 80px;
}

.section.hidden {
    display: none;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title.ongoing {
    background: linear-gradient(45deg, var(--neon-pink), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title.upcoming {
    background: linear-gradient(45deg, var(--primary-cyan), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
}

.popup-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.popup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s;
}

.popup-card:hover::before {
    left: 100%;
}

.popup-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--neon-pink);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 16, 240, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.popup-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue), var(--neon-green));
    background-size: 200% 100%;
    animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.popup-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.popup-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-cyan));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.popup-location {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-content {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 16px;
}

/* 팝업 카드 클릭 가능 상태 */
.popup-card.clickable {
    cursor: pointer;
}

.popup-card.clickable:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--neon-pink);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 16, 240, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.popup-card.non-clickable {
    cursor: default;
    opacity: 0.8;
}

.status-badge {
    display: inline-block;
    top: 24px;
    right: 24px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.status-lastday {
    background: linear-gradient(135deg, #FF0080, #FF4040);
    color: white;
    animation: lastDayPulse 1.5s ease-in-out infinite;
}

.status-ongoing {
    background: linear-gradient(135deg, var(--neon-green), #00FF88);
    color: #000;
    animation: neonGlow 2s ease-in-out infinite;
}

.status-upcoming {
    background: linear-gradient(135deg, #FFA500, #FF6B35);
    color: white;
}

.status-ending {
    background: linear-gradient(135deg, #FF6B6B, var(--neon-pink));
    color: white;
    animation: urgentPulse 1s ease-in-out infinite;
}

.status-new {
    background: linear-gradient(135deg, var(--neon-blue), var(--primary-cyan));
    color: white;
    animation: newItemGlow 3s ease-in-out infinite;
}

@keyframes lastDayPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 15px rgba(255, 0, 128, 0.6);
    }
    50% { 
        transform: scale(1.08); 
        box-shadow: 0 0 25px rgba(255, 0, 128, 0.9), 0 0 35px rgba(255, 64, 64, 0.5);
    }
}

@keyframes neonGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(57, 255, 20, 0.5); }
    50% { box-shadow: 0 0 20px rgba(57, 255, 20, 0.8), 0 0 30px rgba(57, 255, 20, 0.4); }
}

@keyframes urgentPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes newItemGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(16, 215, 255, 0.5); }
    50% { box-shadow: 0 0 20px rgba(16, 215, 255, 0.8), 0 0 30px rgba(16, 215, 255, 0.4); }
}

.loading {
    text-align: center;
    padding: 60px 0;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.error {
    text-align: center;
    padding: 60px 0;
    color: #FF6B6B;
    font-size: 1.1rem;
}

/* 지역 필터 스타일 */
.location-filter {
    margin-bottom: 80px;
    text-align: center;
}

.filter-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-pink);
    box-shadow: 0 4px 15px rgba(255, 16, 240, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--neon-pink), var(--primary-purple));
    border-color: var(--neon-pink);
    box-shadow: 0 4px 20px rgba(255, 16, 240, 0.4);
}

.sub-filter {
    display: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    animation: fadeInDown 0.3s ease-out;
}

.sub-filter.show {
    display: flex;
}

.sub-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 400;
}

.sub-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--neon-blue);
}

.sub-filter-btn.active {
    background: linear-gradient(135deg, var(--neon-blue), var(--primary-cyan));
    color: white;
    border-color: var(--neon-blue);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 지역별 섹션 스타일 */
.region-section {
    margin-bottom: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
}

.region-title {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
    position: relative;
}

.region-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue));
}

.footer {
    text-align: center;
    padding: 60px 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.footer p {
    margin-bottom: 10px;
}

/* Floating particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--neon-pink);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }

    .header .subtitle {
        font-size: 1.1rem;
    }

    .popup-grid {
        grid-template-columns: 1fr;
    }

    .popup-card {
        padding: 24px;
    }

    .section-title {
        font-size: 2rem;
    }

    .filter-title {
        font-size: 1.5rem;
    }

    .filter-buttons {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .region-title {
        font-size: 1.5rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-pink), var(--neon-blue));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-blue), var(--neon-green));
}

/* CTA 배너 스타일 */
.cta-banner {
    position: relative;
    margin: 60px 0;
    padding: 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s;
}

.cta-banner:hover::before {
    left: 100%;
}

.cta-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue), var(--neon-green));
    background-size: 200% 100%;
    animation: borderFlow 3s linear infinite;
}

.cta-banner:hover {
    transform: translateY(-8px);
    border-color: var(--neon-pink);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 16, 240, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cta-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.cta-icon {
    font-size: 2.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.cta-text {
    flex: 1;
    color: var(--text-primary);
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-description {
    font-size: 1rem;
    margin: 0;
    color: var(--text-secondary);
    font-weight: 300;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--neon-pink), var(--primary-purple));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 16, 240, 0.3);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 16, 240, 0.4);
    background: linear-gradient(135deg, var(--neon-blue), var(--primary-cyan));
}

.cta-arrow {
    transition: transform 0.3s ease;
    font-size: 1.1rem;
}

.cta-button:hover .cta-arrow {
    transform: translateX(3px);
}

/* 장식 요소 */
.cta-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cta-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 3s infinite ease-in-out;
}

.cta-particle:nth-child(1) {
    top: 20%;
    right: 15%;
    animation-delay: 0s;
}

.cta-particle:nth-child(2) {
    top: 60%;
    right: 25%;
    animation-delay: 1s;
}

.cta-particle:nth-child(3) {
    top: 40%;
    right: 8%;
    animation-delay: 2s;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .cta-banner {
        margin: 40px 0;
        padding: 24px;
        border-radius: 20px;
    }
    
    .cta-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .cta-icon {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 1.3rem;
    }
    
    .cta-description {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    .cta-banner {
        transition: none;
    }
    
    .cta-banner:hover {
        transform: none;
    }
    
    .cta-icon {
        animation: none;
    }
    
    .cta-particle {
        animation: none;
        opacity: 0.2;
    }
    
    .cta-button:hover .cta-arrow {
        transform: none;
    }
}
