/* --- THE JOURNEY: MASTER STYLES --- */

:root {
    --deep-navy: #051937;
    --terracotta: #6B3F69;
    --peach: #8D5F8C;
    --dusty-purple: #A376A2;
    /* Softened background color for glass blending */
    --cream-bg: rgba(255, 255, 255, 0.4); 
    --white: rgba(255, 255, 255, 0.85);
    --border-soft: rgba(255, 255, 255, 0.3);
    --shadow-rich: 0 20px 50px rgba(5, 25, 55, 0.12);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--deep-navy);
    min-height: 100vh;
    overflow-x: hidden;
    /* The Sunset Backdrop */
    background: url('bg.jpg') no-repeat center center fixed;
    background-size: cover;
    position: relative;
}

/* This creates a soft tint and blur over the background image */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(
        135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(238, 230, 238, 0.7) 100%
    );
    backdrop-filter: blur(5px); /* Deep blur for a 'cloudy' sunset look */
    -webkit-backdrop-filter: blur(5px);
    z-index: -2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

#particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    /* Subtle Mesh Glows to make particles pop */
    background: 
        radial-gradient(circle at 10% 20%, rgba(141, 95, 140, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(107, 63, 105, 0.1) 0%, transparent 40%);
}

#weather-effect-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

h1 { font-family: 'Poppins', sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; }

.header-gradient {
    background: linear-gradient(90deg, #f2676a, #b76181);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}


/* Updated Full Screen to be a fixed overlay for login */
.full-screen { 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 20px; 
    z-index: 10000; /* Ensures it sits above everything including nav */
    background: var(--cream-bg); /* Prevents background content flickering during load */
    transition: opacity 0.5s ease, visibility 0.5s;
}

/* Specifically target login background to keep particles visible if background is removed */
#login-screen {
    /* Use the uploaded image as a static backdrop */
    background: url('goris5.png') no-repeat center center fixed;
    background-size: cover;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* Dark overlay to ensure the login card pops and remains professional */
#login-screen::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg, 
        rgba(5, 25, 55, 0.4) 0%, 
        rgba(5, 25, 55, 0.7) 100%
    );
    z-index: 0;
}

.login-card {
    position: relative;
    z-index: 1;
    padding: 3.5rem;
    text-align: center;
    max-width: 460px;
    width: 90%;
    
    /* Ultra-clean Glassmorphism */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* Subtle "Glow" border to make the card feel premium */
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-top: 6px solid var(--terracotta);
    
    /* Soft, deep shadow for a floating effect */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border-radius: 28px;
}

