/* ---------------------------
       Base / layout
       --------------------------- */
    :root{
      --accent:#9067C6;
      --accent-2:#A47DD9;
      --accent-3: #0094C6;
      --accent-4: #91C499;
      --accent-5: #4A4A48;
      --bg: #f0f2f5;
      --bubble-incoming: #e5e5ea;
      --bubble-outgoing: #0b84ff;
      --text-incoming: #000;
      --text-outgoing: #fff;
      --time-color: #8e8e93;
    }

    html,body{
      height:100%;
      margin:0; 
      padding:0;
    }

    body {
      margin: 0;
      padding-bottom: 60px;
      font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
      background: #D4C2FC; /* linear-gradient(135deg, #D4C2FC, #F9F5FF); */
      color: #4a3b47;
      /* display: flex;
      flex-direction: column;
      align-items: center; */
      overflow-x: hidden;
    }

    /* Falling hearts container sits above background but below content */
    .falling-heart {
      position: fixed;
      top: -20px;
      color: red;
      font-size: 20px;
      animation: fall linear forwards;
      pointer-events: none;
      z-index: 10000;
      opacity: 1;
    }

    @keyframes fall {
      from { transform: translateY(0) rotate(0deg); opacity: 1; }
      to { transform: translateY(80vh) rotate(360deg); opacity: 0; }
    }

    @keyframes beat {
      0% { transform: scale(1); }
      50% { transform: scale(1.15); }
      100% { transform: scale(1); }
    }

    @keyframes logoPulse {
      0% { transform: scale(1); }
      20% { transform: scale(1); }
      27% { transform: scale(1.15); }
      34% { transform: scale(1); }
      41% { transform: scale(1.15); }
      49% { transform: scale(1); }
      100% { transform: scale(1); }
    }
    .logo svg {
      transform-origin: center;
      text-transform: uppercase;
    }
    .logo svg path {
      animation: logoPulse 1.5s ease-in-out infinite;
      transform-origin: center;
    }
    

    /* ---------------------------
       Navbar
       --------------------------- */
    .navbar {
        position: sticky; 
        top: 0; 
        width: 100%; 
        padding: 10px 20px; 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        box-sizing: border-box; 
        background: transparent; 
        z-index: 1000; 
        transition: background 0.3s, padding 0.3s; 
        height: 100px;
    }
    .navbar.scrolled { background: rgba(255, 246, 247, 0.5); padding: 8px 20px; }
    .nav-right {
        display: flex; 
        align-items: center; 
        gap: 20px; 
        font-size: 12px; 
        text-align: center;
        margin-left: auto;
    }
    .nav-right a { text-decoration: none; color: #4a3b47; font-weight: 500; transition: 0.2s; text-transform: lowercase; }
    .nav-right a:hover { color: var(--accent); }

    .logo { display: flex; align-items: center; justify-content: center; cursor: pointer; margin-right: 10px; }
    /*
    .spotify-container { margin-left: 20px; }
    .spotify-container iframe { width: 400px; height: 80px; }
    */

    /* ---------------------------
   Hamburger menu
--------------------------- */

    .hamburger {
      display: none;
      flex-direction: column;
      gap: 5px;
      background: none;
      border: none;
      cursor: pointer;
      padding: 8px;
    }

    .hamburger span {
      width: 24px;
      height: 2px;
      background: #4a3b47;
      transition: 0.3s;
    }

    /* Mobile / collapsed nav state */
    .navbar.compact .nav-right {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: rgba(255, 246, 247, 0.95);
      flex-direction: column;
      align-items: center;
      gap: 16px;
      padding: 20px 0;
      display: none;
    }

    .navbar.compact .nav-right.open {
      display: flex;
    }

    .navbar.compact .hamburger {
      display: flex;
    }

    /* Prevent Spotify from forcing overflow */
    /*
    @media (max-width: 900px) {
      .spotify-container iframe {
        display: none;
      }
    }
    */


    /* ---------------------------
       Headings / sections
       --------------------------- */
    h1 { margin-top: 80px; font-size: 36px; font-weight: 700; text-align: center; text-transform: lowercase; font-family: "Dancing Script", cursive; color: #fff;}
    section { width: 100%; display: flex; flex-direction: column; align-items: center; padding: 40px 0; box-sizing: border-box; }

    /* ---------------------------
       Timer
       --------------------------- */
    .timer { display: flex; gap: 10px; margin-top: 20px 20px 20px 20px; }
    .time-box { display: flex; flex-direction: column; align-items: center; padding: 10px; background: var(--accent); color: #ffffff; border-radius: 12px; min-width: 60px; text-align: center; width: 60px; height: 60px; justify-content: center;}
    .time-number { font-size: 20px; font-weight: 700; text-transform: lowercase; color: white; }
    .time-label { font-size: 10px; text-transform: lowercase; color: rgba(255,255,255,0.9); }

    /* ---------------------------
       Gallery
       --------------------------- */
    .gallery-container { width: 100%; overflow: hidden; border-radius: 0px; padding: 0; }
    .gallery-track { 
      display: flex; 
      gap: 10px; 
      animation: scroll 360s linear infinite; 
      align-items: flex-start; 
      width: 100%;
    }
    .gallery-item { 
      flex-shrink: 0; 
      width: 300px; 
      background: white; 
      padding: 10px; 
      padding-bottom: 30px; 
      box-shadow: 0 4px 8px rgba(0,0,0,0.2); 
      display: flex; 
      justify-content: center; 
      align-items: center; 
      box-sizing: border-box; 
      position: relative; 
      flex-direction: column; 
      border-radius: 2px;
    }
    .gallery-item img { 
      width: auto; 
      max-width: 100%; 
      height: auto; 
      max-height: calc(100% - 60px); 
      display: block; 
      object-fit: contain; 
      border-radius: 0px; 
    }

    .photo-caption { 
      font-family: 'Permanent Marker', cursive; 
      font-size: 18px; 
      color: #333; 
      margin-top: 18px; 
      text-align: center;
    }

    .test-shine {
      position: absolute;
      inset: 0;
      border-radius: 12px;
      pointer-events: none;
      overflow: hidden;
      z-index: 6;
    }
    .test-shine::after {
      content: "";
      position: absolute;
      top: -50%;
      left: -60%;
      width: 30%;
      height: 200%;
      opacity: 0;
      transform: rotate(30deg);
      background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.0) 0%,
        rgba(255, 255, 255, 0.25) 60%,
        rgba(255, 255, 255, 0.6) 90%,
        rgba(255, 255, 255, 0.0) 100%
      );
    }
    .gallery-item:hover .test-shine::after {
      opacity: 1;
      left: 130%;
      transition: left 1.0s ease, opacity 0.15s ease;
    }
    .gallery-item:active .test-shine::after { opacity: 0; }

    @keyframes scroll {
      from { transform: translateX(0); }
      to { transform: translateX(calc(var(--scroll-distance) * -1)); }
}

    /* iMessage Section */
      .container{
    max-width:900px;
    margin:12px; 
    border-radius:10px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(20,20,60,0.08);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    min-height:500px;
  }

  /* Header like Messages app */
  .header{
    background: linear-gradient(180deg,#fbfbfd,#f4f6fb);
    padding:14px 16px;
    display:flex;
    align-items:center;
    gap:12px;
    border-bottom:1px solid rgba(0,0,0,0.06);
  }
  .avatar{
    width:44px;height:44px;border-radius:10px;background:#ddd;display:flex;align-items:center;justify-content:center;font-weight:700;color:#333;
    flex-shrink:0;
  }
  .title{
    font-weight:600;
  }
  .subtitle{
    font-size:12px;color:var(--time-color);
  }

  /* chat area */
  .chat{
    padding:20px;
    display:flex;
    flex-direction:column;
    gap:14px;
    overflow:auto;
    flex:1;
    background-image: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.2));
  }

  .message-row{
    display:flex;
    align-items:flex-end;
    gap:10px;
  }
  .message-row.incoming{ justify-content:flex-start; }
  .message-row.outgoing{ justify-content:flex-end; }

  .bubble{
    max-width:75%;
    padding:10px 14px;
    border-radius:18px;
    position:relative;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    word-break:break-word;
    line-height:1.25;
    font-size:15px;
  }

  /* tail effect */
  .bubble.incoming{
    background:var(--bubble-incoming);
    color:var(--text-incoming);
    border-bottom-left-radius:4px;
  }
  /*
  .bubble.incoming::after{
    content:'';
    position:absolute;
    left:-6px; bottom:0;
    width:12px;height:12px;
    background:var(--bubble-incoming);
    transform:translateY(4px) rotate(45deg);
    border-bottom-left-radius:2px;
    box-shadow:0 1px 0 rgba(0,0,0,0.02);
  }
    */

  .bubble.outgoing{
    background:var(--bubble-outgoing);
    color:var(--text-outgoing);
    border-bottom-right-radius:4px;
  }
  /*
  .bubble.outgoing::after{
    content:'';
    position:absolute;
    right:-6px; bottom:0;
    width:12px;height:12px;
    background:linear-gradient(180deg,#0b84ff,#0963c7);
    transform:translateY(4px) rotate(45deg);
    border-bottom-right-radius:2px;
    box-shadow:0 1px 0 rgba(0,0,0,0.04);
  }
    */

  .time{
    display:block;
    font-size:11px;
    color:var(--time-color);
    margin-top:6px;
    text-align:right;
  }

  .meta {
    display:flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    color:var(--time-color);
  }

  /* small avatar for incoming messages */
  .small-avatar{
    width:34px;height:34px;border-radius:8px;background:#ddd;display:flex;align-items:center;justify-content:center;font-weight:700;color:#333;flex-shrink:0;
  }

  /* audio player inside bubble */
  .audio-player{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:180px;
    max-width:560px;
  }
  .play-btn{
    width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;
    box-shadow:0 2px 6px rgba(0,0,0,0.12);
    background: #fff;
    transition:transform .12s ease;
  }
  .play-btn:active{ transform:scale(.96); }
  .play-btn svg{ width:16px;height:16px; display:block; }

  .progress{
    height:6px;
    background:rgba(255,255,255,0.12);
    border-radius:6px;
    overflow:hidden;
    flex:1;
    position:relative;
    min-width:100px;
  }
  .progress .bar{
    height:100%;
    width:0%;
    background:linear-gradient(90deg,#fff,#e6f4ff);
    border-radius:6px;
    transition: width 0.08s linear;
  }

  .time-label{
    font-size:12px;color:rgba(255,255,255,0.9);min-width:40px;text-align:center;
  }

  /* incoming bubble audio style different colors */
  .bubble.incoming .play-btn{ background:transparent; box-shadow:none; }
  .bubble.incoming .progress{ background:#ddd; }
  .bubble.incoming .progress .bar{ background:linear-gradient(90deg,#8e8e93,#cfcfd3); }
  .bubble.incoming .time-label{ color:#333; min-width:40px; text-align:right; }

  /* input area (demo only) */
  .composer{
    margin:12px;
    display:flex;
    gap:10px;
    border-top:1px solid lightgray;
    border-radius:20px;
    align-items:center;
    justify-content: space-between;
    padding: 5px;
  }
  .composer input[type="text"]{
    flex:1;
    padding:10px 12px;
    border-radius:20px;
    border:1px solid lightgray;
    font-size:15px;
    outline:none;
  }
  .composer-text {
    flex: 1;
  }
  .composer input {
    border: none;
    margin-left: 10px;
    width: 100%;
  }
  .composer input:focus {
    outline: none;
  }
  .composer button{
    background:var(--accent);
    color:#fff;
    border:none;
    padding:5px 6px;
    border-radius:50px;
    font-weight:600;
    cursor:pointer;
  }

  /* small waveform canvas */
  .waveform {
    height:36px;
    width:120px;
    flex-shrink:0;
  }


  /* section background colors */
  #home {
    /* background-color: A47DD9; */
    color: #fff;
  }

  #memories {
    background-color: #0094C6;
    color: #fff;
  }

  #letters, #sounds {
    background-color: #91C499;
    color: #fff;
  }

  #letters .title {
    color: #000000;
  }

  #places {
    background-color: #A47DD9;
    color: #fff;
  }

  #map {
    max-width:900px;
    width: calc(100% - 24px);
    height: 480px;
  }

  #messages {
      padding: 50px 20px;
      margin-top: 40px;
      background-color: #D4C2FC;
      color: #fff;
    }
  
  
  
  
  /* hearts & other z-indexing */
    
    main { z-index: 5; position: relative; }

    /* responsive tweaks */
    @media (max-width: 768px) {
      /*
      .spotify-container iframe {display: none; width: 250px; height:80px; }
      */
      section {max-width: 768px; }
      .gallery-container {max-width: 768px; }
      .container{ margin:12px; border-radius:10px; }
      .bubble{ font-size:15px; max-width:85%; padding:10px; }
      .chat{ padding:12px; gap:12px; }
      .avatar{ width:40px;height:40px; }
      .small-avatar{ width:30px;height:30px; }
      .play-btn{ width:32px;height:32px; }
      .progress{ min-width:80px; }
    }
    @media (max-width: 480px) {
      /*
      .spotify-container iframe {display: none; width: 250px; height:80px; }
      */
      .navbar {height: 70px; }
      section {max-width: 480px; }
      .gallery-container {max-width: 480px; }
      .container{ margin:12px; border-radius:10px; }
      .bubble{ font-size:15px; max-width:85%; padding:10px; }
      .chat{ padding:12px; gap:12px; }
      .avatar{ width:40px;height:40px; }
      .small-avatar{ width:30px;height:30px; }
      .play-btn{ width:32px;height:32px; }
      .progress{ min-width:80px; }
    }

    
    /* ✨ Text Stats Section Style ✨ */

    

    .stats-container {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 25px;
      margin-top: 25px;
    }

    .stats-card {
      background: rgba(255, 255, 255, 0.75);
      border-radius: 16px;
      padding: 20px;
      box-shadow: 0 4px 14px rgba(0,0,0,0.1);
      backdrop-filter: blur(6px);
      position: relative;
      transition: transform 0.2s ease;
    }

    .stats-card:hover {
      transform: translateY(-4px) scale(1.02);
    }

    .card-title {
      font-family: "Dancing Script", cursive;
      font-size: 26px;
      /* color: #ff6fa8; */
      margin-bottom: 10px;
    }

    .card-content {
      font-size: 16px;
      line-height: 1.55;
    }

    .subheading {
      margin-top: 12px;
      font-size: 18px;
      font-weight: bold;
      color: #444;
    }

    /* Cute name tags */
    .name-tag {
      padding: 2px 6px;
      border-radius: 8px;
      font-size: 14px;
      margin-right: 4px;
      font-weight: bold;
    }

    .name-tag.lyss {
      background: #ffd9ec;
      color: #ff4d92;
    }

    .name-tag.josh {
      background: #d9ecff;
      color: #3a79ff;
    }

    /* Fade-in animation */
    .fade-in-card {
      opacity: 0;
      animation: fadeInUp 0.6s ease forwards;
    }

    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Individual stat lines */
    .stat-line {
      margin: 6px 0;
    }

    /* Extra cute heart accent */
     .stats-card::after {
      content: url("img/logo-30.png");
      position: absolute;
      top: -12px;
      right: -12px;
      font-size: 26px;
      opacity: 0.9;
    }


    h1::after {
        content: url("img/logo-30.png");
        position: absolute;
        margin-left: 10px;
    }

