/* PFP Maker Specific Styles */
.pfp-maker-section {
    min-height: 100vh;
    padding: 150px 40px 80px;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
}

.maker-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    margin-top: 40px;
}

/* Preview Panel */
.preview-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 30px;
    animation: fadeInLeft 0.8s ease;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.preview-header h2 {
    font-size: 28px;
    background: linear-gradient(135deg, #ff6b9d, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.preview-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #ffffff;
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.4);
}

.reset-btn:hover {
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    border-color: #ff6b9d;
}

.random-btn:hover {
    background: linear-gradient(135deg, #4ecdc4, #6ee7df);
    border-color: #4ecdc4;
}

.canvas-container {
    background: linear-gradient(135deg, #1a1a2e, #252541);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    box-shadow: inset 0 5px 20px rgba(0, 0, 0, 0.3);
}

#pfpCanvas {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.3);
    background: #ffffff;
}

.download-section {
    display: flex;
    justify-content: center;
}

.download-section .cta-btn {
    width: 100%;
    justify-content: center;
    gap: 10px;
}

.download-section .cta-btn svg {
    width: 24px;
    height: 24px;
}

/* Customization Panel */
.customization-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 30px;
    animation: fadeInRight 0.8s ease;
    max-height: 700px;
    display: flex;
    flex-direction: column;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: #c8c8e8;
    font-family: 'Fredoka', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-icon {
    font-size: 24px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 107, 157, 0.5);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #ff6b9d, #4ecdc4);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.4);
}

.tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.tab-content.active {
    display: flex;
    animation: fadeIn 0.5s ease;
}

.tab-content h3 {
    font-size: 22px;
    color: #ffd93d;
    margin-bottom: 20px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding-right: 10px;
}

.item-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease backwards;
}

.item-card:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: #ff6b9d;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4);
    background: rgba(255, 107, 157, 0.1);
}

.item-card.selected {
    border-color: #4ecdc4;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(255, 107, 157, 0.2));
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.5);
}

.item-preview {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.item-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-preview span {
    font-size: 40px;
}

.item-card p {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.none-option .item-preview span {
    font-size: 50px;
}

/* Custom Scrollbar */
.tab-content::-webkit-scrollbar {
    width: 8px;
}

.tab-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.tab-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b9d, #4ecdc4);
    border-radius: 10px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff8fab, #6ee7df);
}

/* Loading Indicator */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 12, 41, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top: 6px solid #ff6b9d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .maker-container {
        grid-template-columns: 1fr;
    }
    
    .customization-panel {
        max-height: 600px;
    }
}

@media (max-width: 768px) {
    .pfp-maker-section {
        padding: 120px 20px 60px;
    }
    
    .preview-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .preview-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .action-btn {
        flex: 1;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    #pfpCanvas {
        width: 100%;
        height: auto;
    }
}

/* Stagger animation delays for item cards */
.item-card:nth-child(1) { animation-delay: 0.05s; }
.item-card:nth-child(2) { animation-delay: 0.1s; }
.item-card:nth-child(3) { animation-delay: 0.15s; }
.item-card:nth-child(4) { animation-delay: 0.2s; }
.item-card:nth-child(5) { animation-delay: 0.25s; }
.item-card:nth-child(6) { animation-delay: 0.3s; }
.item-card:nth-child(7) { animation-delay: 0.35s; }
.item-card:nth-child(8) { animation-delay: 0.4s; }
.item-card:nth-child(9) { animation-delay: 0.45s; }
.item-card:nth-child(10) { animation-delay: 0.5s; }
