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

:root {
  --bg-light: #f3f7fa;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(255, 255, 255, 0.6);
  --card-hover-border: rgba(244, 63, 94, 0.4);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary-pink: #ec4899;
  --primary-rose: #f43f5e;
  --accent-purple: #8b5cf6;
  --gold: #d97706;
  --green: #059669;
  
  --primary-gradient: linear-gradient(135deg, #f43f5e 0%, #ec4899 50%, #8b5cf6 100%);
  --sidebar-width: 320px;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.04), 0 1px 8px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 20px 40px rgba(244, 63, 94, 0.12), 0 1px 10px rgba(15, 23, 42, 0.04);
}

body {
  background-color: var(--bg-light);
  background-image: 
    radial-gradient(at 0% 0%, rgba(253, 224, 233, 0.6) 0px, transparent 50%),
    radial-gradient(at 50% 0%, rgba(224, 242, 254, 0.6) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(233, 213, 255, 0.6) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -2;
  pointer-events: none;
  opacity: 0.35;
}

.glow-1 {
  top: -10%;
  left: 10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(253, 164, 186, 0.3) 0%, transparent 70%);
}

.glow-2 {
  bottom: -10%;
  right: 10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(196, 181, 253, 0.3) 0%, transparent 70%);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-pink);
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.45rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.logo-icon {
  font-size: 1.6rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse 2s infinite alternate;
}

.logo small {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-left: 5px;
}

.user-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.credit-badge i {
  color: var(--gold);
}

/* Buttons */
.btn {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.btn:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.04);
}

.btn-primary {
  background: var(--primary-gradient);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.35);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #7c3aed 100%);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.btn-accent:hover {
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

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

.btn-shop {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: var(--primary-rose);
}

.btn-shop:hover {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: var(--primary-rose);
}

/* Layout Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Lobby View */
.welcome-banner {
  text-align: center;
  margin-bottom: 40px;
}

.welcome-banner h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-banner p {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 500;
}

/* Character Grid */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 30px;
}

.character-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.character-card:hover {
  transform: translateY(-8px);
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-hover);
}

.char-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1.05;
  background: #f1f5f9;
  overflow: hidden;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.char-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.character-card:hover .char-image-container img {
  transform: scale(1.04);
}

.char-status {
  position: absolute;
  bottom: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.char-status.tsundere {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: var(--primary-rose);
}

.char-status.gentle {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--green);
}

.char-status.mysterious {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--accent-purple);
}

.char-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.char-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-main);
}

.char-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
  font-weight: 450;
}

.char-relations {
  margin-bottom: 24px;
}

.char-relations span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-rose);
  display: block;
  margin-bottom: 6px;
}

.progress-bar {
  background: rgba(15, 23, 42, 0.05);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar .progress {
  background: var(--primary-gradient);
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.char-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Chat Interface layout */
.chat-container {
  display: flex;
  height: calc(100vh - 140px);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-hover);
}

/* Chat Sidebar */
.chat-sidebar {
  width: var(--sidebar-width);
  border-right: 1px solid rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: rgba(248, 250, 252, 0.55);
}

.chat-sidebar h3 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-char-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.sidebar-char-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.sidebar-char-item img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(15, 23, 42, 0.05);
}

.sidebar-char-item .sidebar-char-meta .name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
}

.sidebar-char-item .sidebar-char-meta .status-dot {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-weight: 500;
}

.sidebar-char-item .sidebar-char-meta .status-dot::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

.sidebar-char-item:hover {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

.sidebar-char-item.active {
  background: rgba(244, 63, 94, 0.06);
  border-color: rgba(244, 63, 94, 0.12);
}

.sidebar-char-item.active img {
  border-color: var(--primary-rose);
}

/* Chat Main */
.chat-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.6);
}

.chat-header img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-rose);
}

.chat-header-info {
  flex-grow: 1;
}

.chat-header-info h2 {
  font-size: 1.15rem;
  font-weight: 800;
}

.chat-header-info p {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.chat-header-love {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(244, 63, 94, 0.05);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-rose);
  border: 1px solid rgba(244, 63, 94, 0.12);
}

/* Chat Messages */
.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.message {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  max-width: 75%;
}

.message.received {
  align-self: flex-start;
}

.message.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message img.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.message-bubble {
  padding: 12px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.message.received .message-bubble {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.04);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.02);
}

.message.sent .message-bubble {
  background: var(--primary-gradient);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
}

