:root {
    --primary-color: #2E7D32;
    /* Forest Green */
    --secondary-color: #81C784;
    /* Light Green */
    --accent-color: #FFB74D;
    /* Orange/Gold */
    --bg-color: #F1F8E9;
    /* Pale Green */
    --text-color: #1B5E20;
    /* Dark Green */
    --card-bg: #FFFFFF;
    --danger-color: #e57373;
    --font-main: 'Nunito', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

#language-selector {
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-family: var(--font-main);
    cursor: pointer;
    transition: background 0.3s;
}

#language-selector:hover {
    background: rgba(255, 255, 255, 0.3);
}

#language-selector option {
    background-color: white;
    color: var(--text-color);
}

nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 20px 0;
    flex-wrap: wrap;
}

.nav-btn {
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

.nav-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.container {
    width: 90%;
    max-width: 800px;
    margin-bottom: 50px;
}

section {
    display: none;
    /* Hidden by default */
    animation: fadeIn 0.5s ease-in-out;
}

section.active-section {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    border: 1px solid #E0E0E0;
}

h2,
h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 1.1rem;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-card {
    flex: 1;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: 0.2s;
}

.radio-card:hover {
    background: #e8f5e9;
}

.radio-card input {
    display: none;
}

.radio-card input:checked+span {
    font-weight: bold;
    color: var(--primary-color);
}

.radio-card:has(input:checked) {
    border-color: var(--primary-color);
    background: #e8f5e9;
}

select {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.select-with-add {
    display: flex;
    gap: 10px;
}

.select-with-add select {
    flex-grow: 1;
}

.color-box {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #ccc;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
}

.cta-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s;
}

.cta-btn:hover {
    background-color: #1b5e20;
    transform: scale(1.02);
}

.cta-btn:active {
    transform: scale(0.98);
}

.cta-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.danger-btn {
    background-color: #ffebee;
    border: 2px solid var(--danger-color);
    color: #c62828;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#leaf-list {
    list-style: none;
    padding: 0;
}

#leaf-list li {
    background: white;
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.leaf-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.result-box {
    text-align: center;
    background: #fff3e0;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    border: 2px solid var(--accent-color);
}

.result-box h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin: 10px 0;
}

/* Neural Network Vis Placeholder */
#neural-network-viz {
    width: 100%;
    height: 300px;
    background: white;
    border-radius: 15px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.educational-box {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 10px;
    border-left: 5px solid #2196f3;
    margin-top: 20px;
}

footer {
    width: 100%;
    margin-top: auto;
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    font-size: 0.9rem;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer .credits {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 5px;
}