@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --primary-pink: #ffb6c1;
    --primary-white: #ffffff;
    --light-lilac: #e6d6ff;
    --soft-gold: #f8d78b;
    --text-dark: #333333;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-white);
    background-color: #000;
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, .hero-title, .letter-title, .section-title {
    font-family: 'Great Vibes', cursive;
    font-weight: normal;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    color: var(--primary-pink);
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: background 0.3s ease;
}

.music-player:hover {
    background: rgba(255, 255, 255, 0.25);
}

.music-player button {
    background: none;
    border: none;
    color: var(--primary-white);
    font-size: 1.2rem;
    cursor: pointer;
    outline: none;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-container input[type="range"] {
    width: 60px;
    accent-color: var(--primary-pink);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://up.dianabot.info/i/001/6jhn.jpeg') center/cover no-repeat;
    filter: blur(8px) brightness(0.6);
    z-index: -2;
}

#particles-js {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
}

.hero-content {
    z-index: 1;
    padding: 0 20px;
}

.hero-title {
    font-size: 4rem;
    color: var(--primary-white);
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 40px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.hero-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary-pink), var(--light-lilac));
    color: var(--primary-white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.4);
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 182, 193, 0.6);
}

/* Sections Base Backgrounds */
.counter-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a0b16, #2d1b2e);
}

.letter-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #2d1b2e, #1a0b16);
    position: relative;
}

.gallery-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a0b16, #2d1b2e);
}

.timeline-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #2d1b2e, #1a0b16);
}

/* Counter */
.counter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.time-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 20px 30px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    min-width: 120px;
}

.time-box span {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--soft-gold);
    display: block;
    line-height: 1;
}

.time-box p {
    font-size: 0.9rem;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Glass Card - Letter */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.letter-card {
    max-width: 800px;
    margin: 0 auto;
}

.letter-title {
    text-align: center;
    font-size: 3.5rem;
    color: var(--primary-pink);
    margin-bottom: 30px;
}

.letter-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #f0f0f0;
}

.letter-content .highlight {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--soft-gold);
    text-align: center;
    margin: 30px 0;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.1);
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--primary-pink);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    right: -20px;
    background: linear-gradient(45deg, var(--primary-pink), var(--light-lilac));
    border-radius: 50%;
    top: 15px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 182, 193, 0.5);
}

.timeline-item:nth-child(even) .timeline-icon {
    left: -20px;
}

.timeline-content {
    padding: 20px 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 15px;
}

.timeline-content h3 {
    color: var(--soft-gold);
    font-size: 1.5rem;
}

/* Promise & Starry Sky */
.promise-section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    background: #050510;
}

#particles-stars {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
}

.promise-card {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    border-color: rgba(248, 215, 139, 0.3);
}

.promise-card p {
    font-family: 'Great Vibes', cursive;
    font-size: 2.8rem;
    color: var(--soft-gold);
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Footer */
.footer {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(to bottom, #050510, #3a1c35, var(--primary-pink));
    text-align: center;
    overflow: hidden;
}

#particles-hearts-fall {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
}

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-content h2 {
    font-size: 4rem;
    color: var(--primary-white);
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.footer-content p {
    font-size: 1.2rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.modal-content-container {
    position: relative;
    margin: auto;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    justify-content: center;
}

#modalImg {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform:scale(0.8)} 
    to {transform:scale(1)}
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-pink);
    text-decoration: none;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    background-color: rgba(0,0,0,0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.prev {
    left: 0;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
    color: var(--primary-pink);
}

/* Login Screen */
body.login-active, html.login-active {
    overflow: hidden !important;
    height: 100vh !important;
}

.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a0b16, #2d1b2e);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
}

.login-content {
    text-align: center;
    padding: 40px;
}

.login-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    color: var(--primary-pink);
    margin-bottom: 10px;
}

.login-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--soft-gold);
    margin-bottom: 30px;
}

.login-content input {
    width: 100%;
    padding: 15px;
    border-radius: 30px;
    border: 1px solid var(--primary-pink);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    text-align: center;
    outline: none;
    margin-bottom: 10px;
}

.error-message {
    color: #ff4d4d;
    font-size: 0.9rem;
    min-height: 20px;
    margin-bottom: 20px;
}

/* Matrix Overlay */
.matrix-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  z-index: 10000;
  display: none;
  font-family: 'Press Start 2P', cursive;
}
#matrixCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}
.matrix-overlay .center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #00BFFF;
  font-size: 4.5vw;
  text-align: center;
  z-index: 10;
  user-select: none;
  text-shadow: 2px 2px #000;
  width: 100%;
}
.close-matrix {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  background: transparent;
  border: none;
  z-index: 20;
  cursor: pointer;
  transition: 0.3s;
}
.close-matrix:hover {
  color: #ff4d6d;
}
@media (max-width: 600px) {
  .matrix-overlay .center-text {
    font-size: 7vw;
  }
}

/* Responsiveness */
@media screen and (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    
    .timeline-icon, .timeline-item:nth-child(even) .timeline-icon {
        left: 11px;
    }

    .letter-card {
        padding: 30px 20px;
    }
    
    .letter-title {
        font-size: 2.5rem;
    }
    
    .promise-card p {
        font-size: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .time-box {
        min-width: 100px;
        padding: 15px 20px;
    }
    
    .time-box span {
        font-size: 2rem;
    }
}