@keyframes backgroundSlowZoom {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

/* Refined typography for Login */
.login-card h1 {
    font-size: 2.5rem;
}

.login-card p {
    font-size: 0.95rem;
    opacity: 0.8;
    color: var(--deep-navy);
}

.hidden { 
    display: none !important; 
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.glass-panel {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    box-shadow: var(--shadow-rich);
    backdrop-filter: blur(15px); /* Stronger blur for cards */
    -webkit-backdrop-filter: blur(15px);
}

/* --- NAVIGATION --- */
#nav-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.85);
    padding: 8px;
    border-radius: 50px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.nav-btn {
    padding: 10px 25px;
    border-radius: 40px;
    border: none;
    background: transparent;
    color: var(--deep-navy);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.95rem;
}

.nav-btn.active {
    background: var(--deep-navy);
    color: white;
}

/* --- PAGE 1: CONNECTION DESIGN --- */
.view-container { padding: 40px 20px; max-width: 1150px; margin: 0 auto; padding-top: 100px; }

.distance-header { text-align: center; margin-bottom: 40px; }
.distance-label { font-size: 0.8rem; font-weight: 800; letter-spacing: 2px; color: var(--terracotta); opacity: 0.8; }
#live-distance { font-family: 'JetBrains Mono', monospace; font-size: 2.8rem; margin: 10px 0; font-weight: 700; color: var(--deep-navy); }
.distance-line { 
    height: 2px; background: linear-gradient(90deg, transparent, var(--terracotta), transparent); 
    width: 250px; margin: 20px auto; position: relative;
}
.distance-line span { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: rgb(255 255 255 / 100%); padding: 0 15px; font-size: 1.4rem; }

.clock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 30px; }
.clock-card { padding: 45px; text-align: center; transition: 0.4s; border-bottom: 6px solid var(--dusty-purple); }
.clock-card:hover { transform: translateY(-5px); box-shadow: 0 20px 45px rgba(5, 25, 55, 0.12); }

.location-info h3 { font-size: 2rem; font-weight: 900; }
.country-label { font-size: 0.85rem; font-weight: 700; opacity: 0.5; text-transform: uppercase; letter-spacing: 1.5px; }

/* Weather Video Styling - Updated size and clipping fixes */
.weather-visual {
    width: 350px; /* Made bigger */
    height: 220px; /* Made bigger */
    margin: 25px auto;
    border-radius: 20px; /* Enhanced rounding */
    overflow: hidden; /* Ensures video respects border radius */
    background: rgba(0,0,0,0.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    position: relative; /* Context for children */
}

.weather-visual video {
    width: 100%;
    height: 100%;
    transform: scale(1.1);
    object-fit: cover;
    display: block; /* Removes bottom whitespace/gap */
}

.weather-brief { margin: 15px 0; display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 600; }
#vancouver-temp, #goris-temp { font-size: 1.8rem; color: var(--terracotta); }
#vancouver-desc, #goris-desc { text-transform: capitalize; opacity: 0.8; font-size: 1rem; }

.big-time { font-family: 'JetBrains Mono', monospace; font-size: 3.8rem; font-weight: 700; margin: 15px 0; color: var(--deep-navy); }
.big-date { font-size: 1.2rem; font-weight: 600; opacity: 0.6; }

/* --- LOGIN DESIGN --- */
.input-group { margin-top: 20px; display: flex; flex-direction: column; gap: 30px; }
input { padding: 16px; border-radius: 12px; border: 1.5px solid #eee; text-align: center; font-size: 1rem; outline: none; transition: 0.3s; }
input:focus { border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(241, 141, 94, 0.1); }
#login-button { background: var(--deep-navy); color: var(--white); border: none; padding: 16px; border-radius: 12px; font-size: 1rem; font-weight: 900; cursor: pointer; transition: 0.4s; }
#login-button:hover { background: var(--terracotta); transform: translateY(-2px); }

.error-text { color: var(--terracotta); margin-top: 10px; font-weight: 600; font-size: 0.85rem; }

/* --- MILESTONES & POLLS DESIGN --- */
.page-header { text-align: center; margin-bottom: 50px; }
.status-pill { display: inline-block; background: var(--deep-navy); color: white; padding: 8px 24px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; margin-top: 10px; }

.calendar-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.calendar-nav-bar .month-name {
    margin-bottom: 0;
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(90deg, #3f3f3f, #090909);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- CALENDAR CELL REFINEMENT --- */
.calendar-cell.regular-day {
    background: var(--white);
    border: 1px solid var(--border-soft);
    cursor: default; /* No pointer for regular days */
    opacity: 0.8;
}

.calendar-cell.available.gift-day {
    cursor: pointer;
    background: linear-gradient(135deg, #fff, #fff5f5);
    /* Inset shadow simulates a thicker border without shifting the grid */
    box-shadow: inset 0 0 0 2px var(--terracotta) !important;
    z-index: 2;
}

/* Remove hover effects for non-gift days */
.calendar-cell.regular-day:hover {
    transform: none;
    box-shadow: none;
}

/* Maintain Q&A styling independently */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

#calendar-grid {
    margin-top: 20px;
}

.milestone-calendar-wrapper {
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 24px;
    border: 1px solid var(--border-soft);
}

.month-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--deep-navy);
    text-align: left;
    padding-left: 10px;
}

.milestone-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--terracotta);
    padding-bottom: 8px;
    text-transform: uppercase;
}

.calendar-cell {
    aspect-ratio: 1/1;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid var(--border-soft);
    position: relative;
    transition: 0.3s;
}

.calendar-cell.empty { background: transparent; border: none; }
.calendar-cell.locked { opacity: 0.4; cursor: not-allowed; }
.calendar-cell.available { cursor: pointer; border-color: var(--peach); }
.calendar-cell.available:hover { transform: translateY(-3px); box-shadow: var(--shadow-rich); }

/* --- GIFT DAY EFFECTS --- */
.gift-day {
    background: linear-gradient(135deg, #fff, #fff5f5);
    border: 2px solid var(--terracotta) !important;
}

.gift-icon {
    font-size: 1.2rem;
    margin-top: 2px;
    animation: gift-bounce 2s infinite ease-in-out;
}

.gift-day::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: var(--terracotta);
    z-index: -1;
    opacity: 0.2;
    filter: blur(6px);
}

@keyframes gift-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@media (max-width: 600px) {
    .milestone-calendar-grid { gap: 4px; }
    .calendar-cell { font-size: 0.7rem; }
}

.box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    background: var(--white);
    border: 1.5px solid #f0f0f0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    /* Removed aspect-ratio from here to allow flexibility */
}

