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

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

:root {
  --bg-root: #09090b;
  --bg-surface: #121214;
  --bg-elevated: #18181b;
  --bg-hover: #222228;
  --border: #27272a;
  --border-accent: #3b3b40;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #6366f1;
  --accent-soft: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.10);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.10);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-root);
  color: var(--text-primary);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(99, 102, 241, 0.04), transparent);
  background-attachment: fixed;
}

/* ---------------------------------- Layout ---------------------------------- */
.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* ---------------------------------- Header ---------------------------------- */
header {
  text-align: center;
  margin-bottom: 36px;
}

header h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #e0e7ff 0%, #818cf8 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

header p {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.2px;
}

/* ---------------------------------- Toolbar ---------------------------------- */
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  padding: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.toolbar select {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2371717a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 18px;
  padding-right: 36px;
  transition: all var(--transition);
}

.toolbar select:hover {
  border-color: var(--border-accent);
}

.toolbar select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.toolbar button {
  padding: 10px 14px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar button:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.toolbar button:active {
  transform: scale(0.97);
}

.toolbar button.danger {
  color: var(--red);
  border-color: transparent;
  background: var(--red-bg);
}

.toolbar button.danger:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* ---------------------------------- New Inbox Box ---------------------------------- */
.new-box {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 10px;
  animation: slideDown 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.new-box.hidden {
  display: none;
}

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

.new-box input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-root);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  transition: all var(--transition);
}

.new-box input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.new-box input:focus,
.new-box select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.new-box select {
  padding: 12px 16px;
  background: var(--bg-root);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  min-width: 160px;
  transition: all var(--transition);
}

.new-box select:hover {
  border-color: var(--border-accent);
}

.new-box button {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.new-box button:active {
  transform: scale(0.97);
}

#createCustomBtn {
  background: var(--green);
  color: #000;
}

#createCustomBtn:hover {
  background: #16a34a;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.25);
}

#createRandomBtn {
  background: var(--accent);
  color: #fff;
}

#createRandomBtn:hover {
  background: var(--accent-soft);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ---------------------------------- Panel ---------------------------------- */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.panel-head h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
  letter-spacing: -0.2px;
}

.panel-head span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 12px;
  background: var(--bg-hover);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ---------------------------------- Message List ---------------------------------- */
.message-list {
  min-height: 260px;
}

.message-item {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: default;
}

.message-item:last-child {
  border-bottom: none;
}

.message-item:hover {
  background: var(--bg-hover);
}

.message-item .message-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.message-item .message-meta::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.message-item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.message-item p {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.7;
}

/* ---------------------------------- Empty States ---------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.4;
  filter: grayscale(1);
}

.empty-state .title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.empty-state .sub {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.6;
}

/* ---------------------------------- Footer ---------------------------------- */
footer {
  text-align: center;
  padding: 32px 0 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  letter-spacing: 0.2px;
}

footer a span {
  color: var(--accent-soft);
  font-weight: 600;
  transition: color var(--transition);
}

footer a:hover {
  color: var(--text-secondary);
}

footer a:hover span {
  color: var(--accent);
}

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

.toast {
  padding: 12px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: toastIn 300ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: all;
}

.toast.fadeout {
  animation: toastOut 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

@keyframes toastOut {
  to { opacity: 0; transform: translateY(10px) scale(0.96); }
}

/* ---------------------------------- Responsive ---------------------------------- */
@media (max-width: 560px) {
  .app {
    padding: 20px 12px 60px;
  }

  header h1 {
    font-size: 28px;
  }

  .toolbar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
  }

  .toolbar select {
    width: 100%;
    flex: none;
  }

  .toolbar button {
    padding: 8px 10px;
    font-size: 11px;
  }

  .new-box {
    flex-direction: column;
    padding: 14px;
  }

  .panel-head {
    padding: 12px 14px;
  }

  .message-item {
    padding: 14px 14px;
  }
}

/* ==========================================
   MUSE IMAM PREMIUM DESIGN
   ========================================== */

