/* ==========================================================================
   1. GLOBAL RESET & NAVIGATION SYSTEM
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #fff9f9;
    color: #333;
    min-height: 100vh;
}

/* Navigation Bar System across Main Content Pages */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 20px 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ff6b81;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: #ff6b81;
}

/* Universal Action Button Style */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ff6b81;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 15px rgba(255, 107, 129, 0.3);
}

.btn:hover {
    background-color: #ee5253;
    transform: translateY(-2px);
}

.footer-action {
    text-align: center;
    margin: 50px 0 80px 0;
}


/* ==========================================================================
   2. LOCK SCREEN LAYOUT & INTERACTIVE ELEMENTS (index.html)
   ========================================================================== */
/* Triggers layout for lock screen exclusively */
body:has(.lock-box) {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fe9a8b 100%);
    overflow: hidden;
    position: relative;
}

/* Floating Ambient Background Hearts */
.hearts-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.heart {
    position: absolute;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
    animation: floatUp 6s linear infinite;
    bottom: -50px;
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* Glassmorphism Input Frame */
.lock-box {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px 30px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-align: center;
    width: 360px;
    z-index: 10;
    animation: fadeIn 1s ease-out;
}

.avatar {
    font-size: 3.5rem;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

h2 {
    color: #4a2c40;
    font-size: 1.6rem;
    margin-bottom: 8px;
}

p {
    color: #6d5b68;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

/* Passcode Display Indicators */
.dots-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.dot {
    width: 16px;
    height: 16px;
    border: 2px solid #d63031;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.dot.active {
    background-color: #d63031;
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(214, 48, 49, 0.5);
}

/* Input Failure Warning Text */
.error-text {
    color: #d63031;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    visibility: hidden;
}

.shake {
    animation: shakeEffect 0.4s ease-in-out;
}

/* Custom Keypad Grid layout */
.dial-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.dial-btn {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    outline: none;
    height: 65px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 600;
    color: #4a2c40;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.dial-btn:active {
    background: #ff6b81;
    color: white;
    transform: scale(0.92);
}

.dial-btn.clear, .dial-btn.delete {
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}


/* ==========================================================================
   3. PREMIUM SUCCESS ANIMATIONS & OVERLAYS
   ========================================================================== */
.popper-overlay, .rain-overlay {
    position: absolute;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

/* Exploding Confetti Particles */
.burst-particle {
    position: absolute;
    font-size: 28px;
    animation: explodeOut 1.5s cubic-bezier(0.1, 1, 0.1, 1) forwards;
}

@keyframes explodeOut {
    0% { transform: translate(0, 0) scale(0.3); opacity: 1; }
    100% { transform: translate(var(--x), var(--y)) scale(1.3) rotate(360deg); opacity: 0; }
}

/* Ascending Balloons System */
.floating-balloon {
    position: absolute;
    bottom: -60px;
    animation: floatUpwards linear forwards;
}

@keyframes floatUpwards {
    0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-115vh) translateX(50px) rotate(25deg); opacity: 0; }
}

/* Top Down Sparkle Rain Sky */
.rain-drop {
    position: absolute;
    top: -40px;
    opacity: 0.9;
    animation: rainFall linear forwards;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

@keyframes rainFall {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(105vh) rotate(180deg); }
}

/* Beautiful Handwriting Font Center Typography */
.wish-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-family: 'Dancing Script', cursive;
    font-size: 3.2rem;
    color: #ffffff;
    text-align: center;
    width: 90%;
    max-width: 600px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 0 15px rgba(255, 107, 129, 0.8), 0 0 30px rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.wish-overlay.show {
    animation: revealWish 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes revealWish {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}


/* ==========================================================================
   4. TIMELINE COMPONENT LAYOUT (story.html)
   ========================================================================== */
.story-header {
    text-align: center;
    padding: 60px 20px 20px 20px;
    background: linear-gradient(to bottom, #fff0f0, #fff9f9);
}

.story-header h1 {
    font-size: 2.5rem;
    color: #4a2c40;
    margin-bottom: 10px;
}

.story-header p {
    color: #7d6b77;
    font-style: italic;
}

.timeline-container {
    max-width: 800px;
    margin: 40px auto;
    position: relative;
    padding: 20px;
}

/* Center vertical axis rule */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #ff9a9e, #fe9a8b);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; text-align: left; }

/* Timeline Node Icons */
.timeline-item::after {
    content: '❤️';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -13px;
    top: 25px;
    background: #fff9f9;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.timeline-item.right::after { left: -11px; }

/* Cards inside Timeline block */
.timeline-content {
    background: #ffffff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 154, 158, 0.2);
    display: inline-block;
    max-width: 100%;
}

.date {
    font-size: 0.85rem;
    font-weight: bold;
    color: #ff6b81;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.timeline-content h3 {
    color: #4a2c40;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.timeline-content p {
    color: #666;
    line-height: 1.5;
    font-size: 0.95rem;
}


/* ==========================================================================
   5. MEMORIES GALLERY GRID SECTION (gallery.html)
   ========================================================================== */
.page-header {
    text-align: center;
    padding: 60px 20px 30px 20px;
    background: linear-gradient(to bottom, #fff0f0, #fff9f9);
}

.page-header h1 {
    font-size: 2.5rem;
    color: #4a2c40;
    margin-bottom: 10px;
}

.page-header p {
    color: #7d6b77;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.gallery-container {
    max-width: 1000px;
    margin: 30px auto 50px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Memory Cards Configuration */
.photo-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 154, 158, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 129, 0.15);
}

.image-wrapper {
    width: 100%;
    height: 250px;
    background-color: #f5f5f5;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-card:hover .image-wrapper img {
    transform: scale(1.05);
}

.photo-caption {
    padding: 20px;
}

.photo-caption h4 {
    color: #4a2c40;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.photo-caption p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================================================
   6. MUSIC MIXTAPE COMPONENT STYLES (music.html)
   ========================================================================== */
.music-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}

/* Music Player Frame styling */
.player-card {
    background: #ffffff;
    border-radius: 30px;
    padding: 35px;
    width: 380px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 154, 158, 0.2);
    text-align: center;
    position: relative;
}

/* Vinyl Graphic Layout definitions */
.vinyl-area {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 25px auto;
}

.vinyl-disc {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #2c2c2c 30%, #111111 60%, #050505 100%);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.vinyl-center {
    width: 60px;
    height: 60px;
    background-color: #ff6b81;
    border-radius: 50%;
    border: 4px solid #fff;
}

/* Vinyl Rotate Keyframe triggers */
.vinyl-disc.spinning {
    animation: spinTrack 4s linear infinite;
}

@keyframes spinTrack {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-icon-floating {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #ff6b81;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(255, 107, 129, 0.4);
}

.song-details h3 {
    color: #4a2c40;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.song-details p {
    color: #8e7d89;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Track Progress UI indicators */
.progress-container {
    background: #fff0f2;
    border-radius: 10px;
    height: 6px;
    width: 100%;
    margin-bottom: 25px;
    cursor: pointer;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(to right, #ff9a9e, #ff6b81);
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
}

/* Control Buttons definitions */
.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

.control-btn {
    background: none;
    border: none;
    color: #7d6b77;
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.control-btn:hover {
    color: #ff6b81;
    transform: scale(1.08);
}

.control-btn.play-main {
    background: linear-gradient(135deg, #ff9a9e 0%, #ff6b81 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(255, 107, 129, 0.4);
}

.control-btn.play-main:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 107, 129, 0.5);
}

/* Tracklist Grid System side-box formatting */
.tracklist-box {
    background: #ffffff;
    border-radius: 30px;
    padding: 30px;
    flex: 1;
    min-width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 154, 158, 0.2);
}

.tracklist-box h3 {
    color: #4a2c40;
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid #fff0f2;
    padding-bottom: 10px;
}

.track-menu {
    list-style: none;
}

.track-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: 15px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.track-item:hover {
    background-color: #fff5f6;
}

.track-item.active {
    background-color: #fff0f2;
    border-left: 4px solid #ff6b81;
}

.track-number {
    font-weight: bold;
    color: #ff6b81;
    margin-right: 20px;
    font-size: 0.95rem;
}

.track-info {
    flex: 1;
}

.track-info strong {
    color: #4a2c40;
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.track-info p {
    color: #8e7d89;
    font-size: 0.85rem;
    margin: 0;
}

.track-duration {
    color: #7d6b77;
    font-size: 0.85rem;
}



/* ==========================================================================
   7. STRUCTURAL COMPONENT ANIMATIONS & RESPONSIVE DESIGN
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes shakeEffect {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

/* Responsive Adaptive Rules for Mobile Screen Formats */
@media (max-width: 768px) {
    .navbar {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }
    .nav-links li {
        margin: 0 10px;
    }
    .timeline-line {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 45px;
        padding-right: 20px;
        text-align: left !important;
    }
    .timeline-item.right { left: 0; }
    .timeline-item::after { left: 9px !important; }
}

@media (max-width: 480px) {
    .wish-overlay { font-size: 2.3rem; }
}
