:root {
    --bg-color: #f8fafc;
    --container-bg: #ffffff;
    --text-color: #1e293b;
    --heading-color: #0f172a;
    --accent-color: #e67e22;
    --secondary-color: #27ae60;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --passport-red: #be123c;
    --stamp-blue: #0369a1;
    --nav-bg: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.9);
}

body {
    background-color: var(--bg-color);
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    scroll-behavior: smooth;
}

/* Sticky Navigation */
.sticky-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px var(--shadow-color);
}

.nav-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--heading-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--stamp-blue);
}

/* App Wrapper adjustments for Nav */
.main-wrapper {
    margin-top: 80px;
}

.app-wrapper {
    background-color: white;
    width: 95%;
    max-width: 900px;
    margin: 40px auto;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.container {
    padding: 60px 40px;
}

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

.logo-icon { font-size: 3.5rem; margin-bottom: 15px; }
h1 { font-size: 2.5rem; color: var(--heading-color); margin: 0; font-weight: 900; }
.subtitle { color: #64748b; font-size: 1.1rem; margin-top: 10px; }

/* How It Works Articles */
.how-it-works {
    background: #f1f5f9;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    line-height: 1.7;
    border-left: 5px solid var(--stamp-blue);
}

.how-it-works h3 {
    margin-top: 0;
    color: var(--stamp-blue);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.how-it-works p {
    margin: 0;
    font-size: 1rem;
    color: #475569;
}

/* UI Sections */
.explorer-section { margin-bottom: 100px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 1.75rem; color: var(--heading-color); margin: 10px 0; font-weight: 800; }

.section-separator {
    height: 1px;
    background: #e2e8f0;
    margin: 80px 0;
}

/* Theme Toggle */
.theme-toggle-container {
    position: absolute;
    top: 100px;
    right: 40px;
}

.theme-toggle-button {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Search & Results */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.input-group { display: flex; flex-direction: column; gap: 20px; }
input[type="text"] { padding: 16px 20px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 1rem; }
input[type="text"]:focus { border-color: var(--stamp-blue); outline: none; }

.button-group { display: flex; gap: 12px; }
.action-button { flex: 1; padding: 14px; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.primary { background: var(--stamp-blue); color: white; }
.secondary { background: #f1f5f9; color: #475569; }

/* Animal Explorer */
.preview-frame {
    width: 100%;
    max-width: 450px;
    height: 320px;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8fafc;
}

/* Passport Card */
.passport-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    border: 2px dashed #cbd5e1;
    margin-top: 30px;
    box-shadow: 10px 10px 0px #f1f5f9;
}

/* Footer */
.main-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 40px 20px;
    text-align: center;
}

.footer-content p { color: #64748b; margin-bottom: 20px; font-weight: 500; }
.footer-links { display: flex; justify-content: center; gap: 30px; }
.footer-links a { text-decoration: none; color: #475569; font-weight: 600; font-size: 0.9rem; }
.footer-links a:hover { color: var(--stamp-blue); }

.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 30px; height: 30px; border: 3px solid #f3f3f3; border-top: 3px solid var(--stamp-blue); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; }
