/* ═══════════════════════════════════════════════════════════
   EventSnap Upload Page — Mobile App Experience CSS
   ═══════════════════════════════════════════════════════════ */

/* ─── Reset & Base ──────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --accent: #e86c6c;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fdf6f5;
    color: #3d3336;
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent, #e86c6c);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #d45a5a;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hidden {
    display: none !important;
}

/* ─── Top Header Bar ────────────────────────────────────── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.65rem 0;
    background: linear-gradient(135deg, var(--accent, #e86c6c), color-mix(in srgb, var(--accent, #e86c6c) 80%, white));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(232, 108, 108, 0.15);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
}

.app-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.app-brand img {
    height: 28px;
    width: 28px;
    border-radius: 7px;
}

.app-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.88);
    padding: 0.28rem 0.75rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ─── Language Switcher ─────────────────────────────────── */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.lang-option {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
}

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

.lang-option.active {
    background: rgba(232, 108, 108, 0.4);
    box-shadow: 0 0 0 2px rgba(232, 108, 108, 0.5);
}

/* ─── Photo Strip (desktop only) ────────────────────────── */
.photo-strip {
    display: none;
}

/* ─── Desktop Tabs (hidden on mobile) ───────────────────── */
.desktop-tabs {
    display: none;
}

/* ─── App Content Area ──────────────────────────────────── */
.app-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 0.75rem;
    min-height: calc(100vh - 52px - 72px);
    min-height: calc(100dvh - 52px - 72px);
}

/* ─── Event Hero ────────────────────────────────────────── */
.event-hero {
    text-align: center;
    padding: 1.25rem 0.5rem 0.75rem;
}

.event-hero-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.25rem;
}

