:root {
    --primary-white: #FFFFFF;
    --secondary-gray: #2D2D2D;
    --accent-amber: #F59E0B;
    --light-gray: #F8F9FA;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.index-page-font {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

.font-display {
    font-family: 'Playfair Display', serif;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.hero-bg {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../resources/hero-workspace.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.photo-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.photo-card img {
    transition: transform 0.3s ease;
}

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

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-amber);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.stats-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.upload-btn {
    background: linear-gradient(135deg, var(--accent-amber) 0%, #D97706 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.home-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
    .masonry-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        grid-template-columns: 1fr;
    }
}

.masonry-item {
    margin-bottom: 0;
    height: 100%;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img,
.lightbox video {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

.particle-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

.search-bar {
    transition: all 0.3s ease;
}

.search-bar:focus {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.delete-btn {
    opacity: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.delete-btn:hover {
    opacity: 1;
    background-color: #FEF2F2 !important;
    /* bg-red-50 equivalent */
    color: #DC2626 !important;
    /* text-red-600 equivalent */
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
    /* data-glow */
    transform: scale(1.1);
}

.photo-card:hover .delete-btn {
    opacity: 0.2 !important;
}

.photo-card:hover .delete-btn:hover {
    opacity: 1 !important;
}
.private-btn {
    opacity: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.private-btn:hover {
    opacity: 1;
    background-color: #F3F4F6 !important; /* bg-gray-100 */
    color: #4B5563 !important; /* text-gray-600 */
    transform: scale(1.1);
}

.private-btn.is-private {
    color: #DC2626 !important; /* text-red-600 */
    opacity: 1 !important; /* Always visible if private */
}

.photo-card:hover .private-btn {
    opacity: 0.2 !important;
}

.photo-card:hover .private-btn.is-private {
    opacity: 1 !important;
}

.photo-card:hover .private-btn:hover {
    opacity: 1 !important;
}

/* ==========================================================================
   VISUAL REDESIGN (TRAVEL THEME & LIGHTBOX UPGRADES)
   ========================================================================== */

/* Modern theme additions */
.glass-premium {
    backdrop-filter: blur(16px);
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.text-gradient-gold {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 50%, #D97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Ken Burns & Travel Decors */
.hero-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10, 15, 30, 0.45), rgba(10, 15, 30, 0.55)), url('../resources/hero-workspace.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    animation: kenburns 30s ease infinite alternate;
}

@keyframes kenburns {
    0% {
        transform: scale(1.02) translate(0px, 0px);
    }
    100% {
        transform: scale(1.12) translate(-1%, -0.5%);
    }
}

.geo-decor {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
    z-index: 1;
}

.geo-grid-vertical-1 {
    top: 0;
    bottom: 0;
    left: 8%;
    width: 1px;
}

.geo-grid-vertical-2 {
    top: 0;
    bottom: 0;
    right: 12%;
    width: 1px;
}

.geo-grid-horizontal-1 {
    left: 0;
    right: 0;
    top: 25%;
    height: 1px;
}

.geo-grid-horizontal-2 {
    left: 0;
    right: 0;
    bottom: 20%;
    height: 1px;
}

.geo-coordinates {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.15em;
    position: absolute;
    bottom: 2.5rem;
    left: 4%;
    z-index: 10;
    pointer-events: none;
}

.geo-compass {
    position: absolute;
    bottom: 3rem;
    right: 6%;
    width: 90px;
    height: 90px;
    opacity: 0.12;
    pointer-events: none;
    z-index: 10;
    animation: rotate-compass 180s linear infinite;
    filter: invert(1);
}

@keyframes rotate-compass {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    z-index: 10;
    transition: opacity 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.scroll-indicator:hover {
    color: var(--accent-amber);
    opacity: 1;
}

.scroll-indicator svg {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Postcard Style for Category Cards */
.postcard-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.25rem 3rem 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: center;
    cursor: pointer;
}

.postcard-card::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 65px;
    height: 75px;
    background: radial-gradient(circle, transparent 20%, #e2e8f0 20%, #e2e8f0 21%, transparent 21%),
                linear-gradient(rgba(245, 158, 11, 0.04), rgba(245, 158, 11, 0.04));
    background-size: 8px 8px, 100% 100%;
    opacity: 0.9;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
}

.postcard-stamp {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 50px;
    height: 60px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    z-index: 3;
    transform: rotate(-6deg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.4s ease;
}

.postcard-stamp::after {
    content: '✈';
    font-size: 1.5rem;
    color: var(--accent-amber);
    opacity: 0.7;
}

.postcard-card:hover .postcard-stamp {
    transform: rotate(4deg) scale(1.05);
}

.postcard-card:hover {
    transform: translateY(-12px) rotate(1.5deg);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
}

.postcard-card img {
    border-radius: 6px;
    filter: sepia(0.12) contrast(1.02) brightness(0.98);
    transition: all 0.5s ease;
    width: 100%;
    height: 20rem;
    object-fit: cover;
}

.postcard-card:hover img {
    filter: sepia(0) contrast(1.06) brightness(1.02);
}

.postcard-label {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #0f172a;
    margin-top: 1.25rem;
    text-align: left;
    border-bottom: 2px solid #f8fafc;
    padding-bottom: 0.5rem;
}

.postcard-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #64748b;
    text-align: left;
    margin-top: 0.75rem;
    display: flex;
    justify-content: space-between;
}

.postcard-tag {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Stats Section Styling */
.stats-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Upgraded Lightbox styling */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 9, 12, 0.97);
    z-index: 1000;
    backdrop-filter: blur(24px);
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Outer wrapper for layout */
.lightbox-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Image Container for zooming & panning */
.lightbox-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    overflow: hidden;
}

.lightbox-image-container img {
    max-width: 90%;
    max-height: 82%;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-drag: none;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    transform-origin: center center;
    cursor: grab;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lightbox-image-container img.zoomed {
    cursor: move;
    cursor: -webkit-grab;
}

.lightbox-image-container img.zoomed:active {
    cursor: grabbing;
}

/* Video specific sizing in lightbox */
.lightbox-image-container video {
    max-width: 90%;
    max-height: 82%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    z-index: 1002;
}

/* Navigation Overlays */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 2.25rem;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.25s ease;
    z-index: 1010;
    backdrop-filter: blur(8px);
}

.lightbox-nav:hover {
    background: rgba(245, 158, 11, 0.85);
    border-color: rgba(245, 158, 11, 0.3);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.lightbox-prev {
    left: 2.5rem;
}

.lightbox-next {
    right: 2.5rem;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.75rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.25s ease;
    z-index: 1010;
    backdrop-filter: blur(8px);
}

.lightbox-close:hover {
    background: rgba(239, 68, 68, 0.85);
    border-color: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* Zoom UI Controls Overlay */
.lightbox-zoom-controls {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 1010;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(12px);
    padding: 0.35rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.zoom-btn {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--accent-amber);
}

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

.zoom-indicator {
    position: absolute;
    top: 5.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.8);
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1009;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.zoom-indicator.visible {
    opacity: 1;
}

/* Lightbox Caption Overlay */
.lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(8, 9, 12, 0.98) 0%, rgba(8, 9, 12, 0.8) 70%, rgba(8, 9, 12, 0) 100%);
    padding: 4rem 3rem 2.5rem 3rem;
    color: white;
    z-index: 1010;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-caption.hidden-caption {
    transform: translateY(100%);
}

.lightbox-caption * {
    pointer-events: auto;
}

.caption-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.caption-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    color: #f1f5f9;
}

.caption-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.caption-desc {
    font-size: 0.95rem;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0.35rem 0;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.caption-meta {
    display: flex;
    gap: 1.75rem;
    font-size: 0.8rem;
    color: #94a3b8;
    align-items: center;
    margin-top: 0.25rem;
}

.caption-location, .caption-date, .caption-collection {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.caption-location svg, .caption-date svg, .caption-collection svg {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--accent-amber);
    flex-shrink: 0;
}

/* Swipe hint for mobile in lightbox */
.lightbox-swipe-hint {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    z-index: 1009;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.1em;
    display: none;
}

@media (max-width: 768px) {
    .lightbox-nav {
        display: none; /* Hide buttons on mobile, swipe is better */
    }
    .lightbox-prev, .lightbox-next {
        display: none !important;
    }
    .lightbox-close {
        top: 1.5rem;
        right: 1.5rem;
    }
    .lightbox-zoom-controls {
        top: 1.5rem;
    }
    .lightbox-image-container {
        width: 100%;
        height: 100%;
    }
    .lightbox-image-container img,
    .lightbox-image-container video {
        max-width: 95%;
        max-height: 72%;
    }
    .lightbox-caption {
        padding: 3rem 1.5rem 2rem 1.5rem;
    }
    .caption-title {
        font-size: 1rem;
    }
    .caption-desc {
        font-size: 0.85rem;
        max-width: 100%;
    }
    .lightbox-swipe-hint {
        display: block;
    }
}

/* Explore Page Specific Redesign Styles */
.filter-sidebar-premium {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.05);
    border-radius: 1.25rem;
    transition: all 0.3s ease;
}

.filter-sidebar-premium:hover {
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.08);
}

.filter-chip-premium {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 9999px;
    padding: 0.35rem 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-chip-premium:hover {
    border-color: rgba(245, 158, 11, 0.5);
    color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.05);
}

.filter-chip-premium.active {
    background: rgba(245, 158, 11, 0.08);
    border-color: #f59e0b;
    color: #d97706;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
}

.filter-chip-premium:active {
    transform: translateY(0);
}

/* Elegant dropdown reset */
.premium-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.25rem;
}

.map-container-premium {
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(0, 0, 0, 0.02);
    border-radius: 1rem;
    overflow: hidden;
}

/* Leaflet Custom Style Overrides */
.leaflet-container {
    font-family: 'Inter', sans-serif !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15) !important;
    border: 1px solid rgba(15, 23, 42, 0.05) !important;
}

.leaflet-popup-content {
    margin: 12px !important;
}

/* Premium textured paper/sage background for explorer column */
.bg-sage-textured {
    background-color: #dbe8df;
    background-image: 
        radial-gradient(rgba(15, 23, 42, 0.045) 1.2px, transparent 1.2px), 
        linear-gradient(180deg, #dbe8df 0%, #c4d8c8 100%);
    background-size: 24px 24px, 100% 100%;
    background-attachment: scroll, local;
}


