/* ================================================================= */
/* GLOBAL VARIABLES & DESIGN SYSTEM (FEMININE THEME) */
/* ================================================================= */
:root {
  --primary-font: 'Quicksand', sans-serif;
  --romantic-font: 'Dancing Script', cursive;

  /* Premium Feminen Renk Paleti (Hassas HSL Tonları) */
  --rose-deep: #ff477e;
  --rose-medium: #ff7096;
  --rose-light: #ffafcc;
  --rose-pastel: #fecfef;
  --rose-extra-light: #fff0f3;
  --rose-dark: #c9184a;

  --violet-pastel: #e8dbfc;
  --gold-glow: #ffe49e;
  --blue-pastel: #d7e3fc;

  /* Arka Plan ve Cam (Glassmorphism) Efektleri */
  --bg-romantic: linear-gradient(135deg, #ffe5ec 0%, #ffc2d1 50%, #fec89a 100%);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 12px 40px 0 rgba(255, 71, 126, 0.12);
  --neon-shadow-pink: 0 0 20px rgba(255, 112, 150, 0.5);
  
  --text-dark: #4a3b40;
  --text-muted: #847577;
}

/* Reset & Genel Ayarlar */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--primary-font);
  color: var(--text-dark);
  background: var(--bg-romantic);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* ================================================================= */
/* SÜZÜLEN KALPLER ARKA PLANI */
/* ================================================================= */
.heart-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -20px;
  color: var(--rose-medium);
  opacity: 0.6;
  animation: floatHeart 12s linear infinite;
  filter: drop-shadow(0 2px 5px rgba(255, 71, 126, 0.2));
}

@keyframes floatHeart {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg) scale(0.6);
    opacity: 0;
  }
}

/* ================================================================= */
/* SAYFA YAPISI VE GEÇİŞ EFEKTLERİ */
/* ================================================================= */
.view {
  display: none;
  width: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  padding: 20px;
}

.view.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: viewFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ================================================================= */
/* GLOBAL MÜZİK ÇALAR BUTONU */
/* ================================================================= */
.music-toggle-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  color: var(--rose-deep);
  transition: all 0.3s ease;
}

.music-toggle-btn:hover {
  transform: scale(1.1);
  background: white;
  box-shadow: var(--neon-shadow-pink);
}

.music-toggle-btn.playing {
  animation: rotateMusic 6s linear infinite;
}

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

.music-wave {
  display: none;
  position: absolute;
  bottom: 8px;
  height: 10px;
  align-items: flex-end;
  gap: 2px;
}

.music-toggle-btn.playing .music-wave {
  display: flex;
}

.music-toggle-btn.playing .music-icon {
  transform: translateY(-3px);
  opacity: 0.3;
}

.music-wave span {
  width: 2px;
  background-color: var(--rose-deep);
  border-radius: 2px;
  animation: waveActive 1.2s ease infinite alternate;
}

.music-wave span:nth-child(1) { height: 4px; animation-delay: 0.1s; }
.music-wave span:nth-child(2) { height: 10px; animation-delay: 0.3s; }
.music-wave span:nth-child(3) { height: 6px; animation-delay: 0.5s; }

@keyframes waveActive {
  0% { height: 2px; }
  100% { height: 12px; }
}

/* ================================================================= */
/* KİLİT EKRANI (PASSPHRASE CARD) */
/* ================================================================= */
.lock-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
}

.lock-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(15px);
  border-radius: 24px;
  padding: 40px 30px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.heart-crown {
  font-size: 28px;
  margin-bottom: 10px;
  animation: pulseHearts 2s infinite ease-in-out;
}

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

.logo-title {
  font-family: var(--romantic-font);
  font-size: 42px;
  color: var(--rose-deep);
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(255, 71, 126, 0.15);
}

.lock-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 30px;
}

/* Şifre Giriş Noktaları */
.passcode-dots {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
}

.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--rose-light);
  background: transparent;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dot.active {
  background: var(--rose-deep);
  border-color: var(--rose-deep);
  transform: scale(1.25);
  box-shadow: var(--neon-shadow-pink);
}