.event-hero-title {
    font-size: clamp(1.25rem, 5vw, 1.6rem);
    color: var(--accent, #e86c6c);
    margin-bottom: 0.2rem;
}

.event-hero-subtitle {
    color: #7a6b6e;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ─── Tab Panels ────────────────────────────────────────── */
.tab-panel {
    animation: tabFadeIn 0.25s ease;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══ BOTTOM NAVIGATION BAR ═══════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    background: none;
    cursor: pointer;
    color: #aa9d9f;
    transition: all 0.2s ease;
    position: relative;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    padding: 6px 0;
}

.bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 32px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--accent, #e86c6c);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

.bottom-nav-item.active {
    color: var(--accent, #e86c6c);
}

.bottom-nav-icon {
    font-size: 24px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.1);
}

.bottom-nav-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
}

.bottom-nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ─── Dropzone ──────────────────────────────────────────── */
.dropzone {
    border: 2px dashed #e8d0cb;
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    margin-bottom: 1rem;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--accent, #e86c6c);
    background: #fef5f3;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232, 108, 108, 0.1);
}

.dropzone-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef0ee, #fef5f3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}

.dropzone:hover .dropzone-icon-wrap {
    transform: scale(1.08);
}

.dropzone-material-icon {
    font-size: 28px;
    color: var(--accent, #e86c6c);
}

.dropzone-text {
    color: #5c4d50;
    font-size: 0.92rem;
}

.dropzone-text strong {
    color: var(--accent, #e86c6c);
    font-weight: 600;
}

.dropzone-hint {
    color: #9a8d8f;
    font-size: 0.78rem;
    margin-top: 0.3rem;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    border: none;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent, #e86c6c), color-mix(in srgb, var(--accent, #e86c6c) 70%, white));
    color: #fff;
    box-shadow: 0 4px 16px rgba(232, 108, 108, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232, 108, 108, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-outline {
    background: transparent;
    color: var(--accent, #e86c6c);
    border: 2px solid #f5d5d0;
}

.btn-outline:hover {
    background: #fef0ee;
    border-color: #e8afa8;
}

.btn-ghost {
    background: transparent;
    color: #7a6b6e;
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
}

.btn-ghost:hover {
    color: #e86c6c;
    background: #fef0ee;
    border-radius: 100px;
}

.btn-lg {
    padding: 1rem 2.2rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* ─── File Count Badge ──────────────────────────────────── */
.file-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef0ee;
    color: var(--accent, #e86c6c);
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ─── File Previews Grid ────────────────────────────────── */
.file-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.file-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #f5ece9;
    animation: fadeInUp 0.3s ease forwards;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-video {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fef0ee, #fef5f3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--accent, #e86c6c);
    gap: 4px;
}

.file-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.file-preview-remove:hover {
    background: #ef4444;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Guest Info Fields ─────────────────────────────────── */
.guest-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* ─── Progress ──────────────────────────────────────────── */
.progress-section {
    text-align: left;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    color: #5c4d50;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #f5ece9;
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--accent, #e86c6c), color-mix(in srgb, var(--accent, #e86c6c) 70%, white));
    border-radius: 100px;
    transition: width 0.3s ease;
    width: 0%;
}

.file-status-list {
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.upload-file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    font-size: 0.83rem;
    margin-bottom: 2px;
    transition: all 0.25s ease;
    background: transparent;
}

.upload-file-item.is-active {
    background: #fef5f3;
}

.upload-file-item.is-done {
    opacity: 0.6;
}

.upload-file-item.is-failed {
    opacity: 0.7;
    background: #fef2f2;
}

.upload-file-name {
    color: #5c4d50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.upload-file-size {
    color: #aa9d9f;
    font-size: 0.73rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.upload-file-status {
    font-weight: 600;
    font-size: 0.82rem;
    min-width: 32px;
    text-align: right;
    flex-shrink: 0;
}

.upload-file-status.success {
    color: #34d399;
    font-size: 1rem;
}

.upload-file-status.failed {
    color: #ef4444;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.upload-error-msg {
    font-weight: 500;
    font-size: 0.7rem;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-retry-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.2s;
    min-height: 32px;
    min-width: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.upload-retry-btn:hover {
    background: #dc2626;
}

.upload-file-status.uploading {
    color: var(--accent, #e86c6c);
}

.upload-pct {
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent, #e86c6c);
}

.upload-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #f5ece9;
    border-top-color: var(--accent, #e86c6c);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

/* ─── Success ───────────────────────────────────────────── */
.success-box {
    text-align: center;
    padding: 1.5rem 0;
}

.success-emoji {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.success-title {
    color: #34d399;
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.success-subtitle {
    color: #7a6b6e;
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

.success-actions {
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
}

/* ─── Gallery Section ───────────────────────────────────── */
.gallery-section {
    padding-top: 0.5rem;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    position: sticky;
    top: 52px;
    background: #fdf6f5;
    padding: 0.5rem 0;
    z-index: 10;
}

.gallery-header h2 {
    font-size: 1.15rem;
    color: #2b2325;
}

.gallery-count {
    background: #fef0ee;
    color: var(--accent, #e86c6c);
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5ece9;
    cursor: pointer;
    transition: opacity 0.2s ease;
    border-radius: 2px;
}

.gallery-item:hover {
    opacity: 0.85;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
}

.gallery-video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2025 0%, #3d2f35 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gallery-video-play {
    width: 40px;
    height: 40px;
    background: rgba(232, 108, 108, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    box-shadow: 0 2px 12px rgba(232, 108, 108, 0.35);
}

.gallery-video-label {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.02em;
}

/* Thumbnail overlay — shown on top of placeholder when Drive provides a real thumbnail */
.gallery-video-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Keep the play button overlay above the thumbnail */
.gallery-item .gallery-item-video {
    z-index: 2;
}

.gallery-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #9a8d8f;
    font-size: 0.92rem;
}

.gallery-empty-icon {
    font-size: 2.5rem;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.gallery-loading {
    text-align: center;
    padding: 3rem;
    color: #9a8d8f;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #f5ece9;
    border-top: 3px solid var(--accent, #e86c6c);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Lightbox ──────────────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1010;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1010;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}

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

.lightbox-prev {
    left: 0.75rem;
}

.lightbox-next {
    right: 0.75rem;
}

.lightbox-content {
    position: relative;
    z-index: 1005;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 3.5rem 0.5rem 4.5rem;
    touch-action: pan-y;
    user-select: none;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
    object-fit: contain;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.lightbox-content img.loading {
    opacity: 0.4;
}

.lightbox-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    z-index: 1010;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 1.1rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.18);
    white-space: nowrap;
}

.lightbox-download-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* ─── Video Lightbox ──────────────────────────────────── */
.video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-lightbox.hidden {
    display: none !important;
}

.video-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.video-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.video-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.video-lightbox-content {
    position: relative;
    z-index: 10000;
    width: 90vw;
    max-width: 900px;
    min-height: 50vh;
    max-height: 85vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    animation: videoSlideUp 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.video-lightbox-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

#video-lightbox-native {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    background: #000;
}

.video-processing-notice {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(43, 35, 37, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 16px 16px 0 0;
    animation: fadeIn 0.3s ease;
}

@keyframes videoSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .video-lightbox-content {
        width: 100vw;
        height: 100vh;
        max-width: none;
        aspect-ratio: auto;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        position: relative;
    }

    .video-lightbox-content iframe {
        display: none;
    }

    #video-lightbox-native {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #000;
    }

    .video-lightbox-close {
        top: env(safe-area-inset-top, 0.5rem);
        right: 0.5rem;
        z-index: 10002;
    }

    .video-processing-notice {
        border-radius: 0;
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    .video-lightbox .lightbox-bottom {
        position: fixed;
        bottom: env(safe-area-inset-bottom, 0);
        left: 0;
        right: 0;
        z-index: 10002;
        padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0));
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    }
}

/* ─── Mobile Video Player Overlays ──────────────────────── */

/* Loading overlay — shown while video buffers */
.video-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.video-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.video-loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* Play button overlay — shown when video is ready to play */
.video-play-overlay {
    position: absolute;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.video-play-icon {
    width: 72px;
    height: 72px;
    background: rgba(232, 108, 108, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    padding-left: 4px;
    box-shadow: 0 4px 24px rgba(232, 108, 108, 0.4), 0 0 0 0 rgba(232, 108, 108, 0.3);
    animation: playPulse 2s ease infinite;
    transition: transform 0.15s ease;
}

.video-play-overlay:active .video-play-icon {
    transform: scale(0.92);
}

@keyframes playPulse {

    0%,
    100% {
        box-shadow: 0 4px 24px rgba(232, 108, 108, 0.4), 0 0 0 0 rgba(232, 108, 108, 0.3);
    }

    50% {
        box-shadow: 0 4px 24px rgba(232, 108, 108, 0.4), 0 0 0 16px rgba(232, 108, 108, 0);
    }
}

/* Fullscreen button — bottom-left corner */
.video-fullscreen-btn {
    position: absolute;
    bottom: 80px;
    left: 1rem;
    z-index: 10001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s;
}

.video-fullscreen-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

/* ─── Confetti ──────────────────────────────────────────── */
.confetti {
    position: fixed;
    top: -10px;
    z-index: 9999;
    pointer-events: none;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ─── Footer ────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: #9a8d8f;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
}

.footer a {
    color: var(--accent, #e86c6c);
    font-weight: 600;
}

/* ─── Password Gate ─────────────────────────────────────── */
.password-gate {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(248, 247, 252, 0.97);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.password-card {
    background: #fff;
    border: 2px solid #f5ece9;
    border-radius: 24px;
    padding: 2.5rem 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.password-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.password-card h2 {
    font-size: 1.3rem;
    color: #2b2325;
    margin-bottom: 0.5rem;
}

.password-card p {
    color: #7a6b6e;
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

.password-card .input {
    margin-bottom: 0.75rem;
}

.password-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* ─── Welcome Banner ────────────────────────────────────── */
.welcome-banner {
    max-width: 700px;
    margin: 0.75rem auto 0;
    padding: 0.65rem 1rem;
    background: linear-gradient(135deg, #fef0ee, #fef5f3);
    border-radius: 12px;
    text-align: center;
    color: var(--accent, #e86c6c);
    font-weight: 500;
    font-size: 0.88rem;
}

/* ─── Guestbook ─────────────────────────────────────────── */
.guestbook-section {
    padding: 0.5rem 0 1rem;
}

.guestbook-section h2 {
    font-size: 1.15rem;
    color: #2b2325;
    margin-bottom: 0.25rem;
}

.guestbook-subtitle {
    color: #7a6b6e;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

#guestbook-form .input {
    margin-bottom: 0.5rem;
}

.guestbook-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

#guestbook-form .btn {
    margin-top: 0.25rem;
}

.guestbook-messages {
    margin-top: 1.5rem;
}

.guestbook-message {
    background: #fff;
    border: 1px solid #f5ece9;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.6rem;
    animation: fadeInUp 0.3s ease;
}

.guestbook-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.guestbook-name {
    font-weight: 600;
    color: var(--accent, #e86c6c);
    font-size: 0.85rem;
}

.guestbook-date {
    color: #9a8d8f;
    font-size: 0.75rem;
}

.guestbook-text {
    color: #5c4d50;
    font-size: 0.88rem;
    line-height: 1.5;
}

.guestbook-empty {
    text-align: center;
    padding: 2rem;
    color: #9a8d8f;
    font-size: 0.92rem;
}

.guestbook-loading {
    text-align: center;
    padding: 1.5rem;
}

/* ─── Input ─────────────────────────────────────────────── */
.input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #f5d5d0;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    background: #fff;
    color: #3d3336;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
    border-color: var(--accent, #e86c6c);
    box-shadow: 0 0 0 3px rgba(232, 108, 108, 0.1);
}

.input::placeholder {
    color: #c4b8ba;
}


/* ═══════════════════════════════════════════════════════════
   DESKTOP STYLES (769px+)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 769px) {

    body {
        background: #fffbfa;
        padding-bottom: 0;
    }

    /* Show photo strip on desktop */
    .photo-strip {
        display: flex;
        justify-content: center;
        gap: 0.75rem;
        margin: 2rem auto 1.5rem;
        max-width: 600px;
        padding: 0 1rem;
    }

    .photo-strip img {
        width: 30%;
        height: 120px;
        object-fit: cover;
        border-radius: 14px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
        transition: transform 0.3s ease;
    }

    .photo-strip img:hover {
        transform: translateY(-4px) scale(1.02);
    }

    .photo-strip img:nth-child(1) {
        transform: rotate(-2deg);
    }

    .photo-strip img:nth-child(2) {
        transform: translateY(-8px);
    }

    .photo-strip img:nth-child(3) {
        transform: rotate(2deg);
    }

    .photo-strip img:nth-child(1):hover {
        transform: rotate(-2deg) translateY(-4px) scale(1.02);
    }

    .photo-strip img:nth-child(3):hover {
        transform: rotate(2deg) translateY(-4px) scale(1.02);
    }

    /* Desktop content gets card treatment */
    .app-content {
        max-width: 640px;
        padding: 0 1.5rem 3rem;
        min-height: auto;
    }

    /* Wider header */
    .app-header-inner {
        max-width: 700px;
        padding: 0 1.5rem;
    }

    .app-header {
        padding: 0.85rem 0;
    }

    .app-brand {
        font-size: 1.3rem;
    }

    .app-brand img {
        height: 32px;
        width: 32px;
    }

    /* Hide bottom nav on desktop, use desktop tabs */
    .bottom-nav {
        display: none;
    }

    /* Desktop tabs shown as inline buttons */
    .desktop-tabs {
        display: flex;
        gap: 0;
        margin-bottom: 1.5rem;
        border-bottom: 2px solid #f5ece9;
    }

    .desktop-tab {
        flex: 1;
        padding: 0.85rem 1rem;
        background: none;
        border: none;
        border-bottom: 3px solid transparent;
        margin-bottom: -2px;
        font-family: 'Inter', sans-serif;
        font-size: 0.92rem;
        font-weight: 600;
        color: #9a8d8f;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
    }

    .desktop-tab:hover {
        color: var(--accent, #e86c6c);
        background: #fef5f3;
    }

    .desktop-tab.active {
        color: var(--accent, #e86c6c);
        border-bottom-color: var(--accent, #e86c6c);
    }

    /* Gallery gets wider items on desktop */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.6rem;
    }

    .gallery-item {
        border-radius: 14px;
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }

    .gallery-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 30px rgba(232, 108, 108, 0.12);
        border-color: var(--accent, #e86c6c);
    }

    .gallery-item:hover img {
        transform: scale(1.05);
    }

    .gallery-item img {
        transition: transform 0.3s ease;
    }

    .gallery-header {
        position: static;
        background: none;
    }

    .guest-fields {
        flex-direction: row;
    }

    .guest-fields .input {
        flex: 1;
    }

    /* Dropzone bigger on desktop */
    .dropzone {
        padding: 3rem 2rem;
    }

    .dropzone-icon-wrap {
        width: 80px;
        height: 80px;
    }

    .dropzone-material-icon {
        font-size: 36px;
    }

    /* Lightbox adjustments */
    .lightbox-content {
        padding: 4rem 4rem 5rem;
    }

    .lightbox-content img {
        border-radius: 8px;
    }

    .lightbox-nav {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }

    .event-hero {
        padding: 1.5rem 0.5rem 1rem;
    }

    .event-hero-emoji {
        font-size: 2.8rem;
    }

    .welcome-banner {
        margin: 0 auto 1rem;
    }
}

/* ─── Small mobile tweaks ───────────────────────────────── */
@media (max-width: 360px) {
    .app-header-badge {
        display: none;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
    }
}

/* ─── Custom Hero Image ─────────────────────────────────── */
.custom-hero-image {
    display: block;
    width: calc(100% - 2rem);
    max-width: 480px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 16px;
    margin: 0.75rem auto 0;
    animation: fadeInUp 0.4s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.custom-hero-image.hidden {
    display: none !important;
}

/* ─── Slow Connection Tip ────────────────────────────── */
.slow-conn-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, #fff0ee, #fde8e4);
    border: 1px solid rgba(232, 108, 108, 0.25);
    border-radius: 12px;
    font-size: 0.85rem;
    color: #6b3a3a;
    font-weight: 400;
    line-height: 1.5;
    animation: slideDown 0.3s ease;
}

.slow-conn-banner.hidden {
    display: none !important;
}

.slow-conn-icon {
    font-size: 1.3rem;
    color: #e86c6c;
    flex-shrink: 0;
}

.slow-conn-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #c27070;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
    opacity: 0.6;
}

.slow-conn-close:hover {
    opacity: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}