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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f0ebe3;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

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

.title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2a2725;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1.125rem;
    color: #5a5550;
    max-width: 768px;
    margin: 0 auto 16px auto;
    font-style: italic;
}

.tagline {
    font-size: 0.875rem;
    color: #7a7570;
}

.ecosystem-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.ecosystem-btn {
    background: rgba(61,97,120,0.1);
    color: #3d6178;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.ecosystem-btn:hover {
    background: rgba(61,97,120,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 97, 120, 0.25);
}

.ecosystem-btn.current {
    background: linear-gradient(135deg, #3d6178 0%, #6a9ab5 100%);
    color: white;
}

.card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 24px;
    margin-bottom: 32px;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2a2725;
    margin-bottom: 16px;
}

.species-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #3e3b38;
    margin-bottom: 8px;
}

.input {
    width: 100%;
    padding: 12px;
    border: 1.5px solid rgba(42,39,37,0.15);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.input:focus {
    outline: none;
    border-color: #3d6178;
    box-shadow: 0 0 0 3px rgba(61, 97, 120, 0.1);
}

.enhancement-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(61,97,120,0.05);
    border-radius: 12px;
    border: 1px solid rgba(61,97,120,0.15);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox {
    width: 18px;
    height: 18px;
    accent-color: #3d6178;
}

.checkbox-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #2a2725;
    cursor: pointer;
}

.btn {
    width: 100%;
    background: linear-gradient(135deg, #3d6178 0%, #6a9ab5 100%);
    color: white;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61, 97, 120, 0.3);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.progress {
    margin-top: 16px;
    padding: 16px;
    background: rgba(61,97,120,0.08);
    border-radius: 8px;
    border: 1px solid rgba(61,97,120,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    display: none;
}

.progress.show {
    display: flex;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(61,97,120,0.2);
    border-top: 3px solid #3d6178;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-text {
    color: #3d6178;
    font-weight: 500;
}

.results {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
    display: none;
}

.results.show {
    display: block;
}

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

.wisdom-grid {
    display: grid;
    gap: 24px;
}

.completion-banner {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(61,97,120,0.08);
    border-radius: 8px;
    border: 1px solid rgba(61,97,120,0.2);
    text-align: center;
}

.completion-text {
    color: #3d6178;
    font-weight: 500;
}

.export-btn {
    background: linear-gradient(135deg, #d6a86c 0%, #c49a50 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 16px;
    transition: all 0.3s ease;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(214, 168, 108, 0.3);
}

.special-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.special-card {
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid;
}

.physics-card {
    background: rgba(214,168,108,0.1);
    border-left-color: #d6a86c;
}

.contribution-card {
    background: rgba(61,97,120,0.08);
    border-left-color: #3d6178;
}

.research-card {
    background: rgba(196,122,82,0.08);
    border-left-color: #c47a52;
}

.special-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2a2725;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.special-content {
    color: #3e3b38;
    line-height: 1.6;
}

.contribute-btn {
    background: linear-gradient(135deg, #c47a52 0%, #a86540 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 500;
    margin-left: 8px;
    transition: all 0.3s ease;
}

.contribute-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 122, 82, 0.3);
}

.firebase-status {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(61, 97, 120, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    backdrop-filter: blur(5px);
    display: none;
}

.firebase-status.show {
    display: block;
    animation: fadeInSlide 0.5s ease;
}

.firebase-status.error {
    background: rgba(196, 82, 82, 0.9);
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

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

    .title {
        font-size: 2rem;
    }

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

    .enhancement-options {
        grid-template-columns: 1fr;
    }

    .ecosystem-nav {
        gap: 12px;
    }

    .ecosystem-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}
