/* public/style.css - 레이나(Reina) 외부 콘솔 스타일 (이자벨 외부 콘솔과 100% 동일한 화면 공간 활용 & 폰트/사진 비율) */

html {
  font-size: 100%;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a12;
  --panel-bg: rgba(18, 12, 26, 0.78);
  --panel-bg-light: rgba(255, 255, 255, 0.05);
  --panel-border: rgba(251, 113, 133, 0.18);

  --accent-primary: #f43f5e;
  --accent-secondary: #9333ea;
  --accent-glow: rgba(244, 63, 94, 0.35);

  --text-main: #fdf2f8;
  --text-muted: #a0a0b8;

  --font-display: 'Outfit', 'Noto Sans KR', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-display);
  background-color: var(--bg-primary);
  color: var(--text-main);
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  margin: 0;
  padding: 0;
  display: flex;
  position: relative;
}

/* Background Glowing Blobs */
.background-blobs {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  mix-blend-mode: screen;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-primary);
  top: -10%;
  left: -10%;
  animation: float-slow 20s infinite alternate;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: var(--accent-secondary);
  bottom: -15%;
  right: -10%;
  animation: float-slow 25s infinite alternate-reverse;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: #f59e0b;
  top: 40%;
  left: 30%;
  opacity: 0.12;
  animation: float-slow 22s infinite alternate;
}

@keyframes float-slow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -40px) scale(0.92); }
}

/* Glassmorphism Styles (이자벨 콘솔과 100% 동일) */
.glass {
  background: var(--panel-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

.glass-light {
  background: var(--panel-bg-light);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

/* ═══════════════════════════════════════════════════════════
   App Container — 이자벨과 100% 동일하게 전체 화면(100vw, 100vh) 공간을 꽉 채움!
   ═══════════════════════════════════════════════════════════ */
.app-container {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 100%;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════
   Left Sidebar Layout — 이자벨 콘솔 기능배치 & 여백 일치
   ═══════════════════════════════════════════════════════════ */
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 16px 14px 20px 14px;
  align-items: center;
  height: 100%;
  overflow-y: auto;
  border-right: 1px solid var(--panel-border);
  border-radius: 0;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 1. 상단 전용 공간 배지 */
.sidebar-badge-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 2px;
}

.badge-izabel-style {
  display: inline-block;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  font-weight: 700;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.74rem;
  letter-spacing: 0.5px;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.35);
}

/* 2. AI 비서단 콘솔 이동 버튼 */
.assistants-link-box {
  width: 100%;
  margin-top: 8px;
}

.assistants-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: #e0e7ff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.assistants-nav-link:hover {
  background: rgba(139, 92, 246, 0.38);
  border-color: #c4b5fd;
  color: #fff;
  transform: translateY(-1px);
}

.profile-separator {
  width: 100%;
  height: 1px;
  background: var(--panel-border);
  margin: 12px 0 10px 0;
}

/* 3. 프로필 타이틀 */
.profile-meta {
  text-align: center;
  margin-bottom: 8px;
}

.profile-name {
  font-size: 1.65rem;
  font-weight: 800;
  background: linear-gradient(to right, #ffffff, #fda4af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2px;
}

.profile-tagline {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* 4. 원형 프로필 아바타 (120px 원형 & 펄스 링) */
.avatar-container-izabel {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 4px auto 10px auto;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.5), rgba(167, 139, 250, 0.4));
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.3);
}

.avatar-img-round {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.4s ease;
}

.avatar-container-izabel:hover .avatar-img-round {
  transform: scale(1.04);
}

.pulse-ring-izabel {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(244, 63, 94, 0.45);
  animation: pulseRingIzabel 2.5s infinite;
  pointer-events: none;
}

@keyframes pulseRingIzabel {
  0% { transform: scale(0.98); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 0.2; }
  100% { transform: scale(0.98); opacity: 0.8; }
}

/* 5. 상태 뱃지 (margin-bottom: auto 제거 -> 버튼과 자연스럽게 밀착) */
.status-indicator-izabel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 12px;
  border-radius: 30px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

/* 6. 세로 컨트롤 버튼들 (이자벨 콘솔과 100% 동일) */
.voice-controls-izabel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-btn-izabel {
  width: 100%;
  background: var(--panel-bg-light);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.control-btn-izabel:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.control-btn-izabel.btn-voice.active {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(190, 18, 60, 0.25));
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.2);
}

.control-btn-izabel.btn-wake.active {
  background: rgba(167, 139, 250, 0.22);
  border-color: #a78bfa;
  color: #c4b5fd;
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.2);
}

.control-btn-izabel.btn-continuous.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #bae6fd;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.control-btn-izabel.btn-standby {
  background: rgba(15, 23, 42, 0.7);
  border-color: #6366f1;
  color: #a5b4fc;
}

