/* Custom CSS for Love Signal 2 - Bright/Light Theme */

:root {
  --pink-primary: #ff4a7d;
  --pink-hover: #e03b68;
  --pink-light: #fff0f3;
  --pink-border: #ffd1db;
  --bg-ambient: linear-gradient(135deg, #fff6f8 0%, #f3f6ff 100%);
  --chat-bg: #fdfefe;
  --chat-bubble-user: linear-gradient(135deg, #ff6b95 0%, #ff4a7d 100%);
  --chat-bubble-ai: #f1f3f9;
  --text-dark: #2c3038;
  --text-muted: #6c757d;
  --tsundere-color: #ff5e7e;
  --gentle-color: #4dabf7;
  --mysterious-color: #9c27b0;
  --kakaopay-bg: #fee500;
  --kakaopay-text: #191919;
}

body {
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  color: var(--text-dark);
  overflow-x: hidden;
  background: #f8fafc;
}

/* Bright Ambient Gradient Background */
.bg-light-ambient {
  background: var(--bg-ambient);
  background-attachment: fixed;
}

/* Ambient glow blobs */
.ambient-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(130px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
}
.glow-pink {
  top: 10%;
  right: -5%;
  background: rgba(255, 74, 125, 0.25);
}
.glow-blue {
  bottom: 10%;
  left: -5%;
  background: rgba(77, 171, 247, 0.2);
}

/* Custom Typography & Spacing */
.tracking-tight {
  letter-spacing: -0.03em;
}
.fs-7 {
  font-size: 0.85rem;
}
.fs-8 {
  font-size: 0.75rem;
}
.text-pink {
  color: var(--pink-primary) !important;
}
.bg-pink-light {
  background-color: var(--pink-light) !important;
}

/* Buttons */
.btn-pink {
  background-color: var(--pink-primary);
  border-color: var(--pink-primary);
  color: white;
  transition: all 0.2s ease;
}
.btn-pink:hover, .btn-pink:focus {
  background-color: var(--pink-hover);
  border-color: var(--pink-hover);
  color: white;
  transform: translateY(-1px);
}
.btn-outline-pink {
  color: var(--pink-primary);
  border-color: var(--pink-primary);
  background-color: transparent;
  transition: all 0.2s ease;
}
.btn-outline-pink:hover {
  background-color: var(--pink-primary);
  border-color: var(--pink-primary);
  color: white;
}

/* KakaoPay Button styling */
.btn-kakaopay {
  background-color: var(--kakaopay-bg);
  border-color: var(--kakaopay-bg);
  color: var(--kakaopay-text);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}
.btn-kakaopay:hover {
  background-color: #f7dd00;
  border-color: #f7dd00;
  color: var(--kakaopay-text);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}
.pay-logo-symbol {
  height: 18px;
  width: auto;
  object-fit: contain;
}

/* Logo pulse animation */
.animate-pulse {
  animation: logo-pulse 2s infinite ease-in-out;
}
@keyframes logo-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Fade-in transitions */
.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Welcome Banner card */
.welcome-banner {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 240, 243, 0.8) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.max-w-600 {
  max-width: 600px;
}

/* Character Cards */
.character-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 74, 125, 0.05) !important;
}
.character-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(255, 74, 125, 0.08) !important;
}
.char-img-wrapper {
  height: 240px;
  overflow: hidden;
  background-color: #f1f3f9;
}
.char-img-wrapper img {
  height: 100%;
  width: 100%;
  transition: transform 0.5s ease;
}
.character-card:hover .char-img-wrapper img {
  transform: scale(1.05);
}
.char-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
.bg-tsundere { background-color: var(--tsundere-color); }
.bg-gentle { background-color: var(--gentle-color); }
.bg-mysterious { background-color: var(--mysterious-color); }

/* Chat View Panel Layout */
.chat-layout-card {
  height: calc(100vh - 160px);
  min-height: 500px;
}
.chat-sidebar {
  height: 100%;
}
.sidebar-item {
  transition: background-color 0.2s ease;
}
.sidebar-item:hover {
  background-color: var(--pink-light);
}
.sidebar-item.active {
  background-color: var(--pink-light) !important;
  border-left: 4px solid var(--pink-primary) !important;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chat-main {
  height: 100%;
}
.bg-light-chat {
  background-color: #f7fafc;
}
.btn-icon {
  background: none;
  border: none;
  color: var(--text-dark);
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
}
.btn-icon:hover {
  background-color: #f1f3f9;
}

/* Chat Message Bubbles */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.message-group {
  display: flex;
  align-items: flex-start;
  max-width: 75%;
}
.message-group.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.message-group.model {
  align-self: flex-start;
}
.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.message-bubble {
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  word-break: break-word;
}
.user .message-bubble {
  background: var(--chat-bubble-user);
  color: white;
  border-bottom-right-radius: 4px;
}
.model .message-bubble {
  background: var(--chat-bubble-ai);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
  border: 1px solid #eef1f6;
}

/* Visual Novel Story Screen Layout */
.novel-screen-wrapper {
  height: calc(100vh - 160px);
  min-height: 520px;
}
.novel-screen {
  height: 100%;
  background-color: #ffe6ea;
  overflow: hidden;
}
.novel-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 230, 234, 0.4) 0%, rgba(255, 240, 243, 0.95) 100%);
  z-index: 1;
}
.novel-character-stand {
  height: 70%;
  bottom: 0;
  z-index: 2;
  transition: all 0.5s ease-in-out;
}
.novel-character-stand img {
  height: 100%;
  width: auto;
  max-width: 100%;
}
.novel-dialog-box {
  z-index: 5;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  width: 90%;
}
.novel-speaker-badge {
  font-size: 0.95rem;
}
.novel-dialog-text {
  min-height: 56px;
}

/* Decision options overlay style */
.novel-options-overlay {
  z-index: 10;
}
.novel-options-overlay .card {
  border: 1px solid var(--pink-border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

/* Circle Button */
.btn-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Global loader design */
.loading-overlay {
  z-index: 2000;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
}
.spinner-border.text-pink {
  color: var(--pink-primary) !important;
}

/* Credits Shop Card */
.shop-item-card {
  background: white;
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
}
.shop-item-card.popular {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(255, 74, 125, 0.12) !important;
}
.shop-item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}
.shop-item-card.popular:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 28px rgba(255, 74, 125, 0.16) !important;
}

/* Custom Scrollbar for Chat */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.2);
}

/* Mobile Adjustments */
@media (max-width: 767.98px) {
  .chat-layout-card {
    height: calc(100vh - 110px);
  }
  .novel-screen-wrapper {
    height: calc(100vh - 110px);
  }
  .novel-character-stand {
    height: 55%;
  }
  .novel-dialog-box {
    width: 95%;
    padding: 16px !important;
  }
}
