/* --- TEMEL AYARLAR --- */
:root {
  /* Renk Paletleri */
  --text-main-light: #5c2a3b;
  --text-sec-light: #8e5564;
  --text-main-dark: #e2e8f0;
  --text-sec-dark: #94a3b8;
  
  --accent-light: #ff5c8d;
  --accent-dark: #f472b6;

  /* Glassmorphism Değişkenleri */
  --glass-bg-light: rgba(255, 255, 255, 0.65);
  --glass-border-light: rgba(255, 255, 255, 0.8);
  
  --glass-bg-dark: rgba(15, 23, 42, 0.6);
  --glass-border-dark: rgba(255, 255, 255, 0.08);

  --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
  --blur-amt: blur(16px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: 'Outfit', 'Poppins', sans-serif;
  overflow-x: hidden;
  font-size: 16px;
}

/* --- YENİ ARKA PLAN SİSTEMİ --- */
.bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  pointer-events: none;
}

.bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 1.5s ease-in-out;
}

.bg-light {
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  background: linear-gradient(to top, #fad0c4 0%, #ffd1ff 100%);
  opacity: 0; 
}

.bg-dark {
  background: linear-gradient(to bottom, #0f2027, #203a43, #2c5364);
  opacity: 0;
}

body.light .bg-wrapper .bg-light { opacity: 1; }
body.light .bg-wrapper .bg-dark { opacity: 0; }
body.dark .bg-wrapper .bg-dark { opacity: 1; }
body.dark .bg-wrapper .bg-light { opacity: 0; }

body {
  background-color: transparent;
  color: var(--text-main-light);
  padding-bottom: 100px;
  transition: color 0.8s ease;
}

body.dark {
  color: var(--text-main-dark);
}

/* --- EFEKTLER --- */
#stars-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease;
}

body.dark #stars-canvas { opacity: 1; }

.cloud-layer {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  opacity: 0.4;
  z-index: -4;
  pointer-events: none;
  transition: opacity 1.5s ease;
  mix-blend-mode: overlay;
}

body.dark .cloud-layer { opacity: 0.05; }

/* --- HEADER --- */
header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  position: relative;
  z-index: 10;
}

header h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 3rem;
  background: linear-gradient(to right, #ff758c, #ff7eb3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 4px 10px rgba(255, 126, 179, 0.3));
}

body.dark header h1 {
  background: linear-gradient(to right, #a1c4fd, #c2e9fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(161, 196, 253, 0.3));
}

header .quote {
  font-size: 1.1rem;
  color: var(--text-sec-light);
  font-style: italic;
  font-weight: 300;
  max-width: 80%;
  margin: 0 auto;
  transition: color 0.8s ease;
}

body.dark header .quote { color: var(--text-sec-dark); }

.theme-toggle {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: var(--blur-amt);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: inherit;
}

.theme-toggle:active { transform: scale(0.9) rotate(20deg); }

/* --- KARTLAR --- */
.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 5;
}

.card, .special-day-card, .memory-card, #birthday, .music-card {
  border-radius: 24px;
  padding: 1.5rem;
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
  background: var(--glass-bg-light);
  border: 1px solid var(--glass-border-light);
  box-shadow: 0 8px 32px 0 rgba(179, 136, 155, 0.1);
  backdrop-filter: var(--blur-amt);
  -webkit-backdrop-filter: var(--blur-amt);
}

body.dark .card, 
body.dark .special-day-card, 
body.dark .memory-card, 
body.dark #birthday,
body.dark .music-card {
  background: var(--glass-bg-dark);
  border: 1px solid var(--glass-border-dark);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  color: var(--text-main-dark);
}

.special-day-card:hover, .memory-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* --- YENİ: MÜZİK ÇALAR STİLLERİ --- */
.music-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
}

