/* DesignKit Pro - Main Styles */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Tool section transitions */
.tool-section {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Upload zone */
.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}
.upload-zone:hover {
    border-color: #748ffc;
    background: #f0f4ff;
}
.upload-zone.dragover {
    border-color: #4c6ef5;
    background: #dbe4ff;
}
.upload-zone i {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 12px;
}

/* Tool header */
.tool-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.tool-header .back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s;
}
.tool-header .back-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Card grid */
.card-grid {
    display: grid;
    gap: 16px;
}
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
    .card-grid.cols-2,
    .card-grid.cols-3,
    .card-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .card-grid.cols-2,
    .card-grid.cols-3,
    .card-grid.cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Action buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: #4c6ef5;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-primary:hover {
    background: #4263eb;
}
.btn-primary:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}
.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: #059669;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-success:hover {
    background: #047857;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: #dc2626;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-danger:hover {
    background: #b91c1c;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    background: #1f2937;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-in 2.7s forwards;
    max-width: 320px;
    word-wrap: break-word;
}
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }
.toast.info { background: #4c6ef5; }

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}
.spinner.dark {
    border-color: rgba(0,0,0,0.1);
    border-top-color: #4c6ef5;
}

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

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}
.progress-bar .fill {
    height: 100%;
    background: #4c6ef5;
    transition: width 0.3s;
    border-radius: 2px;
}

/* Image preview card */
.preview-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}
.preview-card:hover {
    border-color: #748ffc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.preview-card .preview-image {
    width: 100%;
    aspect-ratio: 1;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.preview-card .preview-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.preview-card .preview-info {
    padding: 12px;
}
.preview-card .preview-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}
.preview-card .preview-info p {
    font-size: 12px;
    color: #6b7280;
}

/* Color swatch */
.color-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.color-swatch:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Copy button animation */
.copy-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    animation: copyPop 1.5s ease-out forwards;
}
@keyframes copyPop {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -70%) scale(1); }
}

/* Responsive helpers */
@media (max-width: 640px) {
    .upload-zone {
        padding: 24px 16px;
    }
}

/* Active nav button style */
.nav-btn.active,
.mobile-nav-btn.active {
    color: #4263eb;
    background: #f0f4ff;
}