.control-btn-izabel.btn-standby.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #e0e7ff;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.3);
}

.control-btn-izabel.btn-simulator {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #22c55e;
}
.control-btn-izabel.btn-simulator:hover {
  background: rgba(34, 197, 94, 0.28);
  color: #4ade80;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
  transform: translateY(-1px);
}

/* 📸 시각 기억 갤러리 위젯 (이자벨 외부서버 기능배치 100% 동일) */
.visual-memory-widget {
  margin-top: 10px;
  width: 100%;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

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

.vm-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.vm-title i.fa-trash-can {
  cursor: pointer;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 6px;
  transition: color 0.2s;
}

.vm-count {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
}

.vm-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.vm-placeholder {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  padding: 3px 0;
}

/* 📞 1:1 실시간 보이스 통화 위젯 (이자벨 외부서버 기능배치 100% 동일) */
.direct-call-card {
  margin-top: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 78, 59, 0.25));
  border: 1px solid rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.call-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.call-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.call-card-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #e0e7ff;
}

.call-card-sub {
  font-size: 0.64rem;
  color: #86efac;
}

.btn-call-trigger {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-call-trigger:hover {
  transform: scale(1.04);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

/* 🎵 Music Player Widget (이자벨 외부서버 기능배치 100% 동일) */
.music-player {
  width: 100%;
  margin-top: 8px;
  background: rgba(14, 14, 22, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  user-select: none;
}

.mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
}

.mp-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.mp-bars span {
  width: 2px;
  height: 100%;
  background: #f43f5e;
  border-radius: 1px;
}

.mp-header-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
}

.mp-chevron {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   Right Chat Console Layout (이자벨 콘솔 100% 동일)
   ═══════════════════════════════════════════════════════════ */
.chat-console {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid var(--panel-border);
}

.chat-header h2 {
  font-size: 1.18rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: block;
}

.header-actions-right {
  display: flex;
  gap: 10px;
  margin-left: auto;
  align-items: center;
}

/* 💌 비밀 교환일기 상단 헤더 버튼 (이자벨과 100% 동일) */
.diary-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.22), rgba(192, 132, 252, 0.22));
  border: 1px solid rgba(244, 114, 182, 0.45);
  border-radius: 20px;
  color: #fbcfe8;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(244, 114, 182, 0.15);
}

.diary-nav-btn:hover {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.38), rgba(192, 132, 252, 0.38));
  border-color: #f472b6;
  color: #ffffff;
  transform: translateY(-1px);
}

.assistants-header-btn {
  text-decoration: none;
  padding: 6px 14px;
  font-size: 0.8rem;
  margin: 0;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(147, 51, 234, 0.2));
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  transition: var(--transition-smooth);
}

.assistants-header-btn:hover {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.35), rgba(147, 51, 234, 0.35));
  color: #fff;
  border-color: #f43f5e;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.05rem;
  transition: var(--transition-smooth);
  padding: 8px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.icon-btn:hover {
  color: var(--accent-primary);
  background: rgba(244, 63, 94, 0.1);
}

/* Chat View Container */
.view-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

/* Chat History — 여백 및 넓은 공간 확보 */
.chat-history {
  flex: 1;
  min-height: 0;
  padding: 24px 32px 35px 32px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 22px;
  scroll-behavior: smooth;
}

.chat-history::-webkit-scrollbar {
  width: 6px;
}
.chat-history::-webkit-scrollbar-track {
  background: transparent;
}
.chat-history::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}
.chat-history::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ═══════════════════════════════════════════════════════════
   Messages Styling — 사진 & 폰트 크기 대폭 확대 (이자벨과 100% 일치)
   ═══════════════════════════════════════════════════════════ */
.message {
  display: flex;
  max-width: 88%;
  animation: fade-in-up 0.3s ease;
  scroll-margin-bottom: 35px;
  align-items: flex-end;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.user {
  align-self: flex-end;
  justify-content: flex-end;
}

.message.assistant {
  align-self: flex-start;
  justify-content: flex-start;
  width: fit-content;
  max-width: 88%;
}

.message-bubble {
  padding: 16px 20px;
  font-size: 1.02rem;
  line-height: 1.68;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 사용자 메시지 (보라빛 그라디언트 필 & 좌측 시간) */
.message.user .message-bubble {
  background: linear-gradient(135deg, rgba(112, 0, 255, 0.25), rgba(112, 0, 255, 0.1));
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 18px 18px 4px 18px;
  color: #fdf2f8;
  font-size: 1.02rem;
  line-height: 1.6;
  padding: 14px 20px;
  box-shadow: 0 4px 16px rgba(112, 0, 255, 0.25);
}

/* 레이나 메시지 (루비/로즈 글래스 카드 & 큼직한 1024x1024 사진) */
.message.assistant .message-bubble {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(251, 113, 133, 0.25);
  border-radius: 16px 16px 16px 4px;
  color: #fdf2f8;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  min-width: 340px;
  width: 100%;
}

/* 메시지 내부 상단 1024x1024 정사각형 사진 — 화면 가득 차도록 큼직하게 렌더링! */
.message-bubble img,
.message-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(580px, 60vh);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 14px;
  margin-top: 2px;
  margin-bottom: 12px;
  display: block;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: opacity 0.2s ease-in;
}

.message-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #fdf2f8;
  word-break: break-word;
}

