/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --primary-bg: #eef2ff;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--gray-800);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 100%;
}

/* 헤더 */
.header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 0.75rem 1.5rem;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    font-family: 'Pretendard', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.location-selector {
    position: relative;
}

.location-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.location-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
}

.location-icon {
    font-size: 1rem;
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--gray-400);
    transition: transform 0.2s;
}

.location-btn:hover .dropdown-arrow {
    transform: translateY(2px);
}

.location-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-100);
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    animation: dropdownFade 0.2s ease;
}

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

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--gray-50);
}

.dropdown-item:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.dropdown-item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-bottom: none;
}

/* 채팅 컨테이너 */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

/* 채팅 메시지 영역 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
}

.chat-messages:has(.welcome-section:only-child) {
    justify-content: center;
    padding-bottom: 25%;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* 웰컴 섹션 */
.welcome-section {
    text-align: center;
    padding: 1rem;
    animation: welcomeFade 0.8s ease;
}

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

.welcome-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.welcome-icon-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #ddd6fe 50%, #fce7f3 100%);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.4; }
}

/* Localing 브랜드 아이콘 - 위치 핀 + L */
.welcome-icon-pin {
    position: relative;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 6px 16px rgba(99, 102, 241, 0.35));
}

.pin-head {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 -3px 6px rgba(0,0,0,0.15),
        inset 0 3px 6px rgba(255,255,255,0.25),
        0 2px 8px rgba(99, 102, 241, 0.3);
}

.pin-letter {
    transform: rotate(45deg);
    color: white;
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Pretendard', sans-serif;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.pin-point {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent) 100%);
    border-radius: 50%;
    margin: -5px auto 0;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.4);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.welcome-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.welcome-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.welcome-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--gray-600);
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
}

.welcome-tag:hover {
    border-color: var(--primary-light);
    background: var(--primary-bg);
    color: var(--primary);
    transform: translateY(-2px);
}

.example-queries {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.example-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.example-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-bg) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.example-btn:hover {
    border-color: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-light);
}

.example-btn:hover::before {
    opacity: 1;
}

.example-btn:active {
    transform: translateY(-2px);
}

.example-icon {
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.example-btn span:last-child {
    position: relative;
    z-index: 1;
}

/* 메시지 버블 */
.message {
    margin-bottom: 1.75rem;
    animation: messageSlide 0.4s ease;
}

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

.message-user {
    display: flex;
    justify-content: flex-end;
}

.message-user .message-bubble {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-xl) var(--radius-xl) 6px var(--radius-xl);
    padding: 0.875rem 1.25rem;
    max-width: 75%;
    font-size: 0.95rem;
    box-shadow: var(--shadow-md), 0 4px 12px rgba(99, 102, 241, 0.3);
}

.message-ai {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.message-ai .message-bubble {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 6px;
    padding: 1.25rem 1.5rem;
    max-width: 100%;
    width: 100%;
    box-shadow: var(--shadow-md);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.ai-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.ai-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.ai-text {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.parsed-info {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.parsed-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.2s ease;
}

.parsed-tag:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

/* 이벤트 그리드 */
.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

/* 이벤트 카드 */
.event-card-wrapper {
    display: flex;
    flex-direction: column;
    height: 200px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-card-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

/* 상단 이미지/아이콘 영역 */
.event-image {
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #e9e5ff 100%);
    font-size: 1.1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.event-image img {
    max-width: 30px;
    max-height: 28px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.event-image.placeholder {
    color: var(--primary);
}

/* 컨텐츠 영역 */
.event-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.4rem 0.5rem 0;
    overflow: hidden;
}

.event-category {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    display: inline-block;
    align-self: flex-start;
}

.event-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--gray-800);
    margin: 0.2rem 0;
}

.event-meta {
    font-size: 0.7rem;
    color: var(--gray-500);
    flex: 1;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.event-meta-item span:first-child {
    font-size: 0.7rem;
}

/* 하단 영역 (event-info 내부) */
.event-footer {
    height: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 -0.5rem 3px;
    padding: 3px 0.5rem;
    border-top: 1px solid var(--gray-200);
    background: white;
    margin-top: 4px;
}

.event-fee {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    padding: 0.2rem 0.5rem;
    background: var(--gray-100);
    border-radius: 4px;
}

.event-fee.free {
    color: var(--success);
    background: #d1fae5;
}

.event-source {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* 입력 영역 */
.input-container {
    padding: 1.25rem 1.5rem 1.5rem;
    background: linear-gradient(to top, white 0%, rgba(255,255,255,0.9) 100%);
    backdrop-filter: blur(10px);
}

/* 상단 입력창 스타일 */
.input-container.input-top {
    padding: 0.75rem 1.5rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-lg);
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    max-height: 150px;
    font-family: inherit;
    color: var(--gray-800);
}

.chat-input::placeholder {
    color: var(--gray-400);
}

.send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.send-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    box-shadow: none;
}

.send-btn:not(:disabled):hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

.send-btn:not(:disabled):active {
    transform: scale(0.98);
}

.input-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 0.625rem;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.25rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content p {
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 500;
}

/* 타이핑 인디케이터 */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 0.5rem 0;
}

.typing-indicator span {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 1rem;
    animation: modalFade 0.3s ease;
}

@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
    color: var(--gray-600);
}

.modal-close:hover {
    background: white;
    transform: scale(1.1);
}

.modal-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #ddd6fe 100%);
}

