:root {
    --primary: #D8A7B1;        /* Dusty Pink */
    --primary-dark: #B38B95;   /* Rich Deep Rose */
    --primary-light: #FAE1DF;  /* Soft Warm Pink */
    --background: #FFF9F9;     /* Creamy Rose-White */
    --surface: #FFFFFF;
    --text: #4E4E4E;
    --text-muted: #8E8E8E;
    --accent: #FAE1DF;
    --shadow: rgba(142, 88, 98, 0.12);
    --border: rgba(216, 167, 177, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #FAE1DF 0%, #D8A7B1 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Hide body scrollbars on desktop */
}

/* Scrollbar styling for a premium feel */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(216, 167, 177, 0.4);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(216, 167, 177, 0.6);
}

/* App Container / Gallery Shell - Centered mobile view */
.app-container, .gallery-shell {
    width: 100%;
    max-width: 460px;
    height: 100vh;
    height: 100dvh;
    background: var(--background);
    box-shadow: 0 24px 60px rgba(78, 78, 78, 0.25);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    animation: appFadeIn 0.5s ease;
}

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

/* Full screen on mobile viewports */
@media (max-width: 480px) {
    body {
        display: block;
        overflow: auto;
    }
    .app-container, .gallery-shell {
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        box-shadow: none;
        border: none;
    }
}

/* Overlays (Login & Loading) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FAE1DF 0%, #D8A7B1 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Login Card style */
.login-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 3rem 2rem 2.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(142, 88, 98, 0.15);
    text-align: center;
    width: 88%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-box::before {
    content: "ᏰᎧᏁᏦᎧ";
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    display: block;
    letter-spacing: 0.1rem;
}
.login-box input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid rgba(216, 167, 177, 0.4);
    border-radius: 14px;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.login-box input:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 4px rgba(216, 167, 177, 0.25);
}

.login-box button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(142, 88, 98, 0.25);
    transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}

.login-box button:hover {
    box-shadow: 0 12px 20px rgba(142, 88, 98, 0.35);
}

.login-box button:active {
    transform: scale(0.97);
}

.error-msg {
    color: #C05869;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

/* Loading Animation Styles */
.birthday-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInTitle 1.2s ease forwards;
    letter-spacing: 0.05rem;
}

@keyframes fadeInTitle {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

.loading-text {
    display: flex;
    font-size: 4rem;
    font-weight: 800;
    font-style: italic;
    color: white;
    letter-spacing: 0.5rem;
}

.loading-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInLetter {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    70% {
        transform: translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Unified App Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(224, 176, 184, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.header-left, .header-right {
    width: 40px;
    display: flex;
    align-items: center;
}

.header-left {
    justify-content: flex-start;
}

.header-right {
    justify-content: flex-end;
}

.header-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    text-align: center;
    letter-spacing: 0.05rem;
}

.nav-back-btn, .nav-logout-btn {
    background: transparent;
    border: none;
    color: var(--primary-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
}

.nav-back-btn:hover, .nav-logout-btn:hover {
    background: rgba(216, 167, 177, 0.15);
}

.nav-back-btn:active, .nav-logout-btn:active {
    transform: scale(0.92);
}

/* Content Area */
.app-main {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 30px;
}

/* Hero Section */
.hero {
    padding: 2.5rem 1.5rem;
    background: linear-gradient(135deg, #FFF0F2 0%, #FCE2E6 100%);
    border: 1px solid rgba(216, 167, 177, 0.2);
    text-align: center;
    margin: 16px;
    border-radius: 24px;
    box-shadow: 0 10px 20px var(--shadow);
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.6;
}

/* Feature Cards */
.features {
    padding: 0 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 20px var(--shadow);
    border: 1px solid rgba(224, 176, 184, 0.15);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Arrow indicator on the right side of card */
.card::after {
    content: "→";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary-dark);
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.6;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(142, 88, 98, 0.12);
}

.card:hover::after {
    transform: translateY(-50%) translateX(4px);
    opacity: 1;
}

.card:active {
    transform: scale(0.98);
}

.card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
    color: var(--primary-dark);
    padding-right: 24px; /* avoid text overlaying the arrow */
}

.card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-right: 24px;
}

/* Love Quotes Section */
.love-quotes {
    padding: 2.2rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 24px;
    margin: 16px;
    box-shadow: 0 12px 28px rgba(142, 88, 98, 0.2);
}

.cherokee-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quote-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
}

.cta-btn {
    background: var(--surface);
    color: var(--primary-dark);
    border: none;
    padding: 0.85rem 2.2rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.cta-btn:active {
    transform: scale(0.96);
}

.quote-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    width: 100%;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.quote-card p {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.6;
}

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

/* Gallery Hero style inside subpages */
.gallery-hero {
    background: linear-gradient(135deg, #FFF0F2 0%, #FCE2E6 100%);
    border: 1px solid rgba(216, 167, 177, 0.2);
    border-radius: 24px;
    padding: 1.5rem;
    margin: 16px;
    box-shadow: 0 10px 20px var(--shadow);
    text-align: center;
}

.gallery-kicker {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-hero h1 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-dark);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.gallery-hero p {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.gallery-inline-photo {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 6px 12px var(--shadow);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 16px 30px 16px;
}

.gallery-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 16px var(--shadow);
    border: 1px solid rgba(224, 176, 184, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(142, 88, 98, 0.18);
}

.gallery-card:first-child {
    grid-column: 1 / -1;
}

.gallery-image {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:first-child .gallery-image {
    height: 220px;
}

.gallery-card:hover .gallery-image {
    transform: scale(1.04);
}

.gallery-caption {
    padding: 0.8rem 1rem;
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    color: var(--primary-dark);
    text-align: center;
    background: #FFF5F6;
    border-top: 1px solid rgba(224, 176, 184, 0.15);
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Video Grid and Video Cards */
.gallery-video-grid {
    grid-template-columns: 1fr;
}

.gallery-video-card {
    padding: 10px;
}

.gallery-video {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 480px;
    border-radius: 14px;
    background: #000;
    object-fit: cover;
}

/* Dev Dashboard styling (index.html) */
body.dashboard {
    display: flex;
    flex-direction: row;
    height: 100vh;
    width: 100vw;
    background: #1e1e24;
    color: #e2e2e9;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

.dashboard-sidebar {
    width: 320px;
    padding: 2.5rem 2rem;
    background: #141417;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-right: 1px solid #2d2d35;
    flex-shrink: 0;
}

.dashboard-sidebar h1 {
    font-size: 1.5rem;
    color: #d3939e;
}

.dashboard-sidebar p {
    font-size: 0.9rem;
    color: #a0a0ab;
    line-height: 1.6;
}

.status-panel, .instructions {
    background: #1e1e24;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid #2d2d35;
}

.status-panel h3, .instructions h3 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: #e2e2e9;
}

.status-panel code {
    background: #0d0d0f;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #d3939e;
}

.instructions ul {
    list-style: none;
    padding: 0;
}

.instructions li {
    font-size: 0.85rem;
    color: #a0a0ab;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instructions li::before {
    content: "✓";
    color: #d3939e;
    font-weight: bold;
}

.actions button {
    width: 100%;
    padding: 0.75rem;
    background: #d3939e;
    color: #141417;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.actions button:hover {
    opacity: 0.9;
}

.phone-simulator {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1e1e24;
    padding: 2rem;
}

.phone-frame {
    width: 375px;
    height: 812px;
    border: 12px solid #141417;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    background: #000;
}

.phone-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    body.dashboard {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #2d2d35;
        padding: 1.5rem;
    }
    .phone-simulator {
        padding: 1rem;
    }
}


