/* ============================================
   DT Photos - Style Sheet
   Warm coffee table book aesthetic
   ============================================ */

:root {
    --bg-primary: #f5f0ea;
    --bg-secondary: rgba(255, 255, 255, 0.85);
    --bg-card: rgba(255, 255, 255, 0.7);
    --text-primary: #2c2420;
    --text-secondary: #6b5e54;
    --accent: #a0785c;
    --accent-2: #c4956a;
    --accent-hover: #8b6347;
    --accent-gradient: linear-gradient(135deg, #a0785c, #c4956a);
    --border: rgba(44, 36, 32, 0.08);
    --overlay: rgba(20, 16, 14, 0.92);
    --shadow: 0 4px 24px rgba(44, 36, 32, 0.08);
    --glow: 0 0 40px rgba(160, 120, 92, 0.08);
    --radius: 12px;
    --transition: 0.3s ease;
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: rgba(30, 30, 30, 0.9);
    --bg-card: rgba(40, 40, 40, 0.7);
    --text-primary: #f0ebe5;
    --text-secondary: #a89e94;
    --accent: #c4956a;
    --accent-2: #d4a87a;
    --accent-hover: #dbb896;
    --accent-gradient: linear-gradient(135deg, #c4956a, #d4a87a);
    --border: rgba(255, 255, 255, 0.08);
    --overlay: rgba(0, 0, 0, 0.92);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --glow: 0 0 40px rgba(196, 149, 106, 0.1);
}

[data-theme="dark"] body {
    background: var(--bg-primary);
}

[data-theme="dark"] .access-screen {
    background: linear-gradient(-45deg, #1a1a1a, #222, #1e1e1e, #252525);
}

[data-theme="dark"] .access-box {
    background: rgba(30, 30, 30, 0.9);
    border-color: var(--border);
}

[data-theme="dark"] .access-box input {
    background: rgba(50, 50, 50, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

[data-theme="dark"] .photo-thumb {
    background: #2a2a2a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .lightbox-content img {
    border-color: rgba(60, 50, 40, 0.9);
    background: #222;
}

[data-theme="dark"] .welcome-section {
    background: rgba(30, 30, 30, 0.6);
}

[data-theme="dark"] .add-album-bar {
    background: rgba(30, 30, 30, 0.7);
}

[data-theme="dark"] .add-album-bar input[type="text"],
[data-theme="dark"] .add-album-bar select {
    background: rgba(50, 50, 50, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

[data-theme="dark"] .submission-card {
    background: rgba(30, 30, 30, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.7;
}

/* ---- Vietnam Hero Background ---- */
.app::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/saigon-bg.jpg') center center / cover no-repeat;
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
    filter: brightness(0.8) saturate(0.85);
}

.access-screen::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/saigon-bg.jpg') center bottom / cover no-repeat;
    opacity: 0.12;
    z-index: 0;
}

/* ---- Utility ---- */
.hidden {
    display: none !important;
}

/* ---- Animated Background ---- */
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---- Access Screen ---- */
.access-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(-45deg, #f5f0ea, #ede4d8, #f0e8dc, #f7f2ec);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

.access-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(160, 120, 92, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(196, 149, 106, 0.04) 0%, transparent 50%);
    animation: gradientShift 20s ease infinite reverse;
}

.access-box {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.access-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 12px rgba(160, 120, 92, 0.2));
}

.access-box h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.access-box > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.access-box input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid rgba(44, 36, 32, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    margin-bottom: 1rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.access-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(160, 120, 92, 0.1);
}

.access-box button {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    background: var(--accent-gradient);
    color: #fff;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    letter-spacing: 0.02em;
}

.access-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(160, 120, 92, 0.25);
}

.access-box button:active {
    transform: translateY(0);
}

.error {
    color: #f85149;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ---- App Container ---- */
.app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Header ---- */
.header {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    text-align: center;
}

.header-left {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.header-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 8px rgba(124, 106, 239, 0.3));
}

.header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    cursor: pointer;
    display: inline-block;
    transition: color var(--transition);
}

.header h1:hover {
    color: var(--accent);
}

.breadcrumb {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ---- Theme Toggle ---- */
.theme-toggle {
    display: flex;
    gap: 0;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 8px 0;
    background: var(--bg-primary);
}

.theme-btn {
    padding: 4px 14px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
    border-bottom: 1.5px solid transparent;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.theme-btn:hover {
    color: var(--text-primary);
}

.theme-btn.active {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-color: var(--accent);
}

.toggle-divider {
    color: var(--border);
    font-size: 0.85rem;
    margin: 0 0.3rem;
    user-select: none;
}

/* ---- Tab Navigation ---- */
.tab-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 0;
    background: none;
    border: none;
}

.tab-btn {
    padding: 8px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1.5px solid transparent;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: transparent;
}

.tab-btn.active {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 1.5px solid var(--accent);
    background: transparent;
    box-shadow: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab-panel {
    animation: fadeInUp 0.4s ease;
}

/* ---- Welcome Section ---- */
.welcome-section {
    text-align: center;
    padding: 3rem 2rem 2rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid var(--border);
}

.welcome-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.welcome-text {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.9;
}

.welcome-text em {
    font-style: italic;
    color: var(--accent);
}

.welcome-hearts {
    font-size: 1.8rem;
    text-align: center;
    margin-top: 0.5rem;
    letter-spacing: 0.3rem;
}

/* ---- Albums Grid ---- */
.albums-view {
    flex: 1;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.albums-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.album-card {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
    display: flex;
    flex-direction: row;
}

.album-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: var(--accent-gradient);
    opacity: 0;
    z-index: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(44, 36, 32, 0.12);
    border-color: rgba(160, 120, 92, 0.2);
}

.album-card:hover::before {
    opacity: 0.03;
}

.album-card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--bg-card);
    position: relative;
    z-index: 1;
}

.album-cover-wrap {
    position: relative;
    z-index: 1;
    width: 45%;
    min-width: 300px;
    min-height: 200px;
    flex-shrink: 0;
    overflow: hidden;
}

.album-owner-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    letter-spacing: 0.02em;
    z-index: 2;
}

.album-card-info {
    padding: 2rem 2.5rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    background: rgba(80, 50, 30, 0.25);
}

.album-card-info h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.album-card-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 300;
}

.album-card-info .album-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.7rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-top: 0.7rem;
    border-top: 1px solid var(--border);
}

