/* Mobile App Style Theme - Dressing Clothes */

:root {
    --app-primary: #FF6B9D;
    --app-secondary: #C44569;
    --app-accent: #FFA07A;
    --app-dark: #2C3E50;
    --app-light: #F8F9FA;
    --app-success: #26DE81;
    --app-warning: #FED330;
    --app-info: #45AAF2;
    --app-purple: #A29BFE;
}

/* Mobile App Container */
body {
    /* Simple, clean background - matches dashboard theme */
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    overflow-x: hidden;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Mobile App Card */
.mobile-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-card:active {
    transform: scale(0.98);
}

/* Photo Grid - Instagram Style */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: #f0f0f0;
}

.photo-item {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #f8f8f8;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* Smart Upload Zone */
.smart-upload {
    border: 3px dashed #ddd;
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.smart-upload.drag-over {
    border-color: var(--app-primary);
    background: linear-gradient(135deg, #ffeef4 0%, #ffe6f0 100%);
    transform: scale(1.02);
}

.smart-upload:hover {
    border-color: var(--app-primary);
    background: linear-gradient(135deg, #fff5f8 0%, #ffebf3 100%);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--app-primary), var(--app-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Preview Container */
.preview-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 1rem 0 !important;
    width: 100% !important;
}

/* Image Preview */
.image-preview {
    position: relative !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    max-width: 150px !important;
    width: 150px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    border: 2px solid #E5E5E5 !important;
    margin: 0 auto !important;
}

.preview-info {
    background: #F8F8F8 !important;
    border-top: 1px solid #E5E5E5 !important;
    border-radius: 0 0 8px 8px !important;
    padding: 0.5rem !important;
    font-size: 0.7rem !important;
}

.preview-info div {
    margin-bottom: 0.25rem !important;
}

.preview-info span {
    font-size: 0.7rem !important;
    max-width: 80px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.preview-info p {
    font-size: 0.65rem !important;
    margin: 0 !important;
}

.image-preview img,
.preview-image {
    width: 150px !important;
    height: 150px !important;
    max-width: 150px !important;
    max-height: 150px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
}

.preview-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}

.preview-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid #E5E5E5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.preview-btn:hover {
    background: #D4A5A5;
    border-color: #D4A5A5;
}

.preview-btn:hover svg {
    color: white;
}

/* Bottom Navigation - App Style */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #999;
    transition: all 0.3s;
    flex: 1;
    padding: 8px;
}

.nav-item.active {
    color: var(--app-primary);
}

.nav-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s;
}

.nav-item.active .nav-icon {
    transform: scale(1.2);
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom));
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--app-primary), var(--app-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 99;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 35px rgba(255, 107, 157, 0.6);
}

.fab:active {
    transform: scale(0.95);
}

/* Smooth Animations */
.slide-up {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--app-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Clothing Item Card - E-commerce Style */
.clothing-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.clothing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.clothing-image {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f8f8f8;
    position: relative;
}

.clothing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.clothing-card:hover .clothing-image img {
    transform: scale(1.05);
}

.clothing-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--app-primary), var(--app-secondary));
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clothing-info {
    padding: 15px;
}

.clothing-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clothing-category {
    font-size: 12px;
    color: #999;
    text-transform: capitalize;
}

.clothing-actions {
    display: flex;
    gap: 10px;
    padding: 0 15px 15px;
}

.action-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn-primary {
    background: linear-gradient(135deg, var(--app-primary), var(--app-secondary));
    color: white;
}

.action-btn-outline {
    background: white;
    border: 2px solid var(--app-primary);
    color: var(--app-primary);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Progress Bar */
.progress-bar {
    display: none; /* Hide for instant uploads */
}

.progress-fill {
    display: none;
}

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

/* Category Pills */
.category-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 15px;
    scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.category-pill {
    padding: 10px 20px;
    border-radius: 25px;
    background: white;
    border: 2px solid #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
}

.category-pill.active {
    background: linear-gradient(135deg, var(--app-primary), var(--app-secondary));
    color: white;
    border-color: var(--app-primary);
}

.category-pill:hover {
    border-color: var(--app-primary);
    transform: translateY(-2px);
}

/* Stats Card - Mobile Style */
.stat-card {
    background: linear-gradient(135deg, var(--app-primary) 0%, var(--app-secondary) 100%);
    border-radius: 20px;
    padding: 25px;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    margin: 10px 0;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

.stat-icon {
    position: absolute;
    right: 20px;
    top: 20px;
    opacity: 0.2;
    font-size: 60px;
}

/* Image Lightbox */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 10000;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #E5E5E5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lightbox-close:hover {
    background: #D4A5A5;
    border-color: #D4A5A5;
    transform: scale(1.1);
}

.lightbox-close:hover svg {
    color: white;
}

/* Zoom Controls */
.lightbox-zoom-controls {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: white;
    padding: 10px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lightbox-zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #E5E5E5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.lightbox-zoom-btn:hover {
    background: #D4A5A5;
    border-color: #D4A5A5;
    transform: scale(1.1);
}

.lightbox-zoom-btn:hover svg {
    color: white;
}

.lightbox-image-container {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    cursor: grab;
}

.lightbox-image-container.dragging {
    cursor: grabbing;
}

.lightbox-image-container .lightbox-image {
    transition: transform 0.3s ease;
    transform-origin: center center;
}

/* Mobile responsive for lightbox */
@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
    }

    .lightbox-image {
        max-width: 95vw;
        max-height: 85vh;
    }

    .lightbox-zoom-controls {
        bottom: -70px;
    }
}

/* Responsive */
@media (min-width: 768px) {
    .app-container {
        max-width: 100%;
        box-shadow: none;
    }

    .photo-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .bottom-nav {
        display: none;
    }
}

/* Pull to Refresh */
.pull-to-refresh {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.3s;
}

.pull-to-refresh.active {
    color: var(--app-primary);
}