.message .msg-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* Typing Indicator Animation */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 16px;
  width: fit-content;
  margin-left: 72px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.02);
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--primary-pink);
  border-radius: 50%;
  animation: typing 1s infinite alternate;
  opacity: 0.4;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

/* VN Choice Buttons */
.vn-choices-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px;
  margin-bottom: 16px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.vn-choice-btn {
  background: #ffffff;
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #6d28d9;
  padding: 12px 20px;
  border-radius: 16px;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.vn-choice-btn:hover {
  background: rgba(139, 92, 246, 0.04);
  border-color: var(--accent-purple);
  transform: translateX(6px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
}

/* Input Bar */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.6);
  position: relative;
}

.cost-note {
  position: absolute;
  top: -10px;
  right: 28px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
}

.cost-note i {
  color: var(--gold);
}

.chat-input-bar input {
  flex-grow: 1;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 12px 18px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-input-bar input:focus {
  border-color: var(--primary-rose);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

.chat-input-bar button {
  height: 45px;
}

/* Visual Novel Story Mode */
.novel-container {
  height: calc(100vh - 120px);
  position: relative;
  background: #f1f5f9;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.novel-exit-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text-main);
}

.novel-exit-btn:hover {
  background: #ffffff;
}

.novel-screen {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.novel-background {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #fffbeb 0%, #fff1f2 50%, #f1f5f9 100%);
  z-index: 1;
  transition: background 1s ease;
}

.novel-character-stand {
  position: relative;
  z-index: 2;
  height: 85%;
  max-width: 60%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.novel-character-stand img {
  height: 100%;
  object-fit: contain;
  animation: slideUpChar 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 20px 40px rgba(15, 23, 42, 0.15));
}

.novel-dialog-box {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 24px 30px;
  backdrop-filter: blur(20px);
  min-height: 140px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
}

.novel-speaker-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-rose);
  margin-bottom: 10px;
  border-bottom: 2px solid rgba(244, 63, 94, 0.15);
  width: fit-content;
  padding-bottom: 4px;
}

.novel-text {
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--text-main);
}

.novel-options-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 40px;
}

.novel-option-btn {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text-main);
  padding: 16px 32px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  max-width: 600px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
}

.novel-option-btn:hover {
  border-color: var(--primary-pink);
  background: rgba(244, 63, 94, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.15);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.modal-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.12);
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.modal-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--primary-rose);
}

.modal-body {
  padding: 32px;
}

.shop-intro {
  color: var(--text-muted);
  margin-bottom: 24px;
  text-align: center;
  font-weight: 500;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.shop-item {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
}

.shop-item:hover {
  border-color: rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

.shop-item.popular {
  border-color: rgba(244, 63, 94, 0.3);
  background: rgba(244, 63, 94, 0.02);
}

.shop-item.popular:hover {
  border-color: var(--primary-rose);
}

.shop-badge {
  position: absolute;
  top: -12px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shop-item:not(.popular) .shop-badge {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text-muted);
}

.shop-item.popular .shop-badge {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 10px rgba(244, 63, 94, 0.2);
}

.shop-icon {
  font-size: 2.2rem;
  margin-top: 10px;
  margin-bottom: 16px;
}

.text-green { color: var(--green); }
.text-gold { color: var(--gold); }
.text-purple { color: var(--accent-purple); }

.shop-item h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.shop-price {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.shop-price .discount {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-rose);
  display: block;
  margin-top: 2px;
}

.shop-item p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 24px;
  flex-grow: 1;
  font-weight: 500;
}

.shop-item .buy-btn {
  width: 100%;
}

/* Loading & Toast Overlays */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-content {
  text-align: center;
  color: var(--text-main);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(15, 23, 42, 0.05);
  border-top-color: var(--primary-rose);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px auto;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-left: 4px solid var(--primary-rose);
  border-radius: 12px;
  padding: 16px 20px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
  animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.success {
  border-left-color: var(--green);
}

.toast.error {
  border-left-color: var(--primary-rose);
}

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(244,63,94,0.3)); }
  100% { transform: scale(1.06); filter: drop-shadow(0 0 8px rgba(244,63,94,0.6)); }
}

@keyframes typing {
  from { transform: translateY(0); opacity: 0.4; }
  to { transform: translateY(-6px); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideUpChar {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  header {
    padding: 16px 20px;
  }
  .container {
    padding: 20px 10px;
  }
  .character-grid {
    grid-template-columns: 1fr;
  }
  .chat-sidebar {
    display: none;
  }
  .modal-card {
    height: 100vh;
    border-radius: 0;
  }
}