/* 메시지 발송/수신 시간 표시 스타일 */
.message-time {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.45);
  align-self: flex-end;
  margin: 0 8px 4px 8px;
  white-space: nowrap;
  user-select: none;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-self: flex-start;
  gap: 5px;
  padding: 12px 18px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 16px 16px 16px 4px;
  margin-left: 32px;
  margin-bottom: 10px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   Chat Footer Panel (이자벨 콘솔과 100% 동일)
   ═══════════════════════════════════════════════════════════ */
.chat-footer {
  padding: 16px 28px 22px 28px;
  border-top: 1px solid var(--panel-border);
}

.input-wrapper {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 8px 16px;
  border-radius: 14px;
}

.input-wrapper input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 1.02rem;
  padding: 10px 0;
  width: 100%;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.mic-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mic-btn:hover {
  color: var(--accent-primary);
  background: rgba(244, 63, 94, 0.15);
}

.mic-btn.recording {
  color: #ffffff;
  background: var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-primary);
  animation: pulse-glow 1s infinite alternate;
}

@keyframes pulse-glow {
  0% { transform: scale(1); box-shadow: 0 0 10px var(--accent-primary); }
  100% { transform: scale(1.05); box-shadow: 0 0 20px var(--accent-primary); }
}

.send-btn {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: none;
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.35);
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.5);
}

/* 🌙 OLED 스마트 절전 블랙 스크린 */
body.black-standby-active {
  background-color: #000000 !important;
  background: #000000 !important;
}
body.black-standby-active .background-blobs,
body.black-standby-active .app-container {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
#oled-black-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: #000000 !important;
  z-index: 2147483647 !important;
}
@keyframes oledPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.25; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

/* 🤖 레이나 3D 감정 표정 & 음성 시뮬레이터 모달 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.simulator-modal-card {
  width: 95%;
  max-width: 960px;
  max-height: 88vh;
  background: rgba(18, 10, 26, 0.95);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(244, 63, 94, 0.25);
  overflow: hidden;
}

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

.modal-title-group h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-group p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 4px;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.modal-close-btn:hover {
  background: rgba(244, 63, 94, 0.3);
  color: #fff;
  border-color: #f43f5e;
}

.sim-quick-voice-bar {
  display: flex;
  gap: 10px;
}

.sim-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.86rem;
  outline: none;
}

.sim-input:focus {
  border-color: #f43f5e;
}

.sim-speak-btn {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
}

.sim-speak-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

.sim-filter-tags {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.sim-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.sim-tag:hover {
  border-color: #f43f5e;
  color: #fff;
}

.sim-tag.active {
  background: rgba(244, 63, 94, 0.25);
  border-color: #f43f5e;
  color: #fda4af;
}

.sim-photo-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  padding-right: 4px;
}

.sim-photo-grid::-webkit-scrollbar {
  width: 6px;
}
.sim-photo-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.sim-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.sim-card:hover {
  border-color: #f43f5e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.sim-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #1e112a;
}

.sim-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sim-card-emotion-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(12, 7, 18, 0.85);
  border: 1px solid #f43f5e;
  color: #fda4af;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  backdrop-filter: blur(5px);
}

.sim-card-actions {
  padding: 8px 10px;
  display: flex;
  gap: 6px;
}

.sim-btn-apply {
  flex: 1;
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid #f43f5e;
  color: #ffe4e6;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sim-btn-apply:hover {
  background: #f43f5e;
  color: #fff;
}

.sim-btn-listen {
  background: rgba(167, 139, 250, 0.2);
  border: 1px solid #a78bfa;
  color: #e0e7ff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sim-btn-listen:hover {
  background: #8b5cf6;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   반응형 모바일 및 분할 화면 최적화 (태블릿 / Fold 기기 대응)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .app-container {
    grid-template-columns: 250px 1fr;
  }
  .avatar-container-izabel {
    width: 95px;
    height: 95px;
  }
  .profile-name {
    font-size: 1.45rem;
  }
}

@media (max-width: 768px) {
  .app-container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
}
