/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
}

/* Layout Container */
.layout-default {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.layout-side-by-side {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.layout-side-by-side main {
    display: flex;
    flex-direction: row;
    flex: 1;
    gap: 20px;
    padding: 20px;
}

.layout-side-by-side .calculator-section,
.layout-side-by-side .calculation-section {
    flex: 1;
}

/* Header */
header {
    background-color: #2a2a2a;
    padding: 20px;
    border-bottom: 2px solid #444;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.layout-toggle {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #6a4c93;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.layout-toggle:hover {
    background-color: #7a5ca3;
}

h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #4CAF50;
}

.disclaimer {
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #ff6b6b;
}

.disclaimer a {
    color: #4CAF50;
    text-decoration: none;
}

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

.how-to-use {
    background-color: #2d4a2d;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #4CAF50;
}

.discord-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.discord-btn {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.discord-btn.official {
    background-color: #5865F2;
    color: white;
}

.discord-btn.support {
    background-color: #FFA500;
    color: white;
}

.discord-btn:hover {
    opacity: 0.8;
}

/* Main Content */
main {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

h2 {
    color: #4CAF50;
    margin-bottom: 20px;
    text-align: center;
}

/* Search */
.search-container {
    margin-bottom: 20px;
    text-align: center;
}

.search-input {
    width: 300px;
    padding: 10px;
    border: 2px solid #444;
    border-radius: 6px;
    background-color: #333;
    color: white;
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Categories */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    justify-content: center;
}

.category-btn {
    padding: 8px 16px;
    border: 2px solid #444;
    border-radius: 6px;
    background-color: #333;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.category-btn:hover {
    background-color: #444;
    border-color: #666;
}

.category-btn.active {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

/* Plants Grid */
.plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.plant-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 2px solid #444;
    border-radius: 8px;
    background-color: #333;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.plant-btn:hover {
    background-color: #444;
    border-color: #666;
}

.plant-btn.selected {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.plant-btn img {
    width: 48px;
    height: 48px;
    margin-bottom: 5px;
    border-radius: 4px;
}

.plant-btn span {
    font-size: 12px;
    text-transform: capitalize;
}

/* Calculation Section */
.calculation-section {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.modifiers-section h3 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.modifier-note {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 15px;
}

.modifier-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.modifier-controls button {
    padding: 6px 12px;
    border: 1px solid #666;
    border-radius: 4px;
    background-color: #444;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

.modifier-controls button:hover {
    background-color: #555;
}

/* Modifiers Grid */
.modifiers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.modifier-btn {
    padding: 6px 12px;
    border: 1px solid #666;
    border-radius: 4px;
    background-color: #444;
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.modifier-btn:hover {
    background-color: #555;
}

.modifier-btn.active {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.modifier-btn.rainbow.active {
    background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 400% 400%;
    animation: rainbow 2s ease infinite;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.modifier-btn.gold.active {
    background-color: #ffd700;
    color: black;
    font-weight: bold;
}

.mutation-formula {
    text-align: center;
    margin: 15px 0;
    font-style: italic;
    color: #ccc;
}

.mutation-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.mutation-controls button {
    padding: 8px 16px;
    border: 1px solid #666;
    border-radius: 4px;
    background-color: #444;
    color: white;
    cursor: pointer;
}

.mutation-controls button:hover {
    background-color: #555;
}

/* Input Section */
.input-section {
    margin-bottom: 20px;
}

.input-section h3 {
    color: #4CAF50;
    margin-bottom: 15px;
}

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.input-group label {
    min-width: 120px;
    color: #ccc;
}

.input-group input {
    padding: 8px;
    border: 1px solid #666;
    border-radius: 4px;
    background-color: #333;
    color: white;
    width: 120px;
}

.input-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Result Section */
.result-section {
    margin-bottom: 20px;
    text-align: center;
}

.result-display {
    margin-bottom: 15px;
}

.result-value {
    font-size: 2em;
    font-weight: bold;
    color: #4CAF50;
}

.result-breakdown {
    margin-bottom: 10px;
    color: #ccc;
    font-size: 14px;
}

.formula-display {
    font-family: monospace;
    background-color: #333;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #ccc;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.action-btn:hover {
    background-color: #45a049;
}

.glow-highlight {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px #4CAF50; }
    to { box-shadow: 0 0 20px #4CAF50, 0 0 30px #4CAF50; }
}

/* Value to Weight Box */
.value-to-weight-box {
    background-color: #333;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #4CAF50;
}

.value-to-weight-box h4 {
    color: #4CAF50;
    margin-bottom: 15px;
}

.weight-result {
    margin-top: 15px;
    font-weight: bold;
    color: #4CAF50;
}

/* Footer */
footer {
    background-color: #2a2a2a;
    padding: 20px;
    border-top: 2px solid #444;
    text-align: center;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: #4CAF50;
    text-decoration: none;
    margin: 0 15px;
}

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

.footer-credits {
    color: #ccc;
    font-size: 14px;
}

.footer-credits a {
    color: #4CAF50;
    text-decoration: none;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .layout-side-by-side main {
        flex-direction: column;
    }
    
    .plants-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .categories {
        gap: 4px;
    }
    
    .category-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .search-input {
        width: 100%;
        max-width: 300px;
    }
    
    .discord-links {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Hidden class for filtering */
.hidden {
    display: none !important;
}

