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

body {
    font-family: 'Poppins', sans-serif;
    background: #f0ebe3;
    min-height: 100vh;
    color: #3e3b38;
    overflow-x: hidden;
    line-height: 1.6;
}

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

.glass {
    background: rgba(240, 235, 227, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(61, 97, 120, 0.2);
    box-shadow: 0 8px 32px rgba(42, 39, 37, 0.15);
}

.header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.9);
}

.header h1 {
    font-size: 2.5em;
    color: #2a2725;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    color: #3d6178;
    font-size: 1.1em;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 20px;
}

.header .subtitle {
    background: linear-gradient(135deg, #d6a86c, #e0bb85);
    color: #3e3b38;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}

/* ====== AUTH SCREEN (light theme) ====== */
.auth-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    min-height: 50vh;
}
.auth-screen.hidden { display: none; }
.auth-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 16px;
    opacity: 0.9;
}
.auth-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #2a2725;
    margin-bottom: 8px;
}
.auth-text {
    font-size: 0.95em;
    color: #7a7570;
    max-width: 480px;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.7;
}
.auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    border-radius: 12px;
    border: 1px solid rgba(61, 97, 120, 0.3);
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}
.auth-btn:hover {
    background: white;
    border-color: #3d6178;
    box-shadow: 0 4px 20px rgba(61, 97, 120, 0.2);
}
.auth-btn svg { width: 20px; height: 20px; }
.auth-note {
    margin-top: 20px;
    color: #9a918a;
    font-size: 0.85em;
}
.auth-note a {
    color: #3d6178;
    text-decoration: none;
}
.auth-note a:hover {
    text-decoration: underline;
}
.auth-consent {
    margin-top: 8px;
    font-size: 0.78em;
    color: #b0b7c3;
    text-align: center;
    max-width: 360px;
    line-height: 1.5;
}
.auth-consent a {
    color: #7a7570;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}
.auth-consent a:hover {
    color: #3d6178;
}
.upgrade-message {
    text-align: center;
    padding: 30px;
    max-width: 480px;
}
.upgrade-message h3 {
    color: #2a2725;
    margin-bottom: 12px;
    font-size: 1.3em;
}
.upgrade-message p {
    color: #7a7570;
    line-height: 1.7;
    margin-bottom: 16px;
}
.upgrade-btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #3d6178, #2d4a5e);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}
.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 97, 120, 0.4);
}
.sign-out-link {
    color: #9a918a;
    font-size: 0.85em;
    cursor: pointer;
    border: none;
    background: none;
    text-decoration: underline;
    font-family: 'Poppins', sans-serif;
}
/* ====== EMAIL LINK AUTH ====== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    width: 100%;
    max-width: 320px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(209, 213, 219, 0.6);
}
.auth-divider span {
    font-size: 0.85em;
    color: #9a918a;
}
.email-signin-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}
.email-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.6);
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    font-size: 1em;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}
.email-input:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(165, 180, 252, 0.15);
}
.email-input::placeholder {
    color: #9a918a;
}
.email-signin-btn {
    width: 100%;
    padding: 14px 32px;
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.6);
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    font-size: 1em;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}
.email-signin-btn:hover {
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
.email-signin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.email-status {
    font-size: 0.85em;
    color: #059669;
    text-align: center;
    max-width: 320px;
    line-height: 1.5;
}
.email-status.error {
    color: #dc2626;
}
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0 20px 0;
    flex-wrap: wrap;
}

.category-tab {
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(61, 97, 120, 0.3);
    border-radius: 25px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #2a2725;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tab:hover {
    background: rgba(61, 97, 120, 0.1);
    border-color: #3d6178;
    transform: translateY(-2px);
}

.category-tab.active {
    background: linear-gradient(135deg, #d6a86c, #e0bb85);
    border-color: #d6a86c;
    color: #3e3b38;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(214, 168, 108, 0.3);
}

.category-icon {
    font-size: 18px;
}

.species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 20px 0;
    min-height: 400px;
}

.species-category {
    display: none;
    animation: fadeIn 0.4s ease-in;
}

.species-category.active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.species-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.species-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #3d6178, #d6a86c);
}

.species-card:hover {
    transform: translateY(-5px);
    border-color: #3d6178;
    box-shadow: 0 10px 30px rgba(61, 97, 120, 0.2);
}

.species-card.active {
    border-color: #d6a86c;
    box-shadow: 0 10px 30px rgba(214, 168, 108, 0.3);
}

.species-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.species-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #2a2725;
    margin-bottom: 10px;
}

.species-description {
    color: #3e3b38;
    font-size: 0.95em;
    line-height: 1.5;
}

.bridge-analysis {
    display: none;
    margin-top: 30px;
    animation: fadeIn 0.6s ease-in;
}

.bridge-analysis.show {
    display: block;
}

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

.bridge-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(214, 168, 108, 0.1), rgba(249, 237, 101, 0.1));
    border-radius: 20px;
    border: 1px solid rgba(214, 168, 108, 0.3);
}

.bridge-title {
    font-size: 2em;
    color: #2a2725;
    margin-bottom: 10px;
    font-weight: 700;
}

.bridge-subtitle {
    color: #d6a86c;
    font-style: italic;
    font-size: 1.2em;
    font-weight: 500;
}

.bridge-section {
    margin: 25px 0;
    padding: 25px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(61, 97, 120, 0.2);
}

.bridge-section h3 {
    color: #2a2725;
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.competitive-approach {
    background: rgba(255, 200, 200, 0.3);
    border-left: 4px solid #ff6b6b;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.collaborative-approach {
    background: rgba(200, 255, 200, 0.3);
    border-left: 4px solid #3d6178;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.harmony-list, .translation-list, .frequency-list, .suggestion-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.harmony-list li, .translation-list li, .frequency-list li, .suggestion-list li {
    padding: 12px 0;
    padding-left: 25px;
    position: relative;
    border-bottom: 1px solid rgba(61, 97, 120, 0.1);
    line-height: 1.6;
}

.harmony-list li:before, .translation-list li:before, .frequency-list li:before, .suggestion-list li:before {
    content: "\2728";
    position: absolute;
    left: 0;
    color: #d6a86c;
    font-size: 1.2em;
}

.cta-section {
    text-align: center;
    padding: 40px;
    margin: 40px 0;
    background: linear-gradient(135deg, rgba(61, 97, 120, 0.1), rgba(45, 74, 94, 0.1));
    border-radius: 20px;
    border: 1px solid rgba(61, 97, 120, 0.3);
}

.cta-button {
    background: linear-gradient(135deg, #3d6178, #2d4a5e);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(61, 97, 120, 0.3);
    margin: 10px;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(61, 97, 120, 0.4);
}

.about-section {
    padding: 30px;
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    border: 1px solid rgba(157, 170, 236, 0.3);
}

.footer {
    text-align: center;
    padding: 30px;
    margin-top: 50px;
    background: rgba(42, 39, 37, 0.1);
    border-radius: 15px;
    color: #2a2725;
    font-size: 0.9em;
}

.footer a {
    color: #3d6178;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 2em;
    }

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