.modal-body {
    padding: 1.5rem;
}

.modal-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--gray-900);
    line-height: 1.4;
}

.modal-detail {
    margin-bottom: 1rem;
}

.modal-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.modal-detail-value {
    font-size: 0.95rem;
    color: var(--gray-700);
}

.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.modal-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

/* 이벤트 목록 헤더 */
.events-list-bubble {
    padding: 1.5rem !important;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.events-count {
    font-size: 0.95rem;
    color: var(--gray-600);
}

.events-count strong {
    color: var(--primary);
    font-weight: 700;
}

.events-region {
    font-size: 0.85rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

/* 페이지네이션 */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.load-more-btn {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.load-more-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 도움말 텍스트 */
.help-text {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
}


/* 유틸리티 */
.hidden {
    display: none !important;
}

/* 반응형 */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem 1rem;
    }

    .chat-messages {
        padding: 1.5rem 1rem;
    }

    .welcome-section {
        padding: 2rem 0.5rem 1.5rem;
    }

    .welcome-icon-bg {
        width: 70px;
        height: 70px;
    }

    .pin-head {
        width: 44px;
        height: 44px;
    }

    .pin-letter {
        font-size: 1.4rem;
    }

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

    .welcome-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .welcome-tags {
        gap: 0.375rem;
    }

    .welcome-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .example-queries {
        gap: 0.75rem;
    }

    .example-btn {
        padding: 1rem 0.75rem;
    }

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

    .message-user .message-bubble {
        max-width: 85%;
    }

    .input-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .example-btn {
        padding: 0.875rem 0.5rem;
        font-size: 0.85rem;
    }

    .example-icon {
        font-size: 1.75rem;
    }

    .input-wrapper {
        border-radius: var(--radius-lg);
    }

    .send-btn {
        width: 32px;
        height: 32px;
    }
}

/* 다크모드 대응 (선택적) */
@media (prefers-color-scheme: dark) {
    /* 추후 다크모드 지원시 사용 */
}

/* ============================================
   광고 영역 스타일
   ============================================ */

.ad-placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.75rem;
    gap: 0.25rem;
}

.ad-label {
    background: #cbd5e1;
    color: #64748b;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
}

.ad-text {
    font-size: 0.7rem;
}

/* 중간 배너 광고 */
.ad-banner {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

.ad-banner .ad-placeholder {
    width: 100%;
    max-width: 320px;
    height: 100px;
}

/* ============================================
   추천 이벤트 섹션 스타일 (가로 스크롤 카드)
   ============================================ */

.recommended-section {
    margin: 0.375rem 0 0.5rem;
    padding: 0.25rem 0.375rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-lg);
    border: 1px solid #fcd34d;
    overflow: hidden;
}

.recommended-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
    padding: 0 0.375rem;
}

.recommended-icon {
    font-size: 0.875rem;
}

.recommended-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #92400e;
}

.recommended-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
}

.recommended-nav-btn {
    width: 16px;
    height: 16px;
    border: none;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: bold;
    color: #92400e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.recommended-nav-btn:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transform: scale(1.1);
}

.recommended-nav-btn:active {
    transform: scale(0.95);
}

.recommended-list {
    display: flex;
    gap: 0.375rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.125rem 0.125rem 0.25rem;
    flex: 1;
}

.recommended-list::-webkit-scrollbar {
    display: none;
}

.recommended-card {
    flex: 0 0 100px;
    min-width: 100px;
    background: white;
    border-radius: var(--radius-md);
    padding: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    scroll-snap-align: start;
    position: relative;
}

.recommended-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.recommended-card-emoji {
    font-size: 1rem;
    margin-bottom: 0.125rem;
    display: block;
}

.recommended-card-title {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.125rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.4em;
}

.recommended-card-meta {
    font-size: 0.55rem;
    color: var(--gray-500);
    display: flex;
    flex-direction: column;
    gap: 0.0625rem;
}

.recommended-card-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommended-free {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    font-size: 0.5rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 0.0625rem 0.25rem;
    border-radius: 2px;
}

/* 전체 이벤트 섹션 헤더 */
.events-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.events-section-header span:first-child {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
}

.events-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
}

/* 모바일 반응형 */
@media (max-width: 640px) {
    .recommended-section {
        margin: 0.25rem 0 0.375rem;
        padding: 0.25rem 0.25rem;
    }

    .recommended-card {
        flex: 0 0 90px;
        min-width: 90px;
        padding: 0.3rem;
    }

    .recommended-card-emoji {
        font-size: 0.875rem;
    }

    .recommended-card-title {
        font-size: 0.6rem;
        height: 2.2em;
    }

    .recommended-card-meta {
        font-size: 0.5rem;
    }

    .events-section-header {
        margin-bottom: 0.5rem;
    }
}
