   body {
      margin: 0;
      font-family: 'Arial', sans-serif;
      background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
      color: white;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
      overflow: hidden;
      padding: 20px;
      box-sizing: border-box;
    }

    .main-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
      max-width: 600px;
      margin: auto;
      position: relative;
      z-index: 10;
      pointer-events: none;
    }

    #dreamForm, #dreamForm *,
    #intro-container, #intro-container *,
    h1 {
      pointer-events: auto;
    }

    h1 {
      font-size: 2.5rem;
      margin-bottom: 20px;
      text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
      z-index: 10;
    }

    #intro-container {
      width: 100%;
      margin: 20px 0;
      display: flex;
      justify-content: center;
      transition: all 0.3s ease;
    }

    #intro-message {
      background: rgba(0,0,0,0.7);
      padding: 15px 25px;
      border-radius: 20px;
      margin-bottom: 20px;
      max-width: 80%;
      text-align: center;
      backdrop-filter: blur(5px);
      border: 1px solid rgba(255,255,255,0.1);
      animation: fadeIn 1s ease;
      z-index: 10;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-20px); }
      to { opacity: 1; transform: translateY(0); }
    }

    #dreamForm {
      margin: 20px 0;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 15px;
      z-index: 10;
    }

    .char-counter {
      font-size: 0.8rem;
      margin-top: -10px;
      width: 300px;
      text-align: right;
      color: #00c9ff;
      transition: all 0.3s ease;
      height: 16px;
    }

    .char-counter.warning {
      color: #ffcc00;
    }

    .char-counter.danger {
      color: #ff4444;
      animation: shake 0.5s;
    }

    @keyframes shake {
      0%, 100% { transform: translateX(0); }
      25% { transform: translateX(-3px); }
      75% { transform: translateX(3px); }
    }

    .social-inputs {
      display: none;
      flex-direction: column;
      gap: 10px;
      width: 300px;
      margin-top: -10px;
      animation: fadeIn 0.5s ease;
    }
    
    .social-inputs input {
      padding: 10px 15px;
      font-size: 0.9rem;
      border: none;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.1);
      color: white;
      outline: none;
    }

    .social-toggle {
      background: transparent;
      border: none;
      color: #00c9ff;
      cursor: pointer;
      font-size: 0.8rem;
      margin: 5px 0;
      text-decoration: underline;
    }

    #dreamInput {
      padding: 12px 20px;
      width: 300px;
      min-height: 100px;
      font-size: 1rem;
      border: none;
      border-radius: 25px;
      background: rgba(255, 255, 255, 0.1);
      color: white;
      outline: none;
      resize: vertical;
      font-family: 'Arial', sans-serif;
    }

    button {
      padding: 12px 30px;
      font-size: 1rem;
      background: linear-gradient(45deg, #00c9ff, #92fe9d);
      border: none;
      border-radius: 25px;
      color: #1b2735;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    button:hover {
      transform: scale(1.05);
      box-shadow: 0 0 15px rgba(0, 201, 255, 0.5);
    }

    canvas {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: -1;
    }

    .rising-star {
      position: fixed;
      width: 8px;
      height: 8px;
      background: white;
      border-radius: 50%;
      z-index: 2;
      animation: rise 5s linear forwards;
      box-shadow: 0 0 10px white;
    }

    @keyframes rise {
      0% {
        transform: translateY(0);
        opacity: 1;
      }
      100% {
        transform: translateY(-100vh);
        opacity: 0;
      }
    }

    .falling-star {
      position: absolute;
      width: 40px;
      height: 40px;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='gold' d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") center/contain no-repeat;
      z-index: 5;
      cursor: pointer;
      animation: fall 15s linear forwards, sparkle 1s infinite;
    }

    .collab-star {
      animation: fall 15s linear forwards, 
                 sparkle 0.5s infinite,
                 rainbowGlow 4s infinite;
    }
    
    @keyframes rainbowGlow {
      0% { filter: drop-shadow(0 0 5px #ff0000); }
      25% { filter: drop-shadow(0 0 5px #ffff00); }
      50% { filter: drop-shadow(0 0 5px #00ff00); }
      75% { filter: drop-shadow(0 0 5px #00ffff); }
      100% { filter: drop-shadow(0 0 5px #ff00ff); }
    }

    @keyframes fall {
      0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
      }
      100% {
        transform: translateY(calc(100vh + 100px)) rotate(360deg);
        opacity: 0;
      }
    }

    @keyframes sparkle {
      0%, 100% {
        filter: drop-shadow(0 0 5px gold);
      }
      50% {
        filter: drop-shadow(0 0 15px gold) brightness(1.5);
      }
    }

    .dream-popup {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(0, 0, 0, 0.9);
      padding: 30px;
      border-radius: 15px;
      max-width: 90%;
      width: 450px;
      text-align: center;
      box-shadow: 0 0 30px rgba(0, 201, 255, 0.5);
      border: 1px solid #00c9ff;
      z-index: 100;
      animation: fadeInPopup 0.3s ease;
    }

    @keyframes fadeInPopup {
      from { opacity: 0; transform: translate(-50%, -60%); }
      to { opacity: 1; transform: translate(-50%, -50%); }
    }

    .dream-popup h3 {
      margin-top: 0;
      color: #00c9ff;
    }

    .dream-popup p {
      font-size: 1.2rem;
      line-height: 1.5;
      white-space: pre-wrap;
    }

    .dream-popup .social-links {
      margin: 15px 0;
      display: flex;
      justify-content: center;
      gap: 15px;
    }
    
    .dream-popup .social-links a {
      color: white;
      font-size: 1.5rem;
      transition: transform 0.3s;
    }
    
    .dream-popup .social-links a:hover {
      transform: scale(1.2) rotate(10deg);
    }

    .dream-popup .button-group {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 20px;
      align-items: center;
    }

    .dream-popup .button-group button {
      padding: 8px 20px;
      font-size: 0.9rem;
      width: auto;
      min-width: 100px;
    }

    .help-button {
      background: linear-gradient(45deg, #ff6b6b, #ffa3a3);
      animation: pulse 2s infinite;
      position: relative;
    }

    .help-button:hover::before {
      content: '';
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-left: 10px solid transparent;
      border-right: 10px solid transparent;
      border-top: 10px solid rgba(0, 0, 0, 0.9);
      margin-bottom: -1px;
      z-index: 102;
    }

    .help-button:hover::after {
      content: 'Connect with dreamer using their provided contact method';
      position: absolute;
      bottom: calc(100% + 10px);
      left: 50%;
      transform: translateX(-50%);
      width: 220px;
      background-color: rgba(0, 0, 0, 0.9);
      color: white;
      padding: 12px;
      border-radius: 8px;
      font-size: 0.85rem;
      z-index: 101;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
      text-align: center;
      line-height: 1.4;
      backdrop-filter: blur(5px);
      border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    @keyframes pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.05); }
      100% { transform: scale(1); }
    }

    .overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.7);
      z-index: 99;
    }

    footer {
      position: fixed;
      bottom: 0;
      width: 100%;
      padding: 10px 0;
      background: rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(5px);
      z-index: 20;
      font-size: 0.8rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 40px;
    }

    .footer-left {
      margin-left: 20px;
    }

    .footer-center {
      flex: 1;
      display: flex;
      justify-content: center;
      gap: 15px;
      align-items: center;
    }

    .footer-right {
      margin-right: 20px;
    }

    .about-link, .contact-link {
      color: #00c9ff;
      text-decoration: none;
      transition: all 0.3s ease;
    }

    .about-link:hover, .contact-link:hover {
      text-decoration: underline;
      color: #92fe9d;
    }

    .bmc-btn {
      display: inline-flex;
      align-items: center;
      padding: 5px 12px;
      background-color: #FFDD00;
      color: #000;
      text-decoration: none;
      border-radius: 5px;
      font-weight: bold;
      font-size: 0.8rem;
    }

    .bmc-btn img {
      height: 18px;
      margin-right: 6px;
    }

    /* Custom scrollbar for about popup */
    #aboutPopup div::-webkit-scrollbar {
      width: 8px;
    }

    #aboutPopup div::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.2);
      border-radius: 10px;
    }

    #aboutPopup div::-webkit-scrollbar-thumb {
      background: linear-gradient(#00c9ff, #92fe9d);
      border-radius: 10px;
    }

    #aboutPopup div::-webkit-scrollbar-thumb:hover {
      background: linear-gradient(#00a8ff, #80e68a);
    }

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: all;
}

.dream-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    /*transform: translate(-50%, -50%) scale(0.9);*/
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid #4cc9f0;
    text-align: center;
    transition: transform 0.3s ease;
    /*will-change: transform;*/
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.popup-button {
    background: #4cc9f0;
    color: #16213e;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

    .popup-button:hover {
        background: #3aa8d8;
        transform: translateY(-2px);
    }


.main-container {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
    max-height: 100vh;
    position: relative;
    z-index: 1; /* Ensure it's above the canvas */
}

#skyCanvas {
    position: fixed;
    pointer-events: none; /* Allow touch events to pass through */
    z-index: 0;
}

.social-inputs {
    max-height: 300px;
    overflow-y: auto;
}