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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Image */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: -2;
    transition: opacity 0.5s ease;
}

.background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 80px);
}

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

.main-title {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ffffff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Search Container */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 500px;
    margin: 0 auto 15px auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    padding: 15px 20px;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 15px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

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

/* Albums Grid */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.album-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.album-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

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

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

.album-info {
    padding: 20px;
}

.album-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.album-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

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

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumbs a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #fff;
}

.separator {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.5);
}

.current {
    color: #fff;
}

/* Loading Spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Ad Container */
.ad-container {
    margin: 40px 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.8);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

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

.cookie-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    flex: 1;
    min-width: 250px;
}

.cookie-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .search-container {
        max-width: 100%;
        margin: 0 auto 15px auto;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-content p {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .albums-grid {
        grid-template-columns: 1fr;
    }
    
    .album-card {
        margin: 0 10px;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

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

/* PWA Styles */
.install-prompt {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.install-prompt.show {
    transform: translateX(0);
}

.install-prompt:hover {
    transform: translateX(0) translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* GPS Map Styles */
.map-section {
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-header {
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.map-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
    font-weight: 600;
}

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

.map-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

.map-photo-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.map-container {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 400px;
}

.map {
    flex: 1;
    min-height: 400px;
    background: #2d3748;
}

.map-legend {
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    max-height: 200px;
}

.map-legend h3 {
    margin: 0 0 15px 0;
    color: #e0e0e0;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    min-width: 200px;
    flex: 0 0 auto;
}

.legend-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.legend-item.active {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.legend-text {
    color: #e0e0e0;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.legend-count {
    color: #a0aec0;
    font-size: 0.8rem;
    font-weight: 400;
}

/* Map Popup Styles */
.map-popup {
    max-width: 280px;
}

.map-popup .popup-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.map-popup .popup-image:hover {
    transform: scale(1.02);
}

.map-popup .popup-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #2d3748;
}

.map-popup .popup-album {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 5px;
    cursor: pointer;
}

.map-popup .popup-album:hover {
    text-decoration: underline;
}

.map-popup .popup-date {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.map-popup .popup-actions {
    display: flex;
    gap: 8px;
}

.map-popup .popup-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.map-popup .popup-btn.primary {
    background: #667eea;
    color: white;
}

.map-popup .popup-btn.secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.map-popup .popup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Map Styles */
@media (max-width: 768px) {
    .map-header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .map-header h2 {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .map-controls {
        justify-content: center;
    }
    
    .map {
        min-height: 300px;
    }
    
    .map-legend {
        max-height: 150px;
    }
    
    .legend-items {
        gap: 8px;
    }
    
    .legend-item {
        min-width: 150px;
        font-size: 0.85rem;
    }
}

.map-container.hidden {
    display: none;
}