/* ---- Photos View ---- */
.photos-view {
    flex: 1;
    padding-top: 60px;
    animation: fadeInUp 0.5s ease;
}

.album-header {
    margin-bottom: 2rem;
}

.back-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: all var(--transition);
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--accent);
    transform: translateX(-4px);
}

.album-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    position: fixed;
    top: 36px;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 12px 24px;
}

.slideshow-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn {
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--accent);
}

.slideshow-btn {
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.slideshow-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--accent);
}

.slideshow-btn.playing {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(160, 120, 92, 0.3);
}

.slideshow-speed {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    outline: none;
}

.slideshow-speed option {
    background: #fff;
    color: var(--text-primary);
}

.album-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.album-header > p {
    color: var(--text-secondary);
    font-weight: 300;
}

/* ---- Photos Grid ---- */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 32px;
    padding: 20px 10px;
}

.photo-thumb {
    aspect-ratio: auto;
    overflow: visible;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    background: #fff;
    padding: 10px 10px 40px 10px;
    box-shadow: 0 4px 16px rgba(44, 36, 32, 0.10), 0 1px 4px rgba(0,0,0,0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Random polaroid rotations */
.photo-thumb:nth-child(5n+1) { transform: rotate(-2deg); }
.photo-thumb:nth-child(5n+2) { transform: rotate(1.5deg); }
.photo-thumb:nth-child(5n+3) { transform: rotate(-1deg); }
.photo-thumb:nth-child(5n+4) { transform: rotate(2.5deg); }
.photo-thumb:nth-child(5n+5) { transform: rotate(-0.5deg); }

.photo-thumb:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 12px 40px rgba(44, 36, 32, 0.18);
    z-index: 10;
}

.photo-thumb img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    border-radius: 2px;
    transition: filter 0.5s ease;
}

.photo-thumb:hover img,
.photo-thumb:hover video,
.photo-thumb:hover canvas {
    filter: brightness(1.05);
}

.photo-thumb .photo-overlay {
    position: absolute;
    bottom: 8px;
    left: 10px;
    right: 10px;
    padding: 4px 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: 2px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-thumb:hover .photo-overlay {
    opacity: 1;
}

.photo-thumb video {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 2px;
    transition: filter 0.5s ease;
}

.photo-thumb canvas.video-thumb-canvas {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 2px;
    transition: filter 0.5s ease;
    background: #ede4d8;
}

.video-badge {
    position: absolute;
    top: calc(50% - 15px);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--accent);
    pointer-events: none;
    border: 2px solid var(--border);
    transition: transform var(--transition), background var(--transition);
}

