/* Grow a Garden Calculator - Frontend Styles */

.ggc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000; /* Pure black background like reference site */
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    min-height: 100vh;
}

/* Header */
.ggc-header {
    text-align: center;
    margin-bottom: 30px;
}

.ggc-header h1 {
    color: #ffffff;
    font-size: 24px;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Search Section */
.ggc-search-section {
    margin-bottom: 30px;
}

.ggc-search-bar {
    margin-bottom: 20px;
}

.ggc-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #555;
    border-radius: 4px;
    background: #3a3a3a;
    color: #ffffff;
    font-family: inherit;
    box-sizing: border-box;
}

.ggc-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.ggc-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.ggc-category-btn {
    padding: 10px 15px;
    background: #555;
    color: #ffffff;
    border: 2px solid #666;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
}

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

.ggc-category-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Items Section */
.ggc-items-section {
    margin-bottom: 30px;
}

.ggc-items-section h2 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 20px;
}

.ggc-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #555;
    border-radius: 4px;
    padding: 15px;
    background: #3a3a3a;
}

.ggc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #333;
    border: 2px solid #555;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 80px;
    justify-content: center;
}

.ggc-item:hover {
    background: #444;
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.ggc-item.selected {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #000000;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.8), 0 4px 12px rgba(76, 175, 80, 0.4);
    animation: selectedGlow 2s ease-in-out infinite alternate;
}

@keyframes selectedGlow {
    0% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.8), 0 4px 12px rgba(76, 175, 80, 0.4);
    }
    100% {
        box-shadow: 0 0 30px rgba(76, 175, 80, 1), 0 6px 16px rgba(76, 175, 80, 0.6);
    }
}

.ggc-item-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.ggc-item-name {
    font-size: 12px;
    color: #ffffff;
    word-break: break-word;
}

/* Modifiers Section */
.ggc-modifiers-section {
    margin-bottom: 30px;
}

.ggc-modifiers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.ggc-modifiers-header h2 {
    color: #FF9800;
    margin: 0;
    font-size: 20px;
}

.ggc-modifiers-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ggc-btn {
    padding: 8px 12px;
    border: 2px solid #666;
    border-radius: 4px;
    background: #555;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.3s ease;
}

.ggc-btn:hover {
    background: #666;
    border-color: #777;
}

.ggc-btn-primary {
    background: #4CAF50;
    border-color: #4CAF50;
}

.ggc-btn-primary:hover {
    background: #45a049;
}

.ggc-btn-secondary {
    background: #2196F3;
    border-color: #2196F3;
}

.ggc-btn-secondary:hover {
    background: #1976D2;
}

.ggc-btn-warning {
    background: #FF9800;
    border-color: #FF9800;
}

.ggc-btn-warning:hover {
    background: #F57C00;
}

.ggc-modifiers-search {
    margin-bottom: 15px;
}

.ggc-modifiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #555;
    border-radius: 4px;
    padding: 15px;
    background: #3a3a3a;
}

.ggc-modifier {
    padding: 10px;
    background: #333;
    border: 2px solid #555;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 12px;
}

.ggc-modifier:hover {
    background: #444;
    border-color: #FF9800;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
}

.ggc-modifier.selected {
    background: #FF9800;
    border-color: #FF9800;
    color: #000000;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.8), 0 2px 8px rgba(255, 152, 0, 0.4);
    animation: modifierGlow 2s ease-in-out infinite alternate;
}

@keyframes modifierGlow {
    0% {
        box-shadow: 0 0 15px rgba(255, 152, 0, 0.8), 0 2px 8px rgba(255, 152, 0, 0.4);
    }
    100% {
        box-shadow: 0 0 25px rgba(255, 152, 0, 1), 0 4px 12px rgba(255, 152, 0, 0.6);
    }
}

.ggc-modifier.disabled {
    opacity: 0.35;
    filter: blur(0.2px) grayscale(40%);
    cursor: not-allowed;
}

.ggc-modifier.disabled:hover {
    transform: none;
    background: #555;
}

.ggc-modifier-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.ggc-modifier-name {
    font-size: 12px;
    color: #ffffff;
    margin-bottom: 3px;
}

.ggc-modifier-multiplier {
    font-size: 11px;
    color: #FFD700;
    font-weight: bold;
}

/* Calculation Section */
.ggc-calculation-section {
    background: #3a3a3a;
    border: 2px solid #555;
    border-radius: 4px;
    padding: 20px;
}

.ggc-formula-display {
    margin-bottom: 20px;
    padding: 15px;
    background: #555;
    border-radius: 4px;
    border-left: 4px solid #4CAF50;
}

.ggc-formula-display p {
    margin: 0 0 10px 0;
    color: #ffffff;
}

.ggc-example-calculation {
    color: #FFD700;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.ggc-calculation-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ggc-input-section {
    margin-bottom: 20px;
}

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

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

.ggc-input-group label {
    min-width: 120px;
    color: #ffffff;
    font-weight: bold;
}

.ggc-slider {
    flex: 1;
    min-width: 200px;
}

.ggc-result-section {
    margin-bottom: 20px;
}

.ggc-result {
    padding: 20px;
    background: #4CAF50;
    color: #ffffff;
    border-radius: 4px;
    font-size: 28px; /* larger like reference */
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    border: 2px solid #45a049;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ggc-value-to-weight-section {
    background: #555;
    border: 2px solid #666;
    border-radius: 4px;
    padding: 20px;
}

