/* History Page Styles */

/* Upload Area - Compact Version */
.upload-area-compact {
    border: 2px dashed #e5e7eb;
    background: linear-gradient(135deg, #fdf2f8 0%, #fae8ff 100%);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area-compact:hover {
    border-color: #ec4899;
    background: linear-gradient(135deg, #fce7f3 0%, #f3e8ff 100%);
    transform: translateY(-2px);
}

.upload-icon-compact {
    color: #ec4899;
    margin-bottom: 1rem;
}

.upload-text-compact {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.upload-hint-compact {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Preview Container - Compact */
.preview-container-compact {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    padding: 1rem;
}

.preview-image-compact {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
}

.remove-image-compact {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.remove-image-compact:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* History Item */
.history-item {
    background: white;
}

/* 9:16 Image Container */
.history-image-container-169 {
    width: 100%;
    padding-top: 177.78%; /* 16/9 = 1.7778 */
    position: relative;
    background: #f3f4f6;
    overflow: hidden;
    border-radius: 8px;
}

.history-image-169 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
}

/* View Results Button */
.view-results-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(236, 72, 153, 0.2);
}

.view-results-btn.w-full {
    width: 100%;
}

.view-results-btn:hover {
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
    transform: translateY(-2px);
}

/* Modal Result Item */
.modal-result-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.modal-result-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
}

.modal-result-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.modal-result-item:hover .modal-result-overlay {
    transform: translateY(0);
}

.modal-result-level {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.modal-result-similarity {
    color: #fbbf24;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Pagination */
.pagination-nav {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    background: white;
    border: none;
    border-right: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.pagination-item:last-child {
    border-right: none;
}

.pagination-item:hover:not(.pagination-item-active) {
    background: #fdf2f8;
    color: #ec4899;
}

.pagination-item-active {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    color: white;
    font-weight: 600;
    cursor: default;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .upload-area-compact {
        padding: 1.5rem;
        min-height: 150px;
    }
    
    .upload-icon-compact svg {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .upload-text-compact {
        font-size: 0.875rem;
    }
    
    .upload-hint-compact {
        font-size: 0.75rem;
    }
    
    .history-image-container {
        width: 80px;
        height: 80px;
    }
    
    .view-results-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .pagination-item {
        min-width: 36px;
        height: 36px;
        padding: 0 12px;
        font-size: 14px;
    }
}

/* Loading State */
.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #ec4899;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state svg {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1rem;
    color: #d1d5db;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}
