/* Modern Light Mode Design System for Khmer Keyboard Server */
:root {
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --border-color: #E2E8F0;
  --border-focus: #3B82F6;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --accent: #F59E0B;
  --success: #10B981;
  --danger: #EF4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-khmer: "Kantumruy Pro", "Battambang", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-main);
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(37,99,235,0.25);
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.brand-badge {
  font-size: 10px;
  font-weight: 800;
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
  padding: 2px 6px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.nav-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

.auth-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 4px 12px 4px 4px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-pill:hover {
  background: #DBEAFE;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #1E3A8A;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(37,99,235,0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
}

.btn-outline {
  background: #fff;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: #CBD5E1;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
}

.btn-ghost:hover {
  color: var(--danger);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

/* Tab panes */
.main-content {
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ========================================== */
/* TAB 1: HERO & FEATURES                     */
/* ========================================== */
.hero-section {
  padding: 50px 24px 40px;
  text-align: center;
  background: radial-gradient(circle at 50% 10%, rgba(37,99,235,0.06), transparent 70%);
}

.hero-container {
  max-width: 960px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 30px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 42px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 780px;
  margin: 0 auto 28px;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

/* Simulator Card */
.sim-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

.sim-card {
  background: var(--bg-card);
  border: 1.5.dp solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-color);
}

.sim-dots {
  display: flex;
  gap: 6px;
}

.sim-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.sim-dots span:nth-child(1) { background: #EF4444; }
.sim-dots span:nth-child(2) { background: #F59E0B; }
.sim-dots span:nth-child(3) { background: #10B981; }

.sim-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.sim-badge {
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #ECFDF5;
  padding: 2px 8px;
  border-radius: 6px;
}

.sim-screen {
  padding: 16px;
}

.sim-screen input {
  width: 100%;
  padding: 12px 16px;
  font-size: 18px;
  font-family: var(--font-khmer);
  font-weight: 600;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-md);
  background: #F8FAFC;
  color: var(--text-main);
  outline: none;
}

.sim-suggestions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.chip {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  font-family: var(--font-khmer);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover, .chip.active {
  background: #2563EB;
  color: #fff;
  border-color: #2563EB;
}

.sim-keyboard {
  background: #F1F5F9;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kb-row {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.sim-key {
  height: 42px;
  min-width: 32px;
  flex: 1;
  max-width: 48px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-family: var(--font-khmer);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.08s ease;
  box-shadow: 0 2px 0 #94A3B8;
}

.sim-key:active {
  transform: translateY(2px);
  box-shadow: none;
  background: #E2E8F0;
}

.key-func {
  max-width: 64px;
  background: #E2E8F0;
  font-size: 12px;
}

.key-space {
  max-width: 240px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Features Grid */
.features-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--primary);
  text-transform: uppercase;
}

.section-title {
  font-size: 32px;
  margin: 6px 0 10px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #EFF6FF;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========================================== */
/* TAB 2: STORE & THEME CARDS                 */
/* ========================================== */
.store-container, .studio-container, .profile-container, .admin-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
}

.store-header, .studio-header, .admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.store-title, .studio-title, .admin-title {
  font-size: 28px;
}

.store-desc, .studio-desc, .admin-desc {
  font-size: 14.5px;
  color: var(--text-muted);
}

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

.search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: border 0.15s;
}

.search-box input:focus {
  border-color: var(--border-focus);
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.sort-box select {
  padding: 8px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
}

.cat-pill {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.cat-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.cat-pill.active {
  background: #2563EB;
  color: #fff;
  border-color: #2563EB;
}

/* Themes Grid */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.theme-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.tc-preview {
  height: 140px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tc-category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.tc-featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #F59E0B;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

.tc-mini-kb {
  display: flex;
  gap: 6px;
}

.tc-mini-key {
  width: 36px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-khmer);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.tc-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tc-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.tc-author {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.tc-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 14px;
  flex: 1;
}

.tc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 12.5px;
  color: var(--text-muted);
}

.tc-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #D97706;
}

.tc-actions {
  display: flex;
  gap: 6px;
}

.btn-like {
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  color: #E11D48;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-like.liked {
  background: #E11D48;
  color: #fff;
  border-color: #E11D48;
}

/* ========================================== */
/* TAB 3: CREATOR STUDIO WORKSPACE            */
/* ========================================== */
.studio-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .studio-workspace {
    grid-template-columns: 1fr;
  }
}

.studio-form-card, .studio-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.form-section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--border-focus);
  background: #fff;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 20px 0;
}

/* Studio Preview Surface */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.preview-surface {
  min-height: 220px;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.preview-kb {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 480px;
}

.pkb-row {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.pkb-key {
  height: 38px;
  flex: 1;
  max-width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 700;
  position: relative;
  transition: all 0.2s ease;
}

.pkb-cute-icon {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 8px;
  line-height: 1;
}

/* Key Bevel Styles */
.bevel-flat {
  box-shadow: none;
}

.bevel-embossed-3d {
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.4);
}

.bevel-chiseled {
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.5), inset -1px -2px 0 rgba(0, 0, 0, 0.6);
}

.bevel-pillowed {
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.35), inset 0 0 6px rgba(0, 0, 0, 0.3);
}

.bevel-convex-gloss {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0.2) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

/* Glassmorphism Frosted Glass */
.glassmorphism-bg {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(226, 232, 240, 0.45), rgba(148, 163, 184, 0.55)) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
}

.glassmorphism-key {
  background: rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.2px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.pkb-func {
  max-width: 60px;
  font-size: 11px;
}

.pkb-space {
  max-width: 220px;
  font-size: 11px;
}

.json-preview-box pre {
  background: #0F172A;
  color: #38BDF8;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  max-height: 160px;
  overflow-y: auto;
}

/* ========================================== */
/* TAB 4: PROFILE & TAB 5: ADMIN              */
/* ========================================== */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 22px;
  margin-bottom: 2px;
}

.profile-username {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.profile-bio {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.profile-meta {
  display: flex;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-light);
}

.profile-stats-grid, .admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.pstat-box {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.pstat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.pstat-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.metric-val {
  font-size: 24px;
  font-weight: 800;
}

.metric-lbl {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-top: 24px;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-table th {
  background: #F8FAFC;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.table-responsive {
  overflow-x: auto;
}

/* ========================================== */
/* MODALS                                     */
/* ========================================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-dialog {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.2s ease;
}

.modal-lg {
  max-width: 680px;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 20px;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: var(--primary);
  border-color: var(--primary);
}

/* Star Rating Widget */
.star-rating {
  display: flex;
  gap: 8px;
  font-size: 28px;
  color: #CBD5E1;
  cursor: pointer;
}

.star-rating i:hover,
.star-rating i.active {
  color: #F59E0B;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0F172A;
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.25s ease;
}

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

/* Footer */
.footer {
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 40px;
}

.footer-links {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-light);
}