.dot.error {
  background: #ff5252;
  border-color: #ff5252;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.lock-message {
  font-size: 13px;
  font-weight: 700;
  color: var(--rose-medium);
  margin-bottom: 30px;
  min-height: 20px;
  transition: color 0.3s;
}

.lock-message.error-text {
  color: #d63031;
}

/* Numerik Klavye */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  justify-items: center;
}

.key-btn {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.6);
  font-family: var(--primary-font);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.key-btn:active {
  transform: scale(0.9);
  background: var(--rose-light);
  color: white;
  border-color: var(--rose-light);
  box-shadow: var(--neon-shadow-pink);
}

.key-btn.key-action {
  font-size: 18px;
  color: var(--rose-deep);
  background: rgba(255, 71, 126, 0.08);
  border-color: rgba(255, 71, 126, 0.15);
}

.key-btn.key-action:active {
  background: var(--rose-deep);
  color: white;
}

/* ================================================================= */
/* ANA PANEL (HUB / HOME PAGE) */
/* ================================================================= */
.hub-container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 10px;
  z-index: 2;
  text-align: center;
}

.hub-header {
  margin-bottom: 50px;
}

.romantic-title {
  font-family: var(--romantic-font);
  font-size: 52px;
  color: var(--rose-deep);
  margin-bottom: 10px;
  text-shadow: 0 2px 5px rgba(255, 71, 126, 0.1);
}

.hub-tagline {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Izgara Düzeni */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.hub-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 35px 25px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hub-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 15px 35px 0 rgba(255, 71, 126, 0.18);
}

.card-icon {
  font-size: 45px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.hub-card:hover .card-icon {
  transform: scale(1.15) rotate(5deg);
}

.hub-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.hub-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 25px;
  flex-grow: 1;
}

.card-btn {
  display: inline-block;
  padding: 10px 20px;
  background: white;
  border: 1.5px solid var(--rose-light);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  color: var(--rose-deep);
  transition: all 0.25s ease;
}

.hub-card:hover .card-btn {
  background: var(--rose-deep);
  color: white;
  border-color: var(--rose-deep);
  box-shadow: var(--neon-shadow-pink);
}

/* Farklı Kart Glow Efektleri */
.pink-glow:hover { border-color: var(--rose-medium); }
.gold-glow:hover { border-color: var(--gold-glow); }
.blue-glow:hover { border-color: var(--blue-pastel); }
.rose-glow:hover { border-color: var(--rose-pastel); }

.hub-footer {
  font-size: 12px;
  font-weight: 700;
  color: var(--rose-medium);
  letter-spacing: 1px;
}

/* ================================================================= */
/* ALT SAYFA ORTAK ELEMANLARI (SUB-CONTAINERS & BUTTONS) */
/* ================================================================= */
.sub-container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 15px;
  display: flex;
  flex-direction: column;
  min-height: 90vh;
}

.sub-container.full-height {
  height: 90vh;
  padding-bottom: 0;
}

/* Geri Dön Butonu */
.back-btn {
  align-self: flex-start;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 30px;
  font-family: var(--primary-font);
  font-size: 13px;
  font-weight: 700;
  color: var(--rose-deep);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.25s ease;
  margin-bottom: 30px;
  z-index: 5;
}

.back-btn:hover {
  transform: translateX(-4px);
  background: white;
  box-shadow: var(--neon-shadow-pink);
}

.back-btn.absolute-top {
  position: absolute;
  top: 20px;
  left: 20px;
  margin-bottom: 0;
}

.cursive-heading {
  font-family: var(--romantic-font);
  font-size: 48px;
  color: var(--rose-deep);
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(255, 71, 126, 0.1);
}

.sub-instructions {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 600;
  max-width: 600px;
  margin-bottom: 40px;
}

/* Özel Canvas Efektleri (Katman) */
.overlay-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 200;
}

/* Yardımcı Sınıflar */
.hidden {
  display: none !important;
}

/* ================================================================= */
/* RESPONSIVE DESIGN */
/* ================================================================= */
@media (max-width: 768px) {
  .logo-title {
    font-size: 36px;
  }
  .romantic-title {
    font-size: 40px;
  }
  .cursive-heading {
    font-size: 38px;
  }
  .key-btn {
    width: 60px;
    height: 60px;
    font-size: 22px;
  }
  .hub-grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
}