/* Specific Poll Card Adjustments */
.poll-card {
    min-height: 340px;
    height: auto;
    aspect-ratio: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    gap: 20px; 
    text-align: center;
}

/* Question styling with wrapping */
.poll-question {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--deep-navy);
    line-height: 1.5;
    width: 100%;
    word-wrap: break-word;
    word-break: break-word;
}

/* Scrollable Answer Container */
.user-answer-display {
    background: rgba(107, 63, 105, 0.05);
    padding: 15px;
    border-radius: 12px;
    border: 1px dashed var(--terracotta);
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.user-answer-text {
    color: var(--terracotta);
    font-size: 1rem;
    display: block;
    word-wrap: break-word;
    word-break: break-word;
    /* The Scroll Effect */
    max-height: 120px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom scrollbar for a cleaner look */
.user-answer-text::-webkit-scrollbar {
    width: 4px;
}
.user-answer-text::-webkit-scrollbar-thumb {
    background: var(--terracotta);
    border-radius: 10px;
}

.box.locked { opacity: 0.5; cursor: not-allowed; }
.box.available { border: 1.5px solid var(--peach); cursor: pointer; min-height: 340px;}
.box.available:hover { transform: translateY(-10px); border-color: var(--terracotta); box-shadow: var(--shadow-rich); }

/* FIX: Open-ended question text overflow */

.poll-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--peach);
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--deep-navy);
    transition: 0.3s;
}
.poll-btn:hover { background: var(--cream-bg); border-color: var(--terracotta); transform: scale(1.02); }

/* --- MUSIC PLAYER --- */
/* --- ENHANCED MUSIC PLAYER --- */
#music-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 2000;
    width: 320px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom: 5px solid var(--terracotta);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#music-container.folded .music-body, 
#music-container.folded .track-title,
#music-container.folded .suggest-music-btn,
#music-container.folded .volume-container {
    display: none !important; /* Forces these elements to vanish */
    opacity: 0;
    pointer-events: none;
}

#music-container.folded {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0;
    overflow: hidden; /* Prevents buttons from "peeking" out of the circle */
    display: flex;
    justify-content: center;
    align-items: center;
}

#music-container.folded .music-header {
    padding: 0;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Ensure the fold icon is centered when the player is a circle */
#music-container.folded #fold-icon {
    margin: 0;
    font-size: 1.5rem;
}

.music-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    gap: 12px;
}

#fold-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

#music-container:not(.folded) #fold-icon {
    transform: rotate(180deg);
}

.track-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--deep-navy);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

/* Control Buttons Styling */
.music-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    margin: 10px 0 20px;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 50%;
}

.control-btn svg {
    fill: var(--deep-navy);
    width: 22px;
    height: 22px;
}

.control-btn:hover {
    background: rgba(250, 104, 104, 0.1);
    transform: scale(1.1);
}

.control-btn:hover svg {
    fill: var(--terracotta);
}

/* Main Play Button Circle */
#play-btn {
    background: var(--deep-navy);
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

