/* style.css for Midnight Confession */
:root {
    --navy: #0F172A; /* Deep navy */
    --navy-dark: #020617; /* Almost black */
    --purple-dark: #1E1B4B; 
    --silver: #CBD5E1;
    --silver-glow: #F1F5F9;
    --white: #FFFFFF;
    --accent: #818CF8;
    --font-heading: 'Crimson Pro', serif;
    --font-body: 'Inter', sans-serif;
}

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

body, html {
    font-family: var(--font-body);
    line-height: 1.7;
    background-color: var(--navy-dark);
    color: var(--silver);
    font-size: 16px;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Base Night Layer & Overlay */
.parallax-bg {
    position: fixed;
    top: -5vh; left: 0;
    width: 100vw; height: 115vh; /* slightly larger for parallax calculation */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -4;
    will-change: transform;
}

.night-sky {
    background-image: url('https://images.unsplash.com/photo-1475274047050-1d0c0975c63e?auto=format&fit=crop&w=1920&q=80');
    opacity: 0.6;
}

/* Subtle moon overlay */
.moon-layer {
    background-image: url('https://images.unsplash.com/photo-1505322022379-7c3353ee6291?auto=format&fit=crop&w=1000&q=80');
    background-size: 50% auto;
    background-position: right 10% top 15%;
    opacity: 0.45;
    mix-blend-mode: screen;
    z-index: -3;
}

.city-blur {
    background-image: url('https://images.unsplash.com/photo-1518118014377-ce99aab31166?auto=format&fit=crop&w=1920&q=80');
    background-position: center bottom;
    opacity: 0.25;
    z-index: -2;
    mix-blend-mode: color-dodge;
}

.bg-overlay {
    position: fixed; top:0; left:0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(2, 6, 23, 0.4), rgba(30, 27, 75, 0.7), rgba(2, 6, 23, 0.95));
    z-index: -1;
}

/* Twinkling Stars generated by JS */
#stars-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle infinite ease-in-out;
}

@keyframes twinkle {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.8; transform: scale(1.2); box-shadow: 0 0 8px rgba(255,255,255,0.8); }
    100% { opacity: 0; transform: scale(0.5); }
}

/* Typography & General Classes */
h1, h2, h3 { font-family: var(--font-heading); color: var(--white); font-weight: 400; }
.text-center { text-align: center; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 5%; position: relative; z-index: 5; }
.container-sm { max-width: 700px; }
.section { padding: 120px 0; }
.section-title { font-size: 2.8rem; margin-bottom: 2.5rem; letter-spacing: 1px; }

.mb-2 { margin-bottom: 1rem; }

.silver-gradient {
    background: linear-gradient(120deg, var(--white), var(--silver), #94A3B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.glowing-text {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2), 0 0 35px rgba(129, 140, 248, 0.5);
}

/* Buttons */
.btn-primary {
    display: inline-flex; justify-content: center; align-items: center;
    padding: 16px 40px; border-radius: 40px; border: none;
    background: linear-gradient(135deg, rgba(30,27,75,0.8), rgba(15,23,42,0.9));
    color: var(--white); font-size: 1.15rem; font-family: var(--font-body);
    font-weight: 300; cursor: pointer; transition: all 0.4s ease;
    border: 1px solid rgba(129, 140, 248, 0.3);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.btn-primary:hover {
    background: linear-gradient(135deg, rgba(46,41,118,0.9), rgba(15,23,42,1));
    box-shadow: 0 0 25px rgba(129, 140, 248, 0.7);
    transform: translateY(-3px);
}
.glow-button {
    animation: buttonGlow 3s infinite alternate;
}

@keyframes buttonGlow {
    0% { box-shadow: 0 0 5px rgba(129, 140, 248, 0.2); }
    100% { box-shadow: 0 0 20px rgba(129, 140, 248, 0.6); }
}

/* Play Music Btn */
.music-btn {
    position: fixed; bottom: 30px; right: 30px; width: 55px; height: 55px;
    border-radius: 50%; background: rgba(15,23,42,0.7); color: var(--silver);
    border: 1px solid rgba(255,255,255,0.15); backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 100; transition: all 0.3s; font-size: 1.2rem;
}
.music-btn:hover { background: rgba(30,27,75,0.8); }
.pulse-glow { animation: pulse 2.5s infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.5); }
    70% { box-shadow: 0 0 0 20px rgba(129, 140, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(129, 140, 248, 0); }
}

/* Hero Section */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding-top: 50px; position: relative;
}
.hero-title { font-size: 5rem; margin-bottom: 3.5rem; font-style: italic; }
.hero-poem {
    max-width: 700px; margin: 0 auto; font-size: 1.35rem; 
    line-height: 1.9; font-weight: 300;
}
.hero-poem p { margin-bottom: 8px; }

