/* CSS Variables */
:root {
    --bg-dark: #050a11;
    --navy-deep: #0a1424;
    --navy-light: #122136;
    --warm-beige: #fef8f5;
    --muted-pink: #dfabb4;
    --soft-white: #f1f3f5;

    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;

    --transition-slow: 1.5s ease-in-out;
    --transition-norm: 0.6s ease;
}

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

body {
    background: radial-gradient(circle at 50% 40%, var(--navy-light) 0%, var(--bg-dark) 100%);
    color: var(--warm-beige);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Elements */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.6;
}

.star {
    position: absolute;
    background-color: var(--muted-pink);
    border-radius: 50%;
    animation: breathe linear infinite alternate;
    box-shadow: 0 0 10px 1px rgba(223, 171, 180, 0.4);
}

@keyframes breathe {
    0% {
        opacity: 0.1;
        transform: scale(0.6) translate(0, 0);
    }

    100% {
        opacity: 0.7;
        transform: scale(1.4) translate(5px, -5px);
    }
}

/* Typography */
.title {
    font-family: var(--font-serif);
    font-size: 4.5rem;
    font-weight: 400;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
    color: var(--muted-pink);
    font-style: italic;
    text-shadow: 0 0 30px rgba(223, 171, 180, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--soft-white);
    max-width: 90%;
    margin: 0 auto 3rem;
    line-height: 1.8;
    opacity: 0.85;
    font-family: var(--font-serif);
    font-style: italic;
}

.small-text {
    font-size: 0.75rem;
    color: rgba(254, 248, 245, 0.25);
    letter-spacing: 2px;
    line-height: 1.6;
    text-transform: uppercase;
}

.mt-4 {
    margin-top: 2rem;
}

/* Layout & Containers */
section {
    width: 100%;
    max-width: 650px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn var(--transition-slow) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(5px);
    }

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

/* Subtle Container */
.blur-bg {
    background: transparent;
    padding: 2rem;
}

/* Counter */
.counter-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0 3.5rem;
    flex-wrap: wrap;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    position: relative;
}

.number {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 400;
    line-height: 1;
    margin-bottom: 0.8rem;
    color: var(--warm-beige);
    text-shadow: 0 4px 25px rgba(223, 171, 180, 0.2);
    font-variant-numeric: tabular-nums;
}

.label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--muted-pink);
    opacity: 0.7;
    font-weight: 300;
}

/* Dynamic Message */
.dynamic-message {
    font-family: var(--font-serif);
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 4rem;
    font-size: 1.3rem;
    min-height: 2em;
    color: var(--soft-white);
    letter-spacing: 0.5px;
    line-height: 1.6;
    transition: opacity var(--transition-norm);
}

/* Actions Group */
.actions {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
    align-items: center;
}

/* Buttons */
button {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0.8rem 2.5rem;
    transition: var(--transition-norm);
    outline: none;
    text-transform: uppercase;
    border-radius: 40px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    color: var(--bg-dark);
    background: var(--muted-pink);
    font-weight: 400;
    box-shadow: 0 4px 20px rgba(223, 171, 180, 0.15);
}

.btn-primary:hover,
.btn-primary:active {
    background: #eabfd0;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(223, 171, 180, 0.3);
}

.btn-secondary {
    color: var(--muted-pink);
    border: 1px solid rgba(223, 171, 180, 0.3);
}

.btn-secondary:hover,
.btn-secondary:active,
.btn-secondary.active {
    background: rgba(223, 171, 180, 0.05);
    border-color: rgba(223, 171, 180, 0.6);
}

.btn-text {
    color: rgba(254, 248, 245, 0.6);
    padding: 0.5rem 1rem;
    text-transform: none;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.btn-text:hover {
    color: var(--muted-pink);
}

/* Memories Section */
.collapsible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 1.2s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease;
    opacity: 0;
    margin-top: 2.5rem;
    width: 100%;
    transform: translateY(-10px);
}

.collapsible.expanded {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
}

.note {
    background: linear-gradient(90deg, rgba(223, 171, 180, 0.02) 0%, rgba(223, 171, 180, 0) 100%);
    border-left: 1px solid rgba(223, 171, 180, 0.4);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-serif);
    font-style: italic;
    text-align: left;
    font-size: 1.05rem;
    color: var(--warm-beige);
    line-height: 1.6;
    opacity: 0.85;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 10, 17, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: visibility 0s 0.8s, opacity 0.8s ease;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease;
}

.overlay-content {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    animation: floatUp 1.2s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.overlay.show .overlay-content {
    opacity: 1;
    transform: translateY(0);
    transition: all 1s ease 0.2s;
}

.reflective-text {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    line-height: 1.9;
    margin-bottom: 4rem;
    color: var(--warm-beige);
    font-style: italic;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Floating phrases */
.floating-phrase {
    position: absolute;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.9 remit;
    color: rgba(254, 248, 245, 0.08);
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
    z-index: 2;
}

.phrase-1 {
    top: 15%;
    left: 8%;
    animation: float1 15s ease-in-out infinite alternate;
}

.phrase-2 {
    bottom: 18%;
    right: 8%;
    animation: float2 18s ease-in-out infinite alternate;
}

@keyframes float1 {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.05;
    }

    100% {
        transform: translateY(-30px) translateX(15px);
        opacity: 0.15;
    }
}

@keyframes float2 {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.05;
    }

    100% {
        transform: translateY(30px) translateX(-15px);
        opacity: 0.15;
    }
}

/* Media Queries */
@media (max-width: 600px) {
    .title {
        font-size: 3.5rem;
    }

    .number {
        font-size: 3rem;
    }

    .counter-container {
        gap: 1.2rem;
    }

    .time-block {
        min-width: 65px;
    }

    .actions {
        width: 100%;
        padding: 0 0.5rem;
    }

    button {
        width: 100%;
        max-width: 300px;
    }

    .reflective-text {
        font-size: 1.3rem;
    }
}

/* Accessibility: Focus Rings */
button:focus-visible {
    outline: 2px solid var(--muted-pink);
    outline-offset: 4px;
    border-radius: 40px;
}

.btn-text:focus-visible {
    border-radius: 8px;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-play-state: paused !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}