:root {
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-tertiary: #9CA3AF;
    --accent: #0284C7;
    --accent-light: #E0F2FE;
    --bg-glass: rgba(250, 250, 249, 0.75);
    --bg-glass-heavy: rgba(250, 250, 249, 0.85);
    --border-glass: rgba(255, 255, 255, 0.6);
    --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 20px 40px rgba(0, 0, 0, 0.08);
    --nav-height: 84px;
    --safe-area-bottom: env(safe-area-inset-bottom, 20px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text-primary);
    background-color: #F3F4F6;
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
}

/* Stunning blurred background */
.app-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('assets/bg.png');
    background-size: cover;
    background-position: center;
    /* Soft blur to make text pop, like an iOS lock screen */
    filter: blur(8px) brightness(1.05);
    transform: scale(1.05); /* Prevents blur edges */
    z-index: -1;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-width: 500px; /* Slimmer, true mobile width */
    margin: 0 auto;
    position: relative;
    background: rgba(255,255,255,0.1);
}

/* Hide scrollbars */
#main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 24px calc(var(--nav-height) + var(--safe-area-bottom) + 24px) 24px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
#main-content::-webkit-scrollbar { display: none; }

/* Transitions */
.view {
    display: none;
    animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}
.view.active {
    display: block;
}

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

/* Typography */
.hero-header {
    margin-bottom: 32px;
    text-align: left;
}
.hero-header .overline {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
}
.hero-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

h3.card-title, .timeline-content h3, .location-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.text-center { text-align: center; }

/* Premium Cards */
.premium-card {
    background: var(--bg-glass);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

/* Dashboard Specifics */
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}
.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.time-block span {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1;
}
.time-block small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 500;
}

.status-content, .weather-content {
    display: flex;
    align-items: center;
    gap: 16px;
}
.icon-accent {
    font-size: 32px;
    color: var(--accent);
    background: var(--accent-light);
    padding: 12px;
    border-radius: 50%;
}
.status-text, .weather-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.status-highlight {
    font-weight: 600;
    color: var(--accent);
}

/* Itinerary */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.timeline-item {
    display: flex;
    gap: 20px;
    padding: 24px 20px;
}
.date-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}
.date-day {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    line-height: 1;
    color: var(--text-primary);
}
.date-month {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 600;
    margin-top: 4px;
}
.event-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}
.event-time .material-symbols-rounded { font-size: 16px; }
.event-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.highlight-item {
    background: #ffffff;
    border: 1px solid var(--accent-light);
    box-shadow: var(--shadow-medium);
}

/* Photos */
.upload-wrapper {
    margin-bottom: 32px;
}
.elegant-button {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,1);
    box-shadow: var(--shadow-soft);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.elegant-button:active {
    transform: scale(0.97);
    background: #f9f9f9;
}

.photo-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.photo-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.03);
    animation: fadeSlideUp 0.6s ease forwards;
}
.photo-card img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}
.photo-caption {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    background: #fff;
}

/* Map */
.map-container-card {
    padding: 12px;
}
#interactive-map {
    height: 300px;
    width: 100%;
    border-radius: 16px;
    z-index: 1;
}
.leaflet-bottom {
    z-index: 90 !important;
}
.location-card {
    padding: 24px;
}
.address {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}
.text-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}
.text-link:active { opacity: 0.6; }

/* iOS Bottom Nav */
.ios-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-area-bottom));
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: space-around;
    padding-bottom: var(--safe-area-bottom);
    z-index: 100;
    max-width: 500px;
    margin: 0 auto;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    flex: 1;
    padding-top: 8px;
    transition: color 0.3s ease;
}

.nav-item .icon {
    font-size: 26px;
    font-variation-settings: 'FILL' 0, 'wght' 300;
    transition: font-variation-settings 0.3s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item .label {
    font-size: 10px;
    font-weight: 500;
}

.nav-item.active {
    color: var(--accent);
}
.nav-item.active .icon {
    font-variation-settings: 'FILL' 1, 'wght' 400;
    transform: scale(1.1);
}

@media (min-width: 501px) {
    .app-container { border-left: 1px solid rgba(255,255,255,0.4); border-right: 1px solid rgba(255,255,255,0.4); box-shadow: 0 0 50px rgba(0,0,0,0.1); }
}
