/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 80px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.upload-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.upload-card:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.upload-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #495057;
}

.upload-area {
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    min-height: 60px;
}

.upload-area:hover {
    background: rgba(102, 126, 234, 0.1);
}

.upload-area.drag-over {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.upload-area.drag-over::before {
    content: "Drop file here";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
}

.upload-area i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-area p {
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-area small {
    color: #adb5bd;
    font-size: 0.85rem;
    display: block;
}

.preview-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    max-height: 300px;
}

.preview-container img,
.preview-container video {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 10px;
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Examples Section */
.examples-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.examples-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #495057;
}

/* Refresh Button */
.refresh-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn i {
    font-size: 0.8rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Album Container */
.album-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
}

/* Album Header */
.album-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.album-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.photo-count {
    background: #e91e63;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Album Photos Grid */
.album-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

/* Album Photo Items */
.album-photo {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.album-photo:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.album-photo img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.photo-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.album-photo.selected {
    border: 3px solid #e91e63;
    box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.3);
}

.album-photo.selected .photo-overlay {
    background: #e91e63;
}

.example-item {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.example-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
}

.example-item.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.example-item img,
.example-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.example-item span {
    display: block;
    padding: 0.5rem;
    text-align: center;
    background: white;
    font-weight: 500;
    color: #495057;
}

/* Action Section */
.action-section {
    text-align: center;
    margin: 2rem 0;
}

.swap-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.swap-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.swap-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Progress Section */
.progress-section {
    text-align: center;
    margin: 2rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

#progress-text {
    color: #6c757d;
    font-weight: 500;
}

/* Result Section */
.result-section {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.result-section h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #28a745;
}

.result-preview {
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.result-preview img,
.result-preview video {
    width: 100%;
    height: auto;
    border-radius: 10px;
    max-width: 100%;
    display: block;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.download-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-button:hover {
    background: #218838;
    transform: translateY(-2px);
}

.secondary-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-button:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* History Page */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: white;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    opacity: 0.8;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.history-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.history-preview {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.history-preview img,
.history-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-info {
    padding: 1rem;
}

.history-info h4 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.history-date {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-actions button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.preview-btn {
    background: #667eea;
    color: white;
}

.preview-btn:hover {
    background: #5a6fd8;
}

.download-history-btn {
    background: #28a745;
    color: white;
}

.download-history-btn:hover {
    background: #218838;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

/* Album Results Styles */
.album-results-section {
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.album-header h3 {
    color: #e91e63;
    margin: 0;
    font-size: 1.5rem;
}

.album-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.layout-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.layout-selector label {
    font-weight: 600;
    color: #333;
}

.layout-selector select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.layout-selector select:focus {
    outline: none;
    border-color: #e91e63;
}

.download-button {
    background: linear-gradient(135deg, #e91e63, #f06292);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.album-progress {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.album-gallery {
    display: grid;
    gap: 15px;
    transition: all 0.3s ease;
}

/* Grid Layout */
.album-gallery.grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Masonry Layout */
.album-gallery.masonry {
    columns: 3;
    column-gap: 15px;
}

.album-gallery.masonry .album-photo {
    break-inside: avoid;
    margin-bottom: 15px;
}

/* Carousel Layout */
.album-gallery.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding: 10px 0;
}

.album-gallery.carousel .album-photo {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

/* Story Layout */
.album-gallery.story {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.album-gallery.story .album-photo {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.album-photo {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background: #f8f9fa;
}

.album-photo:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.album-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.3s;
}

.album-photo.loading {
    position: relative;
}

.album-photo.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.album-photo.loading::after {
    content: 'Processing...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}


.album-photo.blur img {
    filter: blur(10px);
    transition: filter 0.5s ease-in-out;
}

.album-photo.completed img {
    filter: none;
}

.creation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.swap-button.secondary {
    background: linear-gradient(135deg, #6c757d, #868e96);
}

.swap-button.secondary:hover {
    background: linear-gradient(135deg, #5a6268, #6c757d);
}

/* Processing Options Styles */
.processing-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    min-width: 200px;
}

.option-item i {
    color: #e91e63;
    font-size: 18px;
}

.option-item span {
    font-size: 14px;
    color: #333;
}

.option-item:hover {
    border-color: #e91e63;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(233, 30, 99, 0.1);
}

.option-item.selected {
    border-color: #e91e63;
    background: linear-gradient(135deg, #e91e63, #f06292);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.option-item.selected i {
    color: white;
}

.option-item.selected span {
    color: white;
}

/* Album Actions Styles */
.album-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.select-album-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.select-album-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.select-album-btn i {
    font-size: 14px;
}

/* Album Folder Styles */
.album-folder {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 280px;
    height: 320px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.album-folder:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(233, 30, 99, 0.2);
}

.folder-thumbnail {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 100%;
    gap: 2px;
    border-radius: 4px;
    overflow: hidden;
}

.thumbnail-photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.thumbnail-photo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.05) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.album-folder:hover .thumbnail-photo::before {
    opacity: 1;
}

.album-folder:hover .thumbnail-photo {
    transform: scale(1.02);
}

.folder-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.album-folder:hover .folder-overlay {
    opacity: 1;
}

.folder-icon {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #e91e63;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.folder-info {
    padding: 16px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white;
    border-radius: 0 0 12px 12px;
}

.folder-name {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.folder-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.photo-count {
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
    background: rgba(108, 117, 125, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
}

.folder-actions {
    display: flex;
    gap: 2px;
}

.folder-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 35px;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.single-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.single-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}


/* Album Modal Styles */
.album-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: 1000px;
}

.album-modal-content .album-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
}

.modal-photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.modal-photo-item:hover {
    transform: scale(1.05);
}

.modal-photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.modal-photo-item .photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.select-photo-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.select-photo-btn:hover {
    background: #1e7e34;
    transform: translateY(-2px);
}

/* Single Photo Upload Styles */
.single-photo-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.single-photo-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.upload-single-container {
    position: relative;
}

.single-photo-preview {
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.single-photo-preview img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* Thumbnail Preview Styles */
.selected-thumbnail {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e91e63;
    text-align: center;
}

.selected-thumbnail img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 5px;
}

.album-thumbnail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    width: 80px;
    height: 60px;
    margin: 0 auto 5px auto;
}

.album-thumbnail-photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 2px;
}

.thumbnail-label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    display: block;
}

/* Album Selection Visual Feedback */
.album-container.album-selected .album-folder {
    border: 2px solid #e91e63;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.25);
    transform: translateY(-2px);
}

.album-container.album-selected .album-folder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.1) 0%, rgba(233, 30, 99, 0.05) 100%);
    border-radius: 12px;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .upload-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 1rem;
    }
    
    .examples-grid {
        gap: 20px;
    }
    
    .album-container {
        padding: 15px;
    }
    
    .album-photos-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .album-photo img {
        height: 100px;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .history-grid {
        grid-template-columns: 1fr;
    }
}

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

.loading {
    /* Removed spinning animation for less distracting loading state */
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.modal-content img,
.modal-content video {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Error Notification */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    z-index: 3000;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.error-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.error-content i.fa-exclamation-triangle {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.error-content span {
    flex: 1;
    font-weight: 500;
}

.error-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.error-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Face Selection Styles */
.face-selection-container {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.face-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.face-selection-header h4 {
    color: #495057;
    font-size: 16px;
    margin: 0;
}

.face-selection-header h4 i {
    margin-right: 8px;
    color: #667eea;
}

.face-selection-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.face-selection-instructions {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 10px;
    text-align: center;
    padding: 8px;
    background: #e9ecef;
    border-radius: 4px;
}

.face-selection-instructions i {
    margin-right: 5px;
    color: #667eea;
}

.face-selection-canvas {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    max-width: 100%;
    cursor: crosshair;
    background: white;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.modal-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    justify-content: center;
    background: white;
}

.modal-footer .primary-button,
.modal-footer .secondary-button {
    padding: 12px 24px;
    font-size: 1rem;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .modal-footer .primary-button,
    .modal-footer .secondary-button {
        width: 100%;
    }
}
