/* FPS Crafting Panel */
.fps-crafting-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    overflow: hidden;
}

.fps-crafting-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
}

.fps-crafting-panel .panel-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4A90E2;
}

.fps-crafting-panel .close-panel-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
}

.fps-crafting-panel .close-panel-btn:hover {
    color: #ff5555;
}

/* Filter Tabs */
.crafting-filters {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.crafting-filters .filter-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.crafting-filters .filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(74, 144, 226, 0.5);
}

.crafting-filters .filter-btn.active {
    background: rgba(74, 144, 226, 0.2);
    border-color: #4A90E2;
    color: #4A90E2;
}

/* Sort Options */
.crafting-sort {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.crafting-sort label {
    font-size: 0.9rem;
    color: #999;
}

.sort-select {
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.9rem;
    cursor: pointer;
}

.sort-select:hover {
    background: rgba(255, 255, 255, 0.08);
}

.refresh-recipes-btn {
    margin-left: auto;
    padding: 0.4rem 0.75rem;
    background: rgba(74, 144, 226, 0.2);
    border: 1px solid rgba(74, 144, 226, 0.4);
    border-radius: 4px;
    color: #4A90E2;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-recipes-btn:hover {
    background: rgba(74, 144, 226, 0.3);
    transform: rotate(180deg);
}

/* Crafting Content */
.crafting-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Recipe Card */
.recipe-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recipe-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.recipe-card.can-craft {
    border-color: rgba(46, 204, 113, 0.5);
}

.recipe-card.cannot-craft {
    opacity: 0.7;
}

/* Recipe Header */
.recipe-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recipe-icon {
    font-size: 2rem;
}

.recipe-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recipe-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.recipe-tier {
    font-size: 0.85rem;
    color: #999;
}

/* Recipe Effect */
.recipe-effect {
    font-size: 0.9rem;
    color: #4A90E2;
    font-style: italic;
    padding: 0.75rem;
    background: rgba(74, 144, 226, 0.1);
    border-left: 3px solid #4A90E2;
    border-radius: 4px;
}

/* Recipe Materials */
.recipe-materials {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.materials-label {
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.material-requirement {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.9rem;
}

.material-requirement.has-enough {
    border-left: 3px solid #2ecc71;
}

.material-requirement.not-enough {
    border-left: 3px solid #e74c3c;
}

.material-name {
    color: #ccc;
}

.material-quantity {
    font-weight: 600;
    color: #fff;
}

/* Craft Button */
.craft-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}

.craft-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

.craft-btn.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: #666;
    cursor: not-allowed;
}

.craft-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty State */
.crafting-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1rem;
    color: #666;
    padding: 2rem;
}

.crafting-empty .empty-icon {
    font-size: 4rem;
    opacity: 0.3;
}

.crafting-empty .empty-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #888;
}

.crafting-empty .empty-hint {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    max-width: 300px;
}

/* Loading State */
.crafting-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1rem;
    color: #999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(74, 144, 226, 0.3);
    border-top-color: #4A90E2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .crafting-filters {
        padding: 0.75rem 1rem;
    }

    .recipe-card {
        padding: 1rem;
    }
}