#play-btn svg {
    fill: white;
    width: 20px;
    height: 20px;
}

#play-btn:hover {
    background: var(--terracotta);
    box-shadow: 0 4px 15px rgba(250, 104, 104, 0.4);
}

/* Suggestion Button UI */
.suggest-music-btn {
    width: 100%;
    margin-top: 10px;
    background: transparent;
    border: 1px dashed var(--terracotta);
    color: var(--terracotta);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px;
    border-radius: 12px;
    transition: 0.3s;
}

.suggest-music-btn:hover {
    background: var(--terracotta);
    color: white;
}

/* Volume Slider Styles */
.volume-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px auto; /* Centered with more breathing room */
    width: 70%;        /* Constrains the length of the slider */
}

.volume-icon {
    width: 14px;
    height: 14px;
    fill: var(--deep-navy);
    opacity: 0.4;
    flex-shrink: 0;
}

#volume-control {
    -webkit-appearance: none;
    width: 100%;
    background: transparent; /* Removes default background */
    cursor: pointer;
}

/* The "Path" Line - Chrome/Safari/Edge */
#volume-control::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;           /* Makes the background a thin line */
    background: rgba(5, 25, 55, 0.1); 
    border-radius: 2px;
}

/* The Draggable Knob - Chrome/Safari/Edge */
#volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--terracotta);
    cursor: pointer;
    margin-top: -5px;      /* Centers the knob on the 2px line */
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    border: 2px solid white;
    transition: transform 0.2s ease;
}

/* Hover effect for the knob */
#volume-control:hover::-webkit-slider-thumb {
    transform: scale(1.2);
    background: var(--deep-navy);
}

/* --- CENTERED SUGGEST MUSIC BUTTON --- */
.suggest-music-btn {
    width: auto;           /* Removes the 100% width */
    min-width: 150px;      /* Keeps it substantial but not full-width */
    margin: 10px auto 10px; /* Centers the button horizontally */
    display: block;        /* Necessary for the margin:auto to work */
    padding: 10px 20px;
    font-size: 0.7rem;
    background: #c3d3e9;
    border: 1px solid var(--border-soft);
    border-radius: 50px;   
    color: var(--deep-navy);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.suggest-music-btn:hover {
    background: var(--deep-navy);
    color: white;
    border-color: var(--deep-navy);
    transform: translateY(-2px);
}
/* --- UTILS --- */
.lock-icon { width: 38px; height: 38px; margin-bottom: 12px; fill: #bdc3c7; }
.available .lock-icon { fill: var(--terracotta); }
.date-label { font-size: 0.75rem; font-weight: 700; opacity: 0.7; }

/* --- WEATHER OVERLAYS --- */
.rain-drop { position: absolute; background: rgba(174, 194, 224, 0.6); width: 2px; height: 15px; pointer-events: none; }
.snowflake { position: absolute; color: white; font-size: 1rem; pointer-events: none; }
@keyframes fall { to { transform: translateY(100vh); } }

.modal-overlay { position: fixed; inset: 0; background: rgba(5, 25, 55, 0.6); display: flex; justify-content: center; align-items: center; z-index: 3000; padding: 20px; backdrop-filter: blur(4px); }
.modal-panel { max-width: 500px; width: 100%; padding: 50px; text-align: center; position: relative; border-bottom: 5px solid var(--dusty-purple); }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.8rem; cursor: pointer; color: var(--deep-navy); transition: 0.2s; }
.close-btn:hover { color: var(--terracotta); }

@media (max-width: 600px) {
    #nav-bar { width: 90%; justify-content: center; }
    .clock-grid { grid-template-columns: 1fr; }
    .big-time { font-size: 2.8rem; }
    .weather-visual { width: 120px; height: 120px; }
}

.separable-header {
    display: flex;
    align-items: center;
    text-align: center;
    gap: 20px; /* Space between the lines and the name */
}

.separable-header::before,
.separable-header::after {
    content: "";
    flex: 1;
    height: 1px;
    /* Uses a fade-out gradient to look more premium */
    background: linear-gradient(to right, transparent, var(--terracotta), transparent);
    opacity: 0.4;
}

textarea:focus {
    outline: none;
    border-color: var(--terracotta);
    box-shadow: 0 0 0 4px rgba(241, 141, 94, 0.1);
}

.thought-card {
    height: 320px; /* Rigid constant height */
    display: flex;
    flex-direction: column;
    padding: 24px !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    overflow: hidden;
}

.thought-header {
    height: 55px; /* Strict height for the header area */
    display: flex;
    flex-direction: column; /* Stacks name and date */
    justify-content: center;
    border-bottom: 1px solid var(--border-soft); /* The horizontal line */
    margin-bottom: 15px;
    flex-shrink: 0; /* Prevents the header from squeezing */
}

.thought-author {
    font-size: 0.75rem;
    color: var(--terracotta);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.thought-date {
    font-size: 0.65rem;
    opacity: 0.5;
    margin-top: 4px;
}

.thought-body {
    flex: 1; /* Takes up remaining space */
    overflow: hidden; /* Clips long text by default */
    position: relative;
    text-align: left;
}

.thought-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--deep-navy);
    font-style: italic;
    margin: 0;
}

