/**
 * Module-specific CSS styles for NFT Generator v1.0.0 (Beta)
 */

/* Preview Modal Styles */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 20px;
    display: flex;
    gap: 20px;
}

.preview-detail-image {
    flex-shrink: 0;
}

.preview-detail-image img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-detail-info {
    flex: 1;
    min-width: 300px;
}

.preview-detail-info h4 {
    margin-bottom: 15px;
    color: #1f2937;
}

.attributes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 4px solid #e5e7eb;
}

.attribute-trait {
    font-weight: 600;
    color: #374151;
}

.attribute-value {
    font-weight: 500;
}

.attribute-rarity {
    font-size: 12px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #6b7280;
}

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

/* Rarity Controls */
.rarity-section {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rarity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.rarity-header h4 {
    color: #1e293b;
    font-size: 18px;
}

.rarity-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.rarity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.rarity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.rarity-item:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.rarity-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e5e7eb;
}

.rarity-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rarity-name {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weight-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.weight-input {
    width: 60px;
    padding: 2px 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.weight-unit {
    font-size: 12px;
    color: #6b7280;
}

.rarity-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Preview Grid Enhancements */
.preview-item {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.preview-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.preview-image {
    position: relative;
    overflow: hidden;
}

.preview-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.preview-item:hover .preview-image img {
    transform: scale(1.05);
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-item:hover .preview-overlay {
    opacity: 1;
}

.btn-overlay {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.btn-overlay:hover {
    background: white;
    transform: scale(1.1);
}

.preview-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-title {
    font-weight: 600;
    color: #1f2937;
}

.preview-traits {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px;
}

.btn-page {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
}

.btn-page:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-page.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

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

/* Statistics Enhancements */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Progress Bar */
#generateProgress {
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
    transition: width 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

#generateProgress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }
    
    .preview-detail-image img {
        width: 100%;
        max-width: 300px;
    }
    
    .rarity-grid {
        grid-template-columns: 1fr;
    }
    
    .rarity-item {
        flex-direction: column;
        text-align: center;
    }
    
    .preview-overlay {
        opacity: 1;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.8) 100%
        );
    }
}