.scroll-indicator {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    font-size: 1.8rem; color: var(--silver); animation: bounce 2s infinite;
}
.scroll-indicator a { color: inherit; text-decoration: none; }
.glow-icon { text-shadow: 0 0 15px rgba(255,255,255,0.7); opacity: 0.8; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-15px); } 60% { transform: translateY(-7px); } }

/* Dreamy Fade Effect Content */
.glass-box {
    background: rgba(15, 23, 42, 0.45); border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    padding: 50px; border-radius: 20px; box-shadow: 0 25px 50px rgba(0,0,0,0.6);
    font-size: 1.15rem; font-weight: 300; line-height: 1.9; color: var(--silver-glow);
}
.glass-box p { margin-bottom: 1.5rem; }
.glass-box p:last-child { margin-bottom: 0; }
.glass-box h3 { font-size: 2rem; }

/* Timeline for Penjelasan */
.timeline-box { margin-top: 2rem; border-left: 2px solid rgba(129, 140, 248, 0.35); padding-left: 35px; margin-left: 20px; }
.timeline-item {
    position: relative; margin-bottom: 45px; font-size: 1.15rem; font-weight: 300; color: var(--silver-glow); line-height: 1.8;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
    content: ''; position: absolute; left: -42px; top: 10px; width: 12px; height: 12px;
    background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent);
}

/* Regret Grid */
.regret-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px; padding-top: 20px;
}
.regret-card {
    background: rgba(30, 27, 75, 0.35); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.06); border-radius: 20px;
    overflow: hidden; text-align: left; transition: transform 0.4s ease;
}
.regret-card:hover { transform: translateY(-8px); }
.img-wrapper { height: 240px; overflow: hidden; position: relative; }
.img-wrapper img { width: 100%; height: 100%; object-fit: cover; opacity: 0.65; transition: opacity 0.5s, transform 0.8s; }
.regret-card:hover .img-wrapper img { opacity: 1; transform: scale(1.08); }
.regret-text { padding: 35px 30px; font-size: 1.1rem; font-weight: 300; line-height: 1.7; color: var(--silver-glow); }

.mb-5 { margin-bottom: 3rem; font-size: 1.2rem; font-weight: 300; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.9;}
.footer-space { height: 12vh; }

/* Modal Response */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(2,6,23,0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);}
.modal-content { margin: 15vh auto; width: 90%; max-width: 500px; text-align: center; position: relative; animation: modalDrop 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28); }
.close-modal { position: absolute; top: 15px; right: 25px; color: var(--silver); font-size: 30px; cursor: pointer; transition: color 0.3s; }
.close-modal:hover { color: var(--white); }

@keyframes modalDrop { from { transform: translateY(-60px) scale(0.9); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* Media Queries */
@media (max-width: 768px) {
    .container { padding: 0 8%; }
    .hero-title { font-size: 3.5rem; margin-bottom: 2.5rem; }
    .hero-poem { font-size: 1.15rem; line-height: 1.7; }
    .section { padding: 80px 0; }
    .section-title { font-size: 2.2rem; }
    .glass-box { padding: 35px 25px; }
    .timeline-box { margin-left: 10px; }
    .music-btn { bottom: 20px; right: 20px; width: 45px; height: 45px; }
}
