/* ========================================================
   RZERO MAIL — HIGH-VOLTAGE NEO-BRUTALISM (TEMPGUN SPEC)
   Solid 2.5px-3px Black Borders, Hard 4px Shadows,
   Butter Yellow, Bubblegum Pink, Mint Green, Warm Cream Canvas
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800;900&family=JetBrains+Mono:wght@600;700;800&family=Space+Grotesk:wght@700;800;900&display=swap');

:root {
  --canvas: #FAF7F2;
  --surface: #FFFFFF;
  --border: #121316;
  --border-w: 2.5px;
  --shadow-color: #121316;
  --shadow-sm: 2px 2px 0px var(--shadow-color);
  --shadow-md: 4px 4px 0px var(--shadow-color);
  --shadow-lg: 6px 6px 0px var(--shadow-color);

  /* Authentic TempGun Colors */
  --yellow: #FFE81D;
  --yellow-light: #FFF480;
  --pink: #FF70A6;
  --pink-light: #FFA1C5;
  --pink-card: #FF70A6;
  --mint: #70E0A5;
  --mint-light: #B2F2D1;
  --cyan: #70D6FF;
  --purple: #C8B6FF;
  --red: #FF4757;
  --red-light: #FFD2D7;

  --text: #121316;
  --text-muted: #57595E;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--canvas);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* TOP YELLOW BANNER (TEMPGUN HEADER) */
.header-banner {
  background-color: var(--yellow);
  border-bottom: var(--border-w) solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.header-logo-box {
  width: 42px;
  height: 42px;
  background-color: var(--pink);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: #fff;
}

.header-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--text);
}

.header-pill {
  background-color: #fff;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

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

/* MAIN CONTAINER (Centered Single Column) */
.main-wrapper {
  max-width: 640px;
  margin: 24px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ========================================================
   TEMPGUN PINK CONTROL CARD (TIERS 1 - 4)
   ======================================================== */
.hero-pink-card {
  background-color: var(--pink-card);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Tier 1: Top Status Row */
.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.pill-white {
  background-color: #fff;
  color: var(--text);
}

.pill-mint {
  background-color: var(--mint);
  color: var(--text);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #065F46;
  border-radius: 50%;
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Tier 2: Email Display Input Field */
.email-box-container {
  width: 100%;
}

.email-input-display {
  width: 100%;
  background-color: #fff;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.2px;
  overflow-x: auto;
  white-space: nowrap;
  user-select: all;
}

/* Tier 3: Dual Stat Counters (Split Grid) */
.dual-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-split-card {
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-yellow {
  background-color: var(--yellow-light);
}

.stat-mint {
  background-color: var(--mint-light);
}

.stat-split-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
}

.stat-split-val {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 1.45rem;
  color: var(--text);
  line-height: 1.2;
}

/* Tier 4: Action Buttons Grid */
.actions-row-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.btn-brutal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #fff;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 10px 8px;
  font-weight: 800;
  font-size: 0.84rem;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  user-select: none;
}

.btn-brutal:hover {
  background-color: #FFFBE6;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--border);
}

.btn-brutal:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0 var(--border);
}

.icon-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.btn-brutal .icon-svg {
  transition: transform 0.15s ease;
}

.btn-brutal:hover .icon-svg {
  transform: scale(1.12);
}

.btn-brutal-yellow:hover .icon-svg {
  transform: rotate(30deg);
}

.btn-brutal-yellow { background-color: var(--yellow); }
.btn-brutal-mint { background-color: var(--mint); }
.btn-brutal-pink { background-color: var(--pink-light); }
.btn-brutal-red { background-color: var(--red-light); color: var(--red); }

/* ========================================================
   AUTO-REFRESH CAPSULE BAR
   ======================================================== */
.auto-refresh-capsule {
  background-color: #fff;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auto-toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.switch-pill {
  width: 44px;
  height: 24px;
  background-color: var(--mint);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
}

.switch-knob {
  width: 16px;
  height: 16px;
  background-color: #fff;
  border: 2px solid var(--border);
  border-radius: 50%;
  position: absolute;
  top: 1px;
  right: 2px;
  transition: right 0.15s ease;
}

.auto-label {
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
}

.countdown-badge {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========================================================
   INBOX SECTION ("Pesan Masuk")
   ======================================================== */
.inbox-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inbox-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.inbox-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inbox-badge-icon {
  width: 32px;
  height: 32px;
  background-color: var(--yellow);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.inbox-heading-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--text);
}

.inbox-count-pill {
  background-color: #fff;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  font-weight: 900;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

/* Inbox Card Box */
.inbox-card-box {
  background-color: #fff;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-height: 260px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.empty-inbox-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  text-align: center;
  gap: 12px;
}

.empty-badge-circle {
  width: 60px;
  height: 60px;
  background-color: var(--yellow);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.empty-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
}

.empty-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  max-width: 320px;
}

/* Message Item inside Inbox */
.msg-item {
  background-color: #fff;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.msg-item:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--border);
  background-color: #FFFDF5;
}

.msg-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.msg-from {
  font-weight: 800;
  font-size: 0.88rem;
}

.msg-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

.msg-subject {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.msg-otp-tag {
  background-color: var(--yellow);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 4px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(18, 19, 22, 0.6);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-content {
  background-color: #fff;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  overflow: hidden;
  animation: modalPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  background-color: var(--yellow);
  border-bottom: var(--border-w) solid var(--border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
}

.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 80vh;
  overflow-y: auto;
}

.input-brutal {
  width: 100%;
  background-color: #fff;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  outline: none;
  box-shadow: var(--shadow-sm);
}

.input-brutal:focus {
  background-color: #FFFDEB;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 380px;
}

.toast {
  background-color: var(--yellow);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 12px 16px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text);
  text-align: center;
  animation: toastPop 0.15s ease-out;
}

.toast-error { background-color: var(--red-light); color: var(--red); }
.toast-mint { background-color: var(--mint); }

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

@media (max-width: 480px) {
  .actions-row-grid { grid-template-columns: repeat(2, 1fr); }
  .header-title { font-size: 1.25rem; }
}

/* ========================================================
   NEO-BRUTALIST ADS CONTAINER
   ======================================================== */
.ad-slot-wrapper {
  display: none;
  background-color: #FFFFFF;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.ad-slot-wrapper:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--border);
}

.ad-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: var(--yellow);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ad-manual-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
}

.ad-manual-thumb {
  width: 58px;
  height: 58px;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  background-color: var(--yellow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.ad-manual-info {
  flex: 1;
  min-width: 0;
}

.ad-manual-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-manual-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-manual-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--mint);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  color: var(--text);
}

@media (max-width: 480px) {
  .ad-manual-card {
    flex-wrap: wrap;
  }
  .ad-manual-btn {
    width: 100%;
    justify-content: center;
  }
}
