/* Album Specific Styles */

/* Album Header */
.album-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

.album-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ffffff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.album-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.album-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Map Container */
.map-container {
    margin-bottom: 40px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.map {
    height: 300px;
    width: 100%;
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.control-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.sort-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    outline: none;
    cursor: pointer;
}

.sort-select option {
    background: #2a2a2a;
    color: #fff;
}

/* Photos Grid */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.photo-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    position: relative;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.photo-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-card:hover .photo-thumbnail {
    transform: scale(1.05);
}

.photo-info {
    padding: 15px;
}

.photo-filename {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-datetime {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.photo-location {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

/* Video and LivePhoto indicators */
.video-indicator,
.livephoto-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 8px;
    border-radius: 15px;
    font-size: 0.8rem;
    backdrop-filter: blur(5px);
}

.video-indicator {
    background: rgba(255, 0, 0, 0.7);
}

.livephoto-indicator {
    background: rgba(0, 150, 255, 0.7);
}

/* Photo Viewer Modal */
.photo-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
}

.photo-viewer.active {
    display: flex;
    flex-direction: column;
}

.photo-viewer-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    opacity: 0.3;
    z-index: 1;
}

.photo-viewer-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden; /* Prevents scrollbars during zoom */
}

.photo-viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 5px solid white;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.photo-viewer-image.zoomed {
    cursor: move;
}

.photo-viewer-image.dragging {
    cursor: grabbing;
}

.photo-viewer-video {
    max-width: 100%;
    max-height: 100%;
    border: 5px solid white;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 4;
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.2s ease;
    user-select: none;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-indicator {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
    user-select: none;
}

/* Navigation arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border-radius: 10px;
    z-index: 3;
    opacity: 0;
}

.photo-viewer:hover .nav-arrow {
    opacity: 1;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow.prev {
    left: 20px;
}

.nav-arrow.next {
    right: 20px;
}

/* Photo Info Bar */
.photo-info-bar {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    color: white;
    z-index: 2;
    position: relative;
    backdrop-filter: blur(10px);
}

.photo-info-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.photo-details {
    flex: 1;
    min-width: 200px;
}

.photo-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.photo-meta {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.photo-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.livephoto-btn {
    background: rgba(0, 150, 255, 0.7);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Slideshow Controls */
.slideshow-controls {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.slideshow-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.slideshow-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .album-title {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .photo-info-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-arrow {
        font-size: 1.5rem;
        padding: 15px 10px;
    }
    
    .nav-arrow.prev {
        left: 10px;
    }
    
    .nav-arrow.next {
        right: 10px;
    }
    
    .map {
        height: 250px;
    }
    
    /* Mobile zoom controls */
    .zoom-controls {
        top: 10px;
        right: 10px;
        padding: 8px;
        gap: 3px;
    }
    
    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .zoom-indicator {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: 50px;
    }
}

@media (max-width: 480px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .photo-thumbnail {
        height: 150px;
    }
    
    .photo-info {
        padding: 10px;
    }
    
    .photo-viewer-content {
        padding: 10px;
    }
    
    .photo-info-bar {
        padding: 15px 10px;
    }
}

/* Touch gestures for mobile */
@media (hover: none) and (pointer: coarse) {
    .nav-arrow {
        opacity: 0.7;
    }
    
    .photo-card:hover {
        transform: none;
    }
    
    .photo-card:active {
        transform: scale(0.95);
    }
}

/* Animation classes */
.slide-in-left {
    animation: slideInLeft 0.3s ease;
}

.slide-in-right {
    animation: slideInRight 0.3s ease;
}

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

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

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

.exif-content {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.exif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #333, #222);
    border-radius: 15px 15px 0 0;
}

.exif-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 300;
}

.exif-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: color 0.3s ease;
}

.exif-close:hover {
    color: #ffffff;
}

.exif-data {
    padding: 25px;
}

.exif-section {
    margin-bottom: 25px;
}

.exif-section:last-child {
    margin-bottom: 0;
}

.exif-section h4 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.exif-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.exif-item:last-child {
    border-bottom: none;
}

.exif-item strong {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    min-width: 120px;
    text-align: left;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .exif-modal {
        padding: 10px;
    }
    
    .exif-content {
        max-height: 90vh;
    }
    
    .exif-header {
        padding: 15px 20px;
    }
    
    .exif-data {
        padding: 20px;
    }
    
    .exif-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .exif-item strong {
        min-width: auto;
    }
}
