:root {
    --bg1: #0f0c29;
    --bg2: #302b63;
    --bg3: #24243e;
    --accent: #ff5c8a;
    --accent-2: #ffd1dc;
    --text: #ffffff;
    --muted: #c7c7d1;
  }
  
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, var(--bg1), var(--bg2) 50%, var(--bg3));
    overflow-x: hidden;
  }
  
  /* Falling hearts background */
  #hearts-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
  }
  
  .hero {
    position: relative;
    z-index: 1;
    padding: 96px 24px 64px;
    text-align: center;
  }
  
  .title {
    font-family: 'Parisienne', cursive;
    font-size: clamp(40px, 8vw, 88px);
    margin: 0 0 8px 0;
    line-height: 1.1;
    text-shadow: 0 12px 40px rgba(255, 92, 138, 0.35);
  }
  
  .subtitle {
    margin: 0 auto 28px;
    max-width: 720px;
    color: var(--muted);
    font-size: clamp(16px, 2.2vw, 20px);
  }
  
  .cta {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #ff7096);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(255, 92, 138, 0.35);
    transition: transform .15s ease, box-shadow .15s ease;
  }
  .cta:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(255, 92, 138, 0.45); }
  
  main { position: relative; z-index: 1; }
  .section { padding: 48px 24px; }
  .is-hidden { display: none; }
  .section-head { text-align: center; margin-bottom: 24px; }
  .section-head h2 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 36px); }
  .section-head p { margin: 0; color: var(--muted); }
  
  .video-section .video-wrapper {
    position: relative;
    margin: 0 auto;
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(6px);
  }

  /* Smaller wrapper only for the surprise video */
  #surprise .video-wrapper { max-width: 440px; }
  #surprise video { max-height: 600px; width: 100%; height: auto; }
  #surprise .controls { flex-wrap: wrap; row-gap: 6px; }
  #surprise .controls input[type="range"] { flex-basis: 100%; }
  #surprise .time { min-width: 0; }
  
  video {
    display: block;
    width: 100%;
    height: auto;
  }
  
  .play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: clamp(42px, 7vw, 72px);
    color: #fff;
    background: radial-gradient(transparent, rgba(0,0,0,0.45));
    border: none;
    cursor: pointer;
    opacity: 1;
    transition: opacity .2s ease;
  }
  .play-overlay.hidden { opacity: 0; pointer-events: none; }
  
  .controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0,0,0,0.35);
    flex-wrap: nowrap;
  }
  
  .btn {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: #fff;
    cursor: pointer;
  }
  .btn:hover { background: rgba(255,255,255,0.12); }
  .btn.secondary { background: rgba(255,92,138,0.18); border-color: rgba(255,92,138,0.35); }
  
  input[type="range"] { flex: 1 1 auto; height: 6px; accent-color: var(--accent); }
  .time { min-width: 110px; text-align: right; color: #eee; opacity: .9; }
  
  .note { text-align: center; color: var(--muted); margin-top: 12px; }
  
  .game-section .game-wrapper {
    margin: 0 auto;
    max-width: 420px;
    background: rgba(255,255,255,0.04);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    padding: 16px 16px 20px;
    position: relative;
  }
  /* Opaque backdrop so background photo-hearts don't show under the game */
  .game-section .game-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #1b1b2f, #0d0d1a);
    border-radius: 16px;
    z-index: 0;
  }
  .game-section .game-wrapper > * { position: relative; z-index: 1; }
  
  canvas { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; border-radius: 12px; background: linear-gradient(180deg, #1b1b2f, #0d0d1a); touch-action: none; }
  .hud { display: flex; justify-content: space-between; margin-top: 10px; color: var(--accent-2); }
  @media (max-width: 420px) {
    .hud { flex-direction: column; gap: 6px; align-items: center; }
  }

  /* Love meter */
  .love-meter { margin-top: 10px; }
  .meter-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,92,138,0.25), rgba(255,92,138,0.12));
    overflow: visible; /* allow the heart indicator to overflow outside the bar */
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  }
  .meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff5c8a, #ff85a6);
    transition: width .2s ease;
  }
  .meter-heart {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    line-height: 1;
    z-index: 2;
    filter: drop-shadow(0 6px 18px rgba(255,92,138,0.35));
  }

  /* Score pulse */
  .pulse { animation: pulse .25s ease; }
  @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }

  /* Toast messages */
  .toast-container { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; pointer-events: none; display: inline-block; padding: 8px 12px; border-radius: 14px; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); box-shadow: 0 16px 40px rgba(0,0,0,0.45); }
  .toast {
    position: relative;
    margin-top: 6px;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #fff;
    animation: toastIn .3s ease, toastOut .3s ease 2.2s forwards;
    pointer-events: none;
  }
  @keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }
  
  .message-section p { max-width: 820px; margin: 0 auto; text-align: center; color: var(--accent-2); font-size: 18px; }
  
  /* Eskişehir Hatıralar Bölümü */
  .memories-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    margin: 20px;
    padding: 40px 20px;
  }
  
  .memories-container {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .memories-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
  }
  
  .media-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  }
  
  .media-content {
    position: relative;
    width: 100%;
    height: 500px;
  }
  
  .media-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }
  
  .media-item.active {
    opacity: 1;
    pointer-events: auto;
  }
  
  .memory-image, .memory-video {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    pointer-events: auto;
    cursor: pointer;
  }
  
  .memory-video {
    background: #000;
  }
  
  .media-caption {
    margin-top: 15px;
    text-align: center;
    color: var(--accent-2);
    font-size: 16px;
    font-weight: 500;
    padding: 0 20px;
  }
  
  .nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 92, 138, 0.8);
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(255, 92, 138, 0.3);
  }
  
  .nav-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 92, 138, 0.4);
  }
  
  .nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
  }
  
  .media-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
  }
  
  .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .indicator.active {
    background: var(--accent);
    transform: scale(1.2);
  }
  
  .indicator:hover {
    background: var(--accent-2);
    transform: scale(1.1);
  }
  
  .footer { text-align: center; padding: 40px 24px 64px; color: var(--muted); }
  .infinity { color: var(--accent); font-weight: 700; }

  /* Typewriter minimal styling */
  #typewriter { display: inline-block; border-right: 2px solid rgba(255,255,255,0.55); padding-right: 6px; white-space: nowrap; overflow: hidden; }

  /* Heart cursor trail */
  .cursor-heart { position: fixed; pointer-events: none; will-change: transform, opacity; filter: drop-shadow(0 6px 14px rgba(255,92,138,0.35)); }
  
  /* Responsive tweaks */
  @media (max-width: 640px) {
    .controls { gap: 8px; }
    .time { min-width: 88px; font-size: 12px; }
  }

  /* Improve long typewriter lines on small screens */
  @media (max-width: 480px) {
    #typewriter {
      display: block;
      border-right: none;
      padding-right: 0;
      white-space: normal;      /* allow wrapping */
      word-break: break-word;   /* break long words/emojis safely */
    }
    .section-head p { font-size: 14px; }
    .toast-container { left: 45%; transform: translateX(-45%); }
  }

  /* Make controls wrap cleanly on narrow containers so time stays visible */
  @media (max-width: 420px) {
    .controls { flex-wrap: wrap; row-gap: 6px; }
    .controls input[type="range"] { flex-basis: 100%; }
    .time { min-width: 0; width: 100%; text-align: right; }
  }

  /* Giriş Formu Stilleri */
  .login-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg1), var(--bg2) 50%, var(--bg3));
    z-index: 1000;
    padding: 20px;
  }

  .login-form {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .login-form h2 {
    font-family: 'Parisienne', cursive;
    font-size: 32px;
    text-align: center;
    margin: 0 0 8px 0;
    color: var(--accent);
    text-shadow: 0 8px 25px rgba(255, 92, 138, 0.3);
  }

  .login-subtitle {
    text-align: center;
    color: var(--muted);
    margin: 0 0 30px 0;
    font-size: 14px;
  }

  .input-group {
    margin-bottom: 20px;
  }

  .input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-2);
    font-weight: 500;
    font-size: 14px;
  }

  .input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
  }

  .input-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 92, 138, 0.2);
  }

  .input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
  }

  .login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, var(--accent), #ff7096);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 92, 138, 0.3);
  }

  .login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 92, 138, 0.4);
  }

  .login-btn:active {
    transform: translateY(0);
  }

  .error-message {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    color: #ff6b6b;
    text-align: center;
    font-size: 14px;
    display: none;
  }

  .error-message.show {
    display: block;
    animation: shake 0.5s ease-in-out;
  }

  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
  }

  .main-content {
    transition: opacity 0.5s ease;
  }

  .main-content.hidden {
    display: none;
  }

  .login-container.hidden {
    display: none;
  }

  /* Soru Ekranı Stilleri */
  .question-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg1), var(--bg2) 50%, var(--bg3));
    z-index: 1000;
    padding: 20px;
  }

  .question-form {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
  }

  .question-form h2 {
    font-family: 'Parisienne', cursive;
    font-size: 36px;
    margin: 0 0 12px 0;
    color: var(--accent);
    text-shadow: 0 8px 25px rgba(255, 92, 138, 0.3);
  }

  .question-subtitle {
    color: var(--muted);
    margin: 0 0 30px 0;
    font-size: 16px;
    line-height: 1.5;
  }

  .question-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #ff7096, var(--accent));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 92, 138, 0.3);
  }

  .question-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 92, 138, 0.4);
  }

  .question-btn:active {
    transform: translateY(0);
  }

  .question-container.hidden {
    display: none;
  }

  /* Aşk Sorusu Ekranı Stilleri */
  .love-question-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg1), var(--bg2) 50%, var(--bg3));
    z-index: 1000;
    padding: 20px;
  }

  .love-question-form {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
  }

  .love-question-form h2 {
    font-family: 'Parisienne', cursive;
    font-size: 40px;
    margin: 0 0 16px 0;
    color: var(--accent);
    text-shadow: 0 8px 25px rgba(255, 92, 138, 0.3);
  }

  .love-question-subtitle {
    color: var(--muted);
    margin: 0 0 40px 0;
    font-size: 20px;
    line-height: 1.5;
  }

  .love-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .love-btn {
    padding: 16px 24px;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 180px;
  }

  .yes-btn {
    background: linear-gradient(90deg, #ff5c8a, #ff7096);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 92, 138, 0.3);
  }

  .yes-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 92, 138, 0.4);
  }

  .no-btn {
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    position: relative;
    transition: all 0.1s ease;
  }

  .no-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
  }

  .love-question-container.hidden {
    display: none;
  }

  /* Mobil uyumluluk */
  @media (max-width: 480px) {
    .login-form, .question-form, .love-question-form {
      padding: 30px 20px;
      margin: 10px;
    }
    
    .login-form h2, .question-form h2 {
      font-size: 28px;
    }
    
    .question-form h2 {
      font-size: 32px;
    }
    
    .love-question-form h2 {
      font-size: 36px;
    }
    
    .love-buttons {
      flex-direction: column;
      align-items: center;
    }
    
    .love-btn {
      min-width: 200px;
      font-size: 16px;
    }
    
    .memories-section {
      margin: 10px;
      padding: 20px 10px;
    }
    
    .media-content {
      height: 400px;
    }
    
    .memory-image, .memory-video {
      max-height: 300px;
    }
    
    .nav-btn {
      width: 40px;
      height: 40px;
      font-size: 20px;
    }
    
    .media-caption {
      font-size: 14px;
      margin-top: 10px;
    }
  }
  
  
  