/* =============================================
   LOVE PLANET – Main Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

/* ---------- Reset & Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #000;
  overflow: hidden;
  font-family: 'Outfit', 'Inter', Arial, sans-serif;
  color: #fff;
}

canvas {
  display: block;
  width: 100vw !important;
  height: 100vh !important;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* ---------- Overlay Panel (Question) ---------- */
.overlay-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  animation: panelFadeIn 0.8s ease-out;
}

@keyframes panelFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.panel-content {
  text-align: center;
  padding: 40px 50px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  max-width: 90vw;
}

.panel-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6em;
  font-weight: 600;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #ff6b6b, #ffd93d, #ff6b6b);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 3s linear infinite;
}

@keyframes shimmerText {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.panel-content div {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.panel-content button {
  padding: 12px 32px;
  border: none;
  border-radius: 14px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Outfit', sans-serif;
}

#btnYes {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
}

#btnYes:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 30px rgba(255, 107, 107, 0.6);
}

#noBtn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
}

#noBtn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- Help Panel ---------- */
.help-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 380px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  background: rgba(15, 15, 25, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px;
  z-index: 4000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.help-panel.active {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.help-panel.center {
  /* already centered by default */
}

.controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.help-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1em;
  font-weight: 600;
  background: linear-gradient(135deg, #ff6b6b, #ffd93d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 14px;
}

.close-btn:hover {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.3);
}

.help-section {
  margin-bottom: 14px;
}

.section-divider h4 {
  font-size: 0.85em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.help-section ul {
  list-style: none;
  padding: 0;
}

.help-section li {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.75);
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.help-section li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: #ff6b6b;
  font-weight: bold;
}

.label-mobile,
.label-pc {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  margin-right: 4px;
}

.label-mobile {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.label-pc {
  background: rgba(100, 149, 237, 0.15);
  color: #6495ed;
  border: 1px solid rgba(100, 149, 237, 0.2);
}

/* ---------- Help Icon ---------- */
.help-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.help-icon:hover {
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
  transform: scale(1.1);
}

/* ---------- Quick Help Panels ---------- */
.quick-help-panel {
  position: fixed;
  bottom: -400px;
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  max-width: 92vw;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  z-index: 4500;
  transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
}

.quick-help-panel.active {
  bottom: 0;
}

.quick-help-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.quick-help-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1em;
  font-weight: 600;
}

.quick-help-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 12px;
}

.quick-help-close-btn:hover {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.quick-help-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-help-section {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.quick-help-section h4 {
  font-size: 0.85em;
  font-weight: 600;
  margin-bottom: 4px;
}

.quick-help-section p {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

/* ---------- Gift & Letter Buttons ---------- */
.gift-btn,
.letter-btn {
  position: fixed;
  top: 20px;
  z-index: 3000;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.gift-btn {
  right: 70px;
}

.letter-btn {
  right: 120px;
}

.gift-btn:hover,
.letter-btn:hover {
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.3);
  transform: scale(1.1);
}

/* ---------- Google Login Button ---------- */
.google-login-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 3000;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.google-login-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

/* ---------- Stars Background ---------- */
.stars-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Share Popup ---------- */
.share-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6000;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  animation: fadeIn 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

/* ---------- Hidden utility ---------- */
.hidden {
  display: none !important;
}

/* ---------- Info overlay ---------- */
.info {
  position: absolute;
  top: 70px;
  left: 10px;
  color: white;
  font-family: Arial, sans-serif;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  border-radius: 5px;
  z-index: 3;
}

/* ---------- Scrollbar ---------- */
.help-panel::-webkit-scrollbar {
  width: 4px;
}

.help-panel::-webkit-scrollbar-track {
  background: transparent;
}

.help-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .panel-content {
    padding: 30px 24px;
  }

  .panel-content h2 {
    font-size: 1.2em;
  }

  .panel-content button {
    padding: 10px 24px;
    font-size: 0.9em;
  }

  .help-panel {
    width: 92vw;
    padding: 18px;
  }
}
