@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap');

:root {
    --bg-color: #0d0d0d;
    --nav-bg: rgba(13, 13, 13, 0.8);
    --primary-green: #8cb89c;
    --secondary-green: #b9e0c8;
    --text-color: #ffffff;
    --text-muted: #a1a1aa;
    --card-bg: rgba(140, 184, 156, 0.15);
    --border-color: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comic Sans MS', 'Comic Sans', 'Comic Neue', cursive, sans-serif;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(to bottom, #b9e0c8 0%, #8cb89c 20%, #2a2a2a 70%, #151515 100%);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #b9e0c8e6;
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 2px solid var(--primary-green);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a2f23;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    text-decoration: none;
}

.nav-logo-img {
    height: 35px;
    width: auto;
    filter: drop-shadow(0 0 2px rgba(26, 47, 35, 0.3));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-shadow:
        -1px -1px 0 var(--primary-green),
        1px -1px 0 var(--primary-green),
        -1px 1px 0 var(--primary-green),
        1px 1px 0 var(--primary-green);
}

.nav-links a:hover,
.nav-links a.active {
    color: #000;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background: url('../title_background.png') no-repeat center center/cover;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.hero-content {
    background: rgba(140, 184, 156, 0.15);
    padding: 3rem 4rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    position: relative;
    width: 800px;
    max-width: 90%;
}

.hero>* {
    position: relative;
    z-index: 1;
}

.title {
    font-size: 4.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 4px 4px 20px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.3rem;
    color: #8fbba2;
    margin-bottom: 2rem;
}

/* Search Container */
.search-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    resize: none;
    outline: none;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.search-box:focus {
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
    border-color: var(--primary-green);
}

.cta-button {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
    background: #8fbba2;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.7);
    background: var(--secondary-green);
}

.search-helper {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    border: 2px solid var(--primary-green);
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(74, 222, 128, 0.3);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--primary-green);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: Arial, sans-serif;
}

.close-btn:hover {
    color: #fff;
}

/* API Key Modal Specifics */
.api-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    text-align: center;
    position: relative;
    max-width: 500px;
    width: 90%;
    animation: zoomIn 0.3s ease;
}

.api-modal-title {
    font-size: 2.5rem;
    color: #98f8c1;
    margin-bottom: 1rem;
}

.api-modal-desc {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.api-modal-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    margin-bottom: 2rem;
    outline: none;
    transition: box-shadow 0.3s ease;
}

.api-modal-input:focus {
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
    border-color: var(--primary-green);
}

.api-status-msg {
    margin-top: 1rem;
    font-size: 1.1rem;
    height: 1.5rem;
    /* Prevent layout shift */
}

/* CTA Secondary Button override */
.cta-button.secondary {
    background: #1a2f23;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.cta-button.secondary:hover {
    background: #2d4f3b;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    color: #ffffff;
}