.photo-thumb:hover .video-badge {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(160, 120, 92, 0.9);
    color: #fff;
}

/* ---- Lightbox ---- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 16, 14, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox-content {
    min-width: 0;
    max-height: 80vh;
    text-align: center;
    position: relative;
    perspective: 1200px;
    overflow: clip;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rustic wooden frame board */
.lightbox-content::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -35px;
    right: 0px;
    bottom: -30px;
    background: #3d3528;
    border-radius: 4px;
    box-shadow:
        inset 0 0 30px rgba(0,0,0,0.4),
        inset 0 0 60px rgba(0,0,0,0.2),
        0 10px 50px rgba(0,0,0,0.5),
        0 4px 16px rgba(0,0,0,0.3);
    z-index: -1;
    /* Rough painted edge effect */
    border: 3px solid #2a2418;
    outline: 2px solid rgba(80, 70, 50, 0.5);
}

/* Wood grain texture overlay */
.lightbox-content::after {
    content: '';
    position: absolute;
    top: -30px;
    left: -35px;
    right: 0px;
    bottom: -30px;
    border-radius: 4px;
    background:
        repeating-linear-gradient(
            2deg,
            transparent,
            transparent 8px,
            rgba(0,0,0,0.03) 8px,
            rgba(0,0,0,0.03) 9px
        ),
        repeating-linear-gradient(
            178deg,
            transparent,
            transparent 12px,
            rgba(255,255,255,0.02) 12px,
            rgba(255,255,255,0.02) 13px
        ),
        linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
    z-index: -1;
    pointer-events: none;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 2px;
    border: 8px solid rgba(245, 240, 230, 0.9);
    outline: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    background: #fff;
}