.album-cover {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  position: relative;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-info {
  flex-grow: 1;
}

.now-playing {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  display: block;
  margin-bottom: 2px;
}

.song-info h3 {
  font-size: 1rem;
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

.song-info p {
  text-align: left;
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.8;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(0,0,0,0.1);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.progress {
  width: 30%; /* Varsayılan */
  height: 100%;
  background: var(--accent-light);
  border-radius: 2px;
  transition: width 0.2s linear;
}

body.dark .progress { background: var(--accent-dark); }
body.dark .progress-bar { background: rgba(255,255,255,0.1); }

.play-btn {
  background: var(--accent-light);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

body.dark .play-btn { background: var(--accent-dark); }
.play-btn:active { transform: scale(0.9); }

/* --- YENİ: KALP BUTONU --- */
.heart-container {
  text-align: center;
  padding: 1rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.heart-btn {
  font-size: 4rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
  filter: drop-shadow(0 5px 15px rgba(255, 92, 141, 0.4));
}

.heart-btn:active {
  transform: scale(0.8);
}

.click-hint {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: -10px;
}

.love-counter {
  font-size: 0.9rem;
  margin-top: 5px;
  font-weight: 500;
  color: var(--accent-light);
}

body.dark .love-counter { color: var(--accent-dark); }


/* Metinler ve Diğer */
h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-align: center;
  color: inherit;
}

p, .special-day {
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
  color: var(--text-sec-light);
  transition: color 0.5s ease;
}

body.dark p, body.dark .special-day { color: var(--text-sec-dark); }

.special-day span {
  font-weight: 700;
  color: var(--accent-light);
  font-size: 1.3rem;
  margin: 0 4px;
}

body.dark .special-day span { color: var(--accent-dark); }

#birthday {
  background: linear-gradient(135deg, rgba(255, 92, 141, 0.15) 0%, rgba(255, 255, 255, 0.4) 100%);
}

body.dark #birthday {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.1) 0%, rgba(30, 41, 59, 0.4) 100%);
}

.surprise {
  background: var(--accent-light);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(255, 92, 141, 0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body.dark .surprise {
  background: var(--accent-dark);
  box-shadow: 0 4px 15px rgba(244, 114, 182, 0.3);
}

.surprise:hover { transform: scale(1.02); }

.letter {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;
  text-align: left;
}

.letter.open {
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(0,0,0,0.1);
}

body.dark .letter.open { border-top: 1px dashed rgba(255,255,255,0.2); }

.memory-image {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: block;
}

nav {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 380px;
  height: 65px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 30px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  box-shadow: 0 15px 40px -10px rgba(0,0,0,0.15);
  z-index: 1000;
  transition: background 0.5s ease, border-color 0.5s ease;
}

body.dark nav {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 40px -10px rgba(0,0,0,0.4);
}

nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.nav-icon {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

body:not(.dark) .nav-icon {
  filter: invert(44%) sepia(35%) saturate(1064%) hue-rotate(303deg) brightness(96%) contrast(96%);
}
body.dark .nav-icon {
  filter: invert(90%) sepia(10%) saturate(100%) hue-rotate(200deg) brightness(110%) contrast(100%);
}

nav a:active { transform: scale(0.9); }
#sidebar-trigger {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 3000; /* Her şeyin üstünde */
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--text-main-light);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
body.dark #sidebar-trigger {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border-color: rgba(255,255,255,0.1);
}
#sidebar-trigger:hover { transform: scale(1.1); }

/* Karartma Katmanı (Overlay) */
#sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    z-index: 2999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
#sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Yan Menü Paneli */
#app-sidebar {
    position: fixed;
    top: 0;
    left: -300px; /* Başlangıçta gizli */
    width: 280px;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 3001;
    transition: left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.5);
}
body.dark #app-sidebar {
    background: rgba(15, 23, 42, 0.95);
    border-right-color: rgba(255,255,255,0.05);
    color: white;
}

#app-sidebar.active {
    left: 0;
}

/* Menü İçeriği */
.sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
body.dark .sidebar-header { border-bottom-color: rgba(255,255,255,0.1); }

.sidebar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--accent-light), #ff9a9e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-sec-light);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-main-light);
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s;
}
body.dark .sidebar-menu li a { color: var(--text-main-dark); }

.sidebar-menu li a:hover {
    background: var(--accent-light);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(255, 92, 141, 0.3);
}
body.dark .sidebar-menu li a:hover {
    background: var(--accent-dark);
}

.sidebar-menu li a span.icon {
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-sec-light);
}
body.dark .sidebar-footer { border-top-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }