/* Custom styles for Outfit Changer Pro */

/* Smooth transitions and animations */
* {
    transition: all 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #9333ea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* Gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    box-shadow: 0 4px 15px 0 rgba(147, 51, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(147, 51, 234, 0.4);
}

/* Loading spinner */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #9333ea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

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

/* Modal animations */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Image upload area styles */
.upload-area {
    border: 2px dashed #d1d5db;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #9333ea;
    background-color: #faf5ff;
}

.upload-area.dragover {
    border-color: #9333ea;
    background-color: #ede9fe;
}

/* Credit badge */
.credit-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Pose selection cards */
.pose-card {
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pose-card:hover {
    border-color: #9333ea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pose-card.selected {
    border-color: #9333ea;
    background-color: #faf5ff;
}

/* Clothing item cards */
.clothing-card {
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 1;
    overflow: hidden;
}

.clothing-card:hover {
    border-color: #9333ea;
    transform: scale(1.05);
}

.clothing-card.selected {
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2);
}

.clothing-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Generation progress */
.generation-progress {
    background: linear-gradient(90deg, #9333ea 0%, #7c3aed 50%, #9333ea 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive design utilities */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column !important;
    }
    
    .mobile-full {
        width: 100% !important;
    }
    
    .mobile-text-center {
        text-align: center !important;
    }
    
    /* Mobile-specific layout adjustments */
    .hero-section {
        padding: 40px 16px !important;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .feature-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Modal adjustments for mobile */
    .modal-content {
        margin: 16px !important;
        max-height: calc(100vh - 32px) !important;
        overflow-y: auto !important;
    }
    
    /* Dashboard layout for mobile */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    
    .clothing-grid-mobile {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    /* Admin panel mobile adjustments */
    .admin-table {
        font-size: 12px !important;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px 4px !important;
    }
    
    .admin-nav {
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
    
    .admin-nav button {
        min-width: 120px !important;
    }
    
    /* Touch-friendly buttons */
    .btn-mobile {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    /* Photo upload area mobile */
    .upload-area {
        min-height: 200px !important;
    }
    
    /* Generation result mobile */
    .generation-result {
        margin-top: 20px !important;
    }
    
    .generation-actions {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .generation-actions button {
        width: 100% !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .hover\:scale-105:hover {
        transform: none !important;
    }
    
    .clothing-card:hover {
        transform: none !important;
        border-color: #9333ea !important;
    }
    
    .pose-card:hover {
        transform: none !important;
        border-color: #9333ea !important;
    }
    
    /* Larger touch targets */
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .tablet-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .tablet-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Success/Error messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Image preview styles */
.image-preview {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
}

/* Admin panel styles */
.admin-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.admin-table tr:hover {
    background-color: #f9fafb;
}

/* Status badges */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Form styles */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.form-input:invalid {
    border-color: #ef4444;
}

/* Typography */
.text-gradient {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Utility classes */
.shadow-custom {
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box, 
                linear-gradient(135deg, #9333ea, #7c3aed) border-box;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-support {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}