:root {
    --primary: #4a90e2;
    --secondary: #50e3c2;
    --dark: #1a1a2e;
    --light: #f4f7f6;
    --accent: #ff6b6b;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --font-main: 'Outfit', 'Noto Sans KR', sans-serif;
}

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

body {
    background-color: var(--dark);
    color: var(--light);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    padding: 2rem 5%;
    position: absolute;
    width: 100%;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--secondary);
}

section {
    padding: 100px 5%;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

#hero {
    background: radial-gradient(circle at top right, #2a2a4e, #1a1a2e);
    padding-top: 200px;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    color: var(--primary);
    display: block;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #a0a0c0;
    max-width: 500px;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.3);
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(74, 144, 226, 0.4);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    animation: float 6s ease-in-out infinite;
}

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

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

#finder {
    background: linear-gradient(rgba(26, 26, 46, 0.8), rgba(26, 26, 46, 0.8)), url('https://images.unsplash.com/photo-1444464666168-49d633b86747?auto=format&fit=crop&q=80&w=2000') center/cover;
}

.glass-search {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4rem;
    border-radius: 40px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.search-box {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.search-box input {
    flex: 1;
    padding: 1.2rem 2rem;
    border-radius: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    transition: background 0.3s;
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.2);
}

.search-box button {
    padding: 0 2.5rem;
    border-radius: 50px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--secondary);
}

.result-card {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(80, 227, 194, 0.2));
    border-radius: 20px;
    animation: fadeIn 0.5s ease-out;
}

.result-card h3 {
    font-size: 3rem;
    color: var(--secondary);
    margin-top: 0.5rem;
}

.hidden { display: none; }

#deep-dive {
    background: #24243e;
}

.info-layout {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.info-text {
    flex: 2;
}

.info-text h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 2rem 0 1rem;
}

.info-text p {
    color: #a0a0c0;
    font-size: 1.1rem;
}

.info-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-item {
    background: var(--glass);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.stat-label {
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Seasonal Section Styles */
#seasonal {
    background: #1a1a2e;
}

.seasonal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.seasonal-card {
    background: var(--glass);
    padding: 3rem 2rem;
    border-radius: 30px;
    text-align: center;
    transition: transform 0.4s ease, background 0.4s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.seasonal-card:hover {
    transform: translateY(-15px);
    background: rgba(255, 255, 255, 0.15);
}

.season-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.seasonal-card h3 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.seasonal-card p {
    color: #ddd;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.bird-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.bird-list li {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
}

.bird-list li:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--secondary);
}

.bird-list a {
    display: block;
    padding: 0.4rem 1rem;
    text-decoration: none;
    color: var(--primary);
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .info-layout {
        flex-direction: column;
        gap: 2rem;
    }
    
    .info-stats {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-item {
        flex: 1;
        min-width: 120px;
        padding: 1.5rem;
    }

    .stat-num {
        font-size: 1.8rem;
    }

    .info-text h3 {
        font-size: 1.5rem;
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 300px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

footer {
    padding: 3rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
}

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

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.5rem; }
    header { padding: 1rem 5%; }
    nav ul { display: none; }
    .glass-search { padding: 2rem; }
    .search-box { flex-direction: column; }
    .hero-image { display: none; }
}

/* ==========================================
   Chatbot Widget Styling
   ========================================== */

#chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-family: var(--font-main);
}

/* Trigger Button */
#chat-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#chat-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px rgba(74, 144, 226, 0.6);
}

.trigger-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--dark);
    animation: pulse 2s infinite;
}

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

/* Chat Widget Box (Glassmorphism) */
#chat-widget {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    border-radius: 24px;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom right;
}

#chat-widget.chat-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8) translateY(40px);
}

/* Header */
.chat-header {
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-bot-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.bot-avatar {
    font-size: 1.8rem;
}

.bot-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--light);
}

.bot-status {
    font-size: 0.75rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.bot-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--secondary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--secondary);
}

#chat-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

#chat-close:hover {
    color: var(--accent);
}

/* Messages Log Area */
.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

/* Scrollbar Customization */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Individual Message Bubble */
.chat-message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    animation: messageFadeIn 0.3s ease-out forwards;
}

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

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
}

.message-content {
    padding: 0.8rem 1.2rem;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}

.chat-message.bot .message-content {
    background: rgba(255, 255, 255, 0.08);
    color: var(--light);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, var(--primary), #3b76c4);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.2);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.4rem 0.8rem;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: typing 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 typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Quick Replies */
.chat-quick-replies {
    padding: 0.5rem 1rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-quick-replies::-webkit-scrollbar {
    display: none; /* Hide scrollbar for chips */
}

.quick-chip {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #c0c0d0;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-chip:hover {
    background: rgba(74, 144, 226, 0.15);
    border-color: var(--primary);
    color: var(--light);
}

/* Input Area */
.chat-input-container {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 30px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

#chat-input:focus {
    border-color: var(--primary);
}

#chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

#chat-send:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

/* Responsive adjustments for chatbot */
@media (max-width: 480px) {
    #chatbot-container {
        bottom: 20px;
        right: 20px;
    }
    #chat-widget {
        width: calc(100vw - 40px);
        height: 450px;
        bottom: 70px;
    }
}

/* ==========================================
   Chatbot Action UI Styles (Toast & Highlight)
   ========================================== */

#action-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.action-toast {
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(80, 227, 194, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: var(--light);
    padding: 1rem 1.8rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
               toastFadeOut 0.4s ease-out 3.6s forwards;
    white-space: nowrap;
}

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

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

/* Gallery Highlight Pulse Effect */
.gallery-highlight-pulse {
    animation: borderPulse 1s ease-in-out 3;
    position: relative;
    z-index: 10;
}

@keyframes borderPulse {
    0%, 100% {
        box-shadow: 0 0 0 0px rgba(80, 227, 194, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px 10px rgba(74, 144, 226, 0.9);
        transform: scale(1.03);
    }
}