/* Scrollable state for the body */
.thought-body.expanded {
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar for a clean look */
.thought-body.expanded::-webkit-scrollbar {
    width: 4px;
}
.thought-body.expanded::-webkit-scrollbar-thumb {
    background: var(--terracotta);
    border-radius: 10px;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--terracotta);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    padding-top: 12px;
    text-align: left;
    flex-shrink: 0; /* Keeps button at the bottom */
}

.delete-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 1.4rem;
    color: #e74c3c;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    opacity: 0.4;
    transition: opacity 0.3s, transform 0.2s;
    padding: 5px;
}

.delete-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Ensure parents have relative positioning */
.poll-card, .thought-card {
    position: relative;
}

.confirm-modal-content {
    padding: 20px;
    text-align: center;
}

.confirm-modal-title {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 15px;
    color: var(--deep-navy);
}

.confirm-modal-text {
    font-size: 0.95rem;
    color: var(--deep-navy);
    opacity: 0.8;
    margin-bottom: 30px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-btn {
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    font-size: 0.9rem;
    flex: 1;
}

.confirm-btn-yes {
    background: #e74c3c;
    color: white;
}

.confirm-btn-yes:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.confirm-btn-no {
    background: var(--border-soft);
    color: var(--deep-navy);
}

.confirm-btn-no:hover {
    background: #ddd;
}

.section-title span {
    color: black;
    -webkit-text-fill-color: text;
}

/* Unique color for Ani's section header */
.ani-header-gradient {
    background: linear-gradient(90deg, #6e4f6e, #492a48); /* Soft Purple to Terracotta */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

/* Ensure the lines on the side of Ani's header also match the new color */
.ani-header-gradient.separable-header::before,
.ani-header-gradient.separable-header::after {
    background: linear-gradient(to right, transparent, #8D5F8C, transparent);
    opacity: 0.5;
}

.welcome-quote {
    margin: 0.7rem 0 0.9rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--deep-navy);
    font-style: italic;
    min-height: 4.5em; 
    opacity: 0.8;
    text-align: center;
    /* ADD THIS LINE BELOW */
    white-space: pre-wrap; 
}

.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(4px);
    animation: charFadeIn 0.1s ease forwards;
}

@keyframes charFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.thoughts-intro-note {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px auto; /* Centers the note and adds space before the cards */
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.6;
    color: var(--deep-navy);
    opacity: 0.8;
    position: relative;
}

/* Optional: Adds a very subtle decorative line under the note */
.thoughts-intro-note::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: var(--terracotta);
    margin: 15px auto 0;
    opacity: 0.3;
}



.thought-body {
    flex: 1;
    overflow: hidden; /* Hide overflow for short texts */
    position: relative;
    text-align: left;
}

.thought-body.expanded {
    overflow-y: auto; /* Enable scrolling only when "Կարդալ" is clicked */
}

.thought-card {
    position: relative;
    overflow: hidden; /* Necessary to hide the tray when closed */
}

.thought-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
}

