* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    color: #000000;
    min-height: 100vh;
    padding-bottom: 1rem;
}

.container {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.search-section {
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 1rem;
    background-color: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
}

.search-input::placeholder {
    color: #888;
}

.crops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.crop-item {
    background-color: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 8px;
    padding: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    color: #ffffff;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.crop-item:hover, .crop-item:focus {
    border-color: #0066cc;
}

.crop-item.selected {
    border-color: #0066cc;
    background-color: #1a3d5c;
}

.crop-icon {
    width: 24px;
    height: 24px;
    font-size: 20px;
}

.mutations-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mutation-section {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 1.2rem;
}

.mutation-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: #ffffff;
}

.mutation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mutation-btn {
    padding: 0.6rem 0.9rem;
    background-color: #404040;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
    min-height: 42px;
}

.mutation-btn:hover, .mutation-btn:focus {
    background-color: #505050;
}

.mutation-btn.active {
    background-color: #0066cc;
}

.environmental-mutations {
    grid-column: 1 / -1;
}

.environmental-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
}

.controls-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    background-color: #2d2d2d;
    padding: 1.2rem;
    border-radius: 8px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-label {
    font-weight: bold;
    color: #cccccc;
    font-size: 0.95rem;
}

.control-input {
    padding: 0.7rem;
    background-color: #404040;
    border: 1px solid #555;
    border-radius: 4px;
    color: #ffffff;
    font-size: 1rem;
    min-height: 42px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider {
    flex: 1;
    height: 6px;
    background-color: #404040;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background-color: #0066cc;
    border-radius: 50%;
    cursor: pointer;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-switch {
    width: 50px;
    height: 25px;
    background-color: #404040;
    border-radius: 25px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toggle-switch.active {
    background-color: #0066cc;
}

.toggle-knob {
    width: 21px;
    height: 21px;
    background-color: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}

.toggle-switch.active .toggle-knob {
    transform: translateX(25px);
}

.reset-btn {
    padding: 0.8rem 1rem;
    background-color: #666;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 1rem;
    min-height: 42px;
}

.reset-btn:hover, .reset-btn:focus {
    background-color: #777;
}

.results-section {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 1.2rem;
}

.total-value {
    text-align: center;
    margin-bottom: 1rem;
}

.total-value h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #cccccc;
}

.value-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: #00ccff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #404040;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #cccccc;
    font-size: 0.95rem;
}

.crop-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .mutations-container {
        grid-template-columns: 1fr;
    }
    
    .controls-section {
        grid-template-columns: 1fr;
    }
    
    .crops-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .environmental-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .mutation-buttons {
        gap: 0.4rem;
    }
    
    .mutation-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .value-display {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.8rem;
    }
    
    .crops-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .environmental-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mutation-section {
        padding: 1rem;
    }
    
    .controls-section {
        padding: 1rem;
    }
    
    .results-section {
        padding: 1rem;
    }
    
    .crop-item {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
    
    .mutation-title {
        font-size: 1rem;
    }
    
    .mutation-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .control-label {
        font-size: 0.9rem;
    }
    
    .control-input {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
    
    .value-display {
        font-size: 2rem;
    }
    
    .detail-row {
        font-size: 0.9rem;
    }
    
    .reset-btn {
        padding: 0.7rem;
        font-size: 0.95rem;
    }
}

/* Mobile navigation bar */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    padding: 0.5rem;
    z-index: 100;
    border-top: 1px solid #333;
}

.nav-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.nav-btn {
    padding: 0.8rem;
    background-color: #2d2d2d;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: block;
    }
}