:root {
  --bg-root: #080b18;
  --bg-surface: #10162a;
  --bg-elevated: #171f38;
  --bg-hover: #202b49;
  --border: #263250;
  --border-accent: #465a91;
  --text-primary: #f4f6ff;
  --text-secondary: #aab5d0;
  --text-muted: #7583a5;
  --accent: #8067ff;
  --accent-soft: #a695ff;
  --accent-glow: rgba(128, 103, 255, .22);
  --green: #35d6a0;
  --green-bg: rgba(53, 214, 160, .12);
  --red: #ff647c;
  --red-bg: rgba(255, 100, 124, .12);
  --radius-sm: 11px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-sm: 0 5px 18px rgba(0,0,0,.18);
  --shadow: 0 12px 35px rgba(0,0,0,.25);
  --shadow-lg: 0 18px 55px rgba(0,0,0,.4);
}

body {
  background-color: var(--bg-root);
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(87, 104, 255, .19), transparent 40%),
    radial-gradient(ellipse at 90% 70%, rgba(142, 72, 255, .12), transparent 40%);
}

.app {
  max-width: 900px;
  padding-top: 65px;
}

header {
  margin-bottom: 42px;
}

header h1 {
  font-size: clamp(36px, 7vw, 54px);
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(110deg, #ffffff 10%, #b5a7ff 48%, #6e9cff 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

header p {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #91a1c7;
}

.toolbar {
  padding: 12px;
  gap: 10px;
  background: rgba(16, 22, 42, .82);
  border: 1px solid rgba(113, 132, 190, .2);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.toolbar select,
.new-box input,
.new-box select {
  background-color: #0b1123;
  border-color: #293758;
  color: var(--text-primary);
  border-radius: 12px;
}

.toolbar button {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 12px;
  background: #192442;
  border-color: #304168;
  color: #dce5ff;
}

.toolbar button:hover {
  background: #29375d;
  border-color: #6578ba;
  transform: translateY(-2px);
}

#newBtn,
#createRandomBtn {
  background: linear-gradient(120deg, #7658f5, #4779f5);
  border: none;
  color: white;
  box-shadow: 0 5px 20px rgba(105, 91, 245, .25);
}

#newBtn:hover,
#createRandomBtn:hover {
  background: linear-gradient(120deg, #927bff, #6192ff);
}

.new-box {
  padding: 22px;
  background: rgba(16, 22, 42, .9);
  border: 1px solid #34436c;
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
}

.new-box input,
.new-box select {
  min-height: 46px;
}

.new-box button {
  border-radius: 12px;
}

#createCustomBtn {
  background: #1cbd91;
  color: #061b18;
}

.panel {
  background: rgba(16, 22, 42, .88);
  border: 1px solid rgba(113, 132, 190, .22);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-head {
  padding: 21px 24px;
  background: linear-gradient(110deg, #172342, #151d35);
  border-bottom: 1px solid #293858;
}

.panel-head h2 {
  font-size: 14px;
  color: #e3e9ff;
}

.panel-head span {
  background: rgba(128, 103, 255, .17);
  color: #b9aaff;
  border: 1px solid rgba(128, 103, 255, .2);
}

.message-item {
  padding: 22px 24px;
  border-bottom-color: rgba(113, 132, 190, .15);
}

.message-item:hover {
  background: rgba(100, 119, 190, .09);
}

.message-item .message-meta {
  color: #91a1c7;
}

.message-item .message-meta::before {
  background: #8e7aff;
  box-shadow: 0 0 10px #8067ff;
}

.message-item strong {
  color: #edf0ff;
}

.message-item p {
  color: #aebbd8;
}

.empty-state {
  padding: 75px 20px;
}

.empty-state .icon {
  filter: none;
  opacity: .8;
}

.empty-state .title {
  color: #dce4ff;
}

.empty-state .sub {
  color: #8190b3;
}

footer {
  padding-top: 38px;
  color: #7180a4;
  letter-spacing: .5px;
}

.toast {
  background: #172342;
  border: 1px solid #394c79;
  border-radius: 13px;
}

button, select, input {
  transition: all .2s ease;
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid #927bff;
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .app {
    padding: 35px 12px 50px;
  }

  header {
    margin-bottom: 28px;
  }

  header h1 {
    font-size: 36px;
  }

  .toolbar {
    border-radius: 16px;
  }

  .toolbar button {
    flex: 1;
    justify-content: center;
  }

  .panel {
    border-radius: 17px;
  }

  .panel-head {
    padding: 15px;
  }

  .message-item {
    padding: 17px;
  }
}


/* MUSE IMAM responsive information and social footer */
.app { max-width: 1180px; padding: 56px 22px 54px; }
.workspace { display: grid; grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.6fr); gap: 22px; align-items: start; }
.guide-card { position: sticky; top: 24px; padding: 28px; border: 1px solid rgba(128,103,255,.28); border-radius: 22px; background: linear-gradient(145deg, rgba(28,39,73,.96), rgba(16,22,42,.94)); box-shadow: var(--shadow); }
.guide-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 22px; border-radius: 15px; color: #fff; font-size: 25px; background: linear-gradient(135deg,#8067ff,#4779f5); box-shadow: 0 8px 24px rgba(105,91,245,.28); }
.guide-eyebrow { margin-bottom: 10px; color: #a695ff; font-size: 11px; font-weight: 700; letter-spacing: 1.6px; }
.guide-card h2 { margin-bottom: 14px; color: #f4f6ff; font-size: 23px; line-height: 1.25; }
.guide-description { color: #aab5d0; font-size: 14px; line-height: 1.85; }
.guide-description strong { color: #e4e8ff; font-weight: 700; }
.inbox-content { min-width: 0; }
.inbox-content > .toolbar:first-child { flex-wrap: wrap; }
.inbox-content > .toolbar:first-child input { flex: 1 1 220px; min-width: 0; padding: 12px 14px; color: var(--text-primary); background: #0b1123; border: 1px solid #293758; border-radius: 12px; font: inherit; }
#openInboxBtn { background: linear-gradient(120deg,#7658f5,#4779f5); color: #fff; border: 0; border-radius: 12px; }
footer { margin-top: 34px; padding: 26px 12px 10px; text-align: center; border-top: 1px solid rgba(113,132,190,.16); }
.footer-title { margin-bottom: 16px; color: #cbd5f5; font-size: 11px; font-weight: 700; letter-spacing: 1.8px; }
.social-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.social-links a { display: inline-flex; align-items: center; gap: 9px; padding: 10px 15px; color: #cbd5f5; background: rgba(23,31,56,.82); border: 1px solid rgba(113,132,190,.22); border-radius: 999px; text-decoration: none; font-size: 12px; font-weight: 600; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.social-links a:hover { transform: translateY(-2px); background: #202b49; border-color: #8067ff; }
.social-links svg { width: 18px; height: 18px; fill: currentColor; }
.footer-credit { color: #7180a4; font-size: 11px; }
@media (max-width: 760px) {
  .app { padding: 30px 14px 42px; }
  .workspace { grid-template-columns: 1fr; gap: 16px; }
  .guide-card { position: static; padding: 20px; }
  .guide-icon { width: 42px; height: 42px; margin-bottom: 14px; }
  .guide-card h2 { font-size: 20px; }
  .guide-description { font-size: 13px; }
  .inbox-content > .toolbar:first-child { flex-wrap: wrap; }
  .inbox-content > .toolbar:first-child input { flex-basis: 100%; }
  .social-links { gap: 8px; }
  .social-links a { padding: 9px 12px; }
}

/* Latar foto Bantarangin v2 (foto pengguna) */
body {
  background-color: #09090b;
  background-image: linear-gradient(rgba(9, 9, 11, 0.62), rgba(9, 9, 11, 0.62)), url('/bg.jpg');
  background-size: cover;
  background-position: center 65%;
  background-attachment: fixed;
}