.reply-count-btn {
    background: rgba(107, 63, 105, 0.1);
    border: none;
    padding: 5px 12px;
    border-radius: 20px;
    color: var(--terracotta);
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}

.reply-count-btn:hover {
    background: var(--terracotta);
    color: white;
}

/* The Sliding Tray */
.reply-tray {
    position: absolute;
    bottom: -100%; /* Hidden by default */
    left: 0;
    width: 100%;
    height: 85%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-soft);
    z-index: 20;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.reply-tray.active {
    bottom: 0;
}

.tray-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.tray-title {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--deep-navy);
}

.reply-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

.chat-bubble {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    border-left: 3px solid var(--terracotta);
}

.chat-name {
    font-size: 0.65rem;
    font-weight: 900;
    color: var(--terracotta);
    display: block;
    margin-bottom: 2px;
}

.chat-msg {
    font-size: 0.8rem;
    color: var(--deep-navy);
}

.reply-input-bar {
    display: flex;
    gap: 8px;
}

.reply-input-bar input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 0.8rem;
    text-align: left;
}

.send-icon-btn {
    background: var(--deep-navy);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 900;
}

.calendar-cell.today-highlight {
    background: rgba(255, 187, 92, 0.1); /* Soft dusty purple tint */
    border: 2px solid rgb(255, 144, 54) !important;
    color: rgb(66, 55, 46);
    box-shadow: 0 0 15px rgba(107, 63, 105, 0.2);
}

/* Optional: Add a "Today" label via CSS */
.calendar-cell.today-highlight::before {
    content: "";
    position: absolute;
    top: 10px;
    font-size: 0.5rem;
    letter-spacing: 0.5px;
    font-weight: 900;
}

.calendar-cell.meeting-day-highlight {
    background: rgba(107, 63, 105, 0.1) !important; /* Soft terracotta tint */
    border: 2px solid var(--terracotta) !important;
    color: var(--deep-navy);
    box-shadow: 0 0 15px rgba(107, 63, 105, 0.2);
}

/* Armenian Label for the Meeting Day */
.calendar-cell.meeting-day-highlight::before {
    content: ""; /* "Our Day" in Armenian */
    position: absolute;
    top: 10px;
    font-size: 0.5rem;
    letter-spacing: 0.5px;
    font-weight: 900;
    color: var(--terracotta);
}

/* Remove the old ::after content if it's still there */
.calendar-cell.meeting-day-highlight::after {
    display: none;
}

@media (max-width: 1024px) {
    .view-container {
        padding-top: 100px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .clock-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .big-time {
        font-size: 3rem;
    }

    #live-distance {
        font-size: 2.2rem;
    }
}