/* Transition: 3D Horizontal Flip */
.lightbox-img-animate.anim-flip-h {
    animation: flipH 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes flipH {
    0%   { opacity: 0; transform: rotateY(90deg) scale(0.9); }
    50%  { opacity: 1; }
    100% { opacity: 1; transform: rotateY(0deg) scale(1); }
}

/* Transition: 3D Vertical Flip */
.lightbox-img-animate.anim-flip-v {
    animation: flipV 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes flipV {
    0%   { opacity: 0; transform: rotateX(90deg) scale(0.9); }
    50%  { opacity: 1; }
    100% { opacity: 1; transform: rotateX(0deg) scale(1); }
}

/* Transition: Fade + Slide Right */
.lightbox-img-animate.anim-fade-slide {
    animation: fadeSlide 0.6s ease-out forwards;
}
@keyframes fadeSlide {
    0%   { opacity: 0; transform: translateX(-60px) scale(0.95); filter: blur(4px); }
    100% { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

/* Transition: Zoom + Rotate */
.lightbox-img-animate.anim-zoom-rotate {
    animation: zoomRotate 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes zoomRotate {
    0%   { opacity: 0; transform: scale(0.4) rotate(-8deg); filter: blur(6px); }
    70%  { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0); }
}

/* Transition: Fade + Scale Up */
.lightbox-img-animate.anim-fade-scale {
    animation: fadeScale 0.55s ease-out forwards;
}
@keyframes fadeScale {
    0%   { opacity: 0; transform: scale(1.15); filter: blur(6px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

.lightbox-caption {
    color: #f5f0ea;
    margin-top: 16px;
    font-size: 0.95rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Lightbox layout with comments */
.lightbox-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    width: 90vw;
    max-width: 1200px;
    height: 80vh;
    max-height: 80vh;
    overflow: hidden;
}

.lightbox-comments {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 0 16px 16px 0;
    display: flex;
    flex-direction: column;
    padding: 12px;
    color: #333;
    overflow-y: auto;
    position: relative;
    z-index: 2;
}

[data-theme="dark"] .lightbox-comments {
    background: rgba(40, 36, 34, 0.95);
    color: #e8e0d8;
}

.comments-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

[data-theme="dark"] .comments-title {
    border-bottom-color: rgba(255,255,255,0.1);
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.comment-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

[data-theme="dark"] .comment-item {
    border-bottom-color: rgba(255,255,255,0.06);
}

.comment-author-name {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.8rem;
}

.comment-date {
    font-size: 0.7rem;
    color: #999;
    margin-left: 8px;
}

.comment-body {
    margin-top: 4px;
    line-height: 1.4;
}

.comment-empty {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
    font-size: 0.85rem;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 8px;
}

[data-theme="dark"] .comment-form {
    border-top-color: rgba(255,255,255,0.1);
}

.comment-author {
    padding: 6px 8px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.75rem;
    background: rgba(255,255,255,0.8);
    color: #333;
}

[data-theme="dark"] .comment-author {
    background: rgba(60,56,52,0.8);
    color: #e8e0d8;
    border-color: rgba(255,255,255,0.15);
}

.comment-input {
    padding: 8px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.8rem;
    resize: none;
    background: rgba(255,255,255,0.8);
    color: #333;
}

[data-theme="dark"] .comment-input {
    background: rgba(60,56,52,0.8);
    color: #e8e0d8;
    border-color: rgba(255,255,255,0.15);
}

.comment-input:focus, .comment-author:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-submit {
    padding: 6px 12px;
    background: #5ba8d9;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.comment-submit:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .lightbox-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        width: 95vw;
        height: auto;
        max-height: 95vh;
    }
    .lightbox-comments {
        max-height: 30vh;
        border-radius: 0 0 16px 16px;
    }
    .lightbox-content img {
        max-width: 90vw;
        max-height: 55vh;
    }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: background var(--transition), transform var(--transition);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(160, 120, 92, 0.5);
    transform: scale(1.1);
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* ---- Loading Spinner ---- */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Footer ---- */
.footer {
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.03em;
}

/* ---- Play All Button ---- */
.play-all-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 2rem 0 1rem;
}

.play-all-btn {
    padding: 12px 28px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.play-all-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--accent);
    transform: scale(1.03);
}

.play-all-btn.playing {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(160, 120, 92, 0.3);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .albums-grid {
        gap: 16px;
    }

    .album-card {
        flex-direction: column;
    }

    .album-cover-wrap,
    .album-card-cover {
        width: 100%;
        min-width: unset;
    }

    .album-card-info {
        padding: 1.2rem 1.4rem;
    }

    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
        padding: 10px 5px;
    }

    .photo-thumb {
        padding: 6px 6px 28px 6px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }

    .access-box {
        padding: 2rem;
    }

    .header h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 8px 4px;
    }

    .photo-thumb {
        padding: 5px 5px 24px 5px;
    }

    .albums-grid {
        gap: 12px;
    }

    .app {
        padding: 12px;
    }
}

/* ============================================
   Add Album Bar
   ============================================ */
.add-album-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    flex-wrap: wrap;
}

.add-album-bar select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(44, 36, 32, 0.12);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.add-album-bar select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(160, 120, 92, 0.12);
}

.add-album-bar select option {
    background: #fff;
    color: var(--text-primary);
}

.add-album-bar input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(44, 36, 32, 0.12);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.add-album-bar input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(160, 120, 92, 0.12);
}

.add-album-bar input[type="text"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.add-album-bar button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: var(--accent-gradient);
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.add-album-bar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(160, 120, 92, 0.3);
}

/* ============================================
   Submitted Albums List
   ============================================ */
.submissions-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.submissions-list {
    margin-bottom: 28px;
}

.submissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.submission-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    backdrop-filter: blur(10px);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.submission-card:hover {
    border-color: rgba(160, 120, 92, 0.2);
    box-shadow: var(--glow);
}

.submissions-description {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 300;
    margin-bottom: 14px;
}

.submission-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.submission-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.submission-delete {
    background: none;
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: #f85149;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    padding: 0;
}

.submission-delete:hover {
    background: rgba(248, 81, 73, 0.15);
    border-color: #f85149;
}

.submission-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.submission-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.submission-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.submission-link-text {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.85rem;
    word-break: break-all;
    user-select: text;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.submission-copy {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
    padding: 0;
}

.submission-copy:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(160, 120, 92, 0.08);
}

.submission-copy.copied {
    border-color: #3fb950;
    color: #3fb950;
}

.toggle-submissions-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-secondary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.toggle-submissions-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(160, 120, 92, 0.08);
}

.toggle-submissions-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(160, 120, 92, 0.08);
}

/* ---- Custom Cursor ---- */
.custom-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

.custom-cursor.visible {
    opacity: 0;
}

.custom-cursor.hovering {
    opacity: 1;
    width: 60px;
    height: 60px;
}

@media (hover: none), (max-width: 768px) {
    .custom-cursor {
        display: none !important;
    }
}