.ggc-value-to-weight-section h3 {
    color: #FF9800;
    margin-bottom: 15px;
    font-size: 18px;
}

/* Modal */
.ggc-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.ggc-modal-content {
    background-color: #2d2d2d;
    margin: 5% auto;
    padding: 20px;
    border: 2px solid #555;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.ggc-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.ggc-modal-close:hover {
    color: #ffffff;
}

.ggc-mutations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.ggc-mutation-item {
    padding: 10px;
    background: #555;
    border: 2px solid #666;
    border-radius: 4px;
    text-align: center;
}

.ggc-mutation-item-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.ggc-mutation-item-name {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 3px;
}

.ggc-mutation-item-multiplier {
    font-size: 12px;
    color: #FFD700;
    font-weight: bold;
}

.ggc-mutation-item-description {
    font-size: 10px;
    color: #ccc;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ggc-container {
        padding: 10px;
    }
    
    .ggc-header h1 {
        font-size: 20px;
    }
    
    .ggc-categories {
        justify-content: center;
    }
    
    .ggc-category-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .ggc-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .ggc-modifiers-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .ggc-modifiers-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ggc-modifiers-controls {
        justify-content: center;
    }
    
    .ggc-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ggc-input-group label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .ggc-calculation-controls {
        justify-content: center;
    }
    
    .ggc-modal-content {
        width: 95%;
        margin: 2% auto;
    }
}

@media (max-width: 480px) {
    .ggc-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .ggc-modifiers-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .ggc-category-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .ggc-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Pet Ability Panel Styles */
.ggc-pet-ability-panel {
    background: #222;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.ggc-pet-ability-panel h2 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 20px;
}

.ggc-pet-search {
    margin-bottom: 15px;
}

.ggc-pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #555;
    border-radius: 4px;
    padding: 15px;
    background: #333;
}

.ggc-pet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: #444;
    border: 2px solid #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 70px;
    justify-content: center;
}

.ggc-pet-item:hover {
    background: #555;
    border-color: #4CAF50;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.ggc-pet-item.selected {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #000000;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.8), 0 2px 8px rgba(76, 175, 80, 0.4);
    animation: petGlow 2s ease-in-out infinite alternate;
}

@keyframes petGlow {
    0% {
        box-shadow: 0 0 15px rgba(76, 175, 80, 0.8), 0 2px 8px rgba(76, 175, 80, 0.4);
    }
    100% {
        box-shadow: 0 0 25px rgba(76, 175, 80, 1), 0 4px 12px rgba(76, 175, 80, 0.6);
    }
}

.ggc-pet-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.ggc-pet-name {
    font-size: 11px;
    color: inherit;
    word-break: break-word;
}

/* Scrollbar Styling */
.ggc-items-grid::-webkit-scrollbar,
.ggc-modifiers-grid::-webkit-scrollbar,
.ggc-pets-grid::-webkit-scrollbar {
    width: 8px;
}

.ggc-items-grid::-webkit-scrollbar-track,
.ggc-modifiers-grid::-webkit-scrollbar-track,
.ggc-pets-grid::-webkit-scrollbar-track {
    background: #555;
    border-radius: 4px;
}

.ggc-items-grid::-webkit-scrollbar-thumb,
.ggc-modifiers-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.ggc-items-grid::-webkit-scrollbar-thumb:hover,
.ggc-modifiers-grid::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Loading Animation */
.ggc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: ggc-spin 1s linear infinite;
}

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

/* Pet Tools Panels */
.ggc-pet-tools {
    background: #222;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: none; /* Hidden by default */
}

.ggc-pet-tools.show {
    display: block;
}

.ggc-petxp-panel,
.ggc-hatch-panel,
.ggc-weightage-panel,
.ggc-pet-ability-panel {
    background: #333;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    display: none; /* Hidden by default */
}

.ggc-petxp-panel.show,
.ggc-hatch-panel.show,
.ggc-weightage-panel.show,
.ggc-pet-ability-panel.show {
    display: block;
}

.ggc-petxp-panel h2,
.ggc-hatch-panel h2,
.ggc-weightage-panel h2,
.ggc-pet-ability-panel h2 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 18px;
}

.ggc-input-subrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ggc-input-subrow span {
    color: #ccc;
    font-size: 14px;
    min-width: 100px;
}

.ggc-input-subrow input {
    width: 100px;
    margin-left: 10px;
}

/* Value to Weight Mode */
.ggc-value-to-weight-section {
    background: #222;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: none; /* Hidden by default */
}

.ggc-value-to-weight-section.show {
    display: block;
}

/* Added Plant List Delete Button */
.ggc-result-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 5px 0;
    background-color: #2d2d2d;
    border: 1px solid #555;
    border-radius: 4px;
}

.ggc-result-text {
    flex: 1;
    color: #ffffff;
}

.ggc-delete-entry {
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.ggc-delete-entry:hover {
    background-color: #ff6666;
}

/* Ensure all items are clickable */
.ggc-item {
    cursor: pointer !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.ggc-item:hover {
    background-color: #3a3a3a !important;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.ggc-item:active {
    transform: scale(0.98);
}

.ggc-item.selected {
    background-color: #4a4a4a !important;
    border: 2px solid #007cba !important;
    box-shadow: 0 0 10px rgba(0, 124, 186, 0.5) !important;
}