/* Phones (up to 768px) */
@media (max-width: 768px) {
    #nav-bar {
        width: 95%;
        gap: 1px;
        padding: 5px;
        white-space: nowrap;
    }

    .nav-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    /* Stack Clocks vertically */
    .clock-grid {
        grid-template-columns: 1fr;
    }

    .big-time {
        font-size: 2.8rem;
    }

    /* Calendar & Polls Grid */
    .calendar-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .milestone-calendar-grid {
        gap: 4px;
    }

    .calendar-cell {
        font-size: 0.8rem;
    }

    /* Thought & Poll Cards */
    .poll-card, .thought-card {
        min-height: 300px;
        padding: 20px !important;
    }

    .thought-text {
        font-size: 0.85rem;
    }

    /* Distance Header */
    #live-distance {
        font-size: 1.8rem;
    }

    .distance-line {
        width: 150px;
    }

    /* Music Player Adjustments */
    #music-container:not(.folded) {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 20px;
    }

    /* Login Screen */
    .login-card {
        padding: 1.5rem 1.5rem;
        border-radius: 20px;
        width: 70%;
    }

    .login-card h1 {
        font-size: 1.8rem;
    }

    .welcome-quote {
        font-size: 0.75rem;
    }

    .input-group {
        gap: 20px;
    }

    .clock-grid {
        display: flex; /* Switch from grid to flex for easier centering */
        flex-direction: column;
        align-items: center; /* Centers the cards horizontally */
        gap: 25px;
    }

    .clock-card {
        width: 80%; /* Allows it to be responsive */
        max-width: 320px; /* Forces a smaller, consistent width on phones */
        margin: 0 auto; /* Redundant with align-items but safe for centering */
        padding: 30px 15px; /* Slightly tighter padding for smaller width */
        border-radius: 24px;
    }

    /* Scale down the video visual to fit the new card width */
    .weather-visual {
        width: 80%;
        max-width: 300px;
        height: 140px;
    }

    /* Ensure the big time doesn't break the smaller card container */
    .big-time {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .location-info h3 {
        font-size: 1.6rem;
    }

    .weather-brief {
        margin: 5px;
    }

    #vancouver-temp, #goris-temp {
        font-size: 1.3rem;
    }

    .big-date {
        font-size: 1rem;
    }
    .milestone-calendar-wrapper {
        padding: 10px;
    }
    .milestone-calendar-grid {
        gap: 4px;
    }
    .calendar-cell {
        font-size: 0.75rem;
    }
    .gift-icon {
        font-size: 0.9rem;
    }

    .milestone-calendar-wrapper {
        width: 100%;
        margin-bottom: 50px;
        background: rgba(255, 255, 255, 0.5);
        padding: 20px;
        border-radius: 24px;
        border: 1px solid var(--border-soft);
        box-sizing: border-box;
        overflow: hidden; 
    }

    .month-name {
        font-family: 'Poppins', sans-serif;
        font-size: 1.4rem;
        margin-bottom: 15px;
        color: var(--deep-navy);
        text-align: left;
        padding-left: 10px;
    }

    .milestone-calendar-grid {
        display: grid;
        /* minmax(0, 1fr) prevents columns from expanding past their container */
        grid-template-columns: repeat(7, minmax(0, 1fr)); 
        gap: 8px;
        width: 100%;
    }

    .calendar-day-header {
        text-align: center;
        font-size: 0.7rem;
        font-weight: 800;
        color: var(--terracotta);
        padding-bottom: 8px;
        text-transform: uppercase;
    }

    .calendar-cell {
        aspect-ratio: 1/1;
        background: var(--white);
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 0.9rem;
        position: relative;
        transition: transform 0.3s, box-shadow 0.3s;
        /* This ensures padding/borders don't increase the cell size */
        box-sizing: border-box; 
        /* Use shadow as a border so it doesn't take up physical space */
        box-shadow: inset 0 0 0 1px var(--border-soft); 
    }

    #polls-view .calendar-grid {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centers the cards horizontally */
        gap: 25px;
    }

    /* Style the Poll Cards and the "+" Card in the Polls view */
    #polls-view .poll-card, 
    #polls-view .box.available {
        width: 75%; /* Set to roughly 70-75% of the screen width */
        max-width: 240px; /* Prevents them from getting too large */
        min-height: 280px; /* Slightly shorter for mobile efficiency */
        margin: 0 auto;
        padding: 20px !important;
    }

    .box.available {
        min-height: 280px;
        width: 70%;
        margin: 0 auto;
    }

    /* Adjust the font size of the questions for the smaller cards */
    .poll-question {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    /* Ensure buttons within the cards fit nicely */
    .poll-btn {
        padding: 10px;
        font-size: 0.8rem;
    }

    #milestones-view #milestone-header-container .distance-header .distance-label{
        font-size: 1.4rem !important;
    }

    #milestone-header-container h2 {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
    }

}

/* Small Phones (up to 480px) */
@media (max-width: 480px) {
    .calendar-grid {
        grid-template-columns: 1fr; 
    }

    .big-time {
        font-size: 2.2rem;
    }

    .nav-btn {
        padding: 8px 10px;
        font-size: 0.67rem;
    }

    .modal-panel {
        padding: 30px 20px;
    }

    #polls-view .poll-card,
    #polls-view .box.available {
        width: 85%; /* Slightly wider on very small screens to maintain readability */
    }
}