/* ==========================================================================
   twoshot.wtf - Ultra-Modern Neon Purple Glassmorphic Design System
   ========================================================================== */

:root {
  /* Deep Obsidian Purple Palette */
  --bg-primary: #07040d;
  --bg-secondary: #0e081a;
  --bg-card: rgba(20, 12, 36, 0.75);
  --bg-card-hover: rgba(30, 18, 54, 0.85);
  --bg-input: rgba(15, 9, 28, 0.85);
  --bg-elevated: #1a102e;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(168, 85, 247, 0.35);
  --border-focus: #a855f7;

  /* Vibrant Purples & Magentas */
  --accent-primary: #a855f7;
  --accent-primary-hover: #9333ea;
  --accent-purple: #c084fc;
  --accent-magenta: #e879f9;
  --accent-violet: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #a8a29e;
  --text-dim: #78716c;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px rgba(168, 85, 247, 0.3);
  --shadow-magenta: 0 0 25px rgba(217, 70, 239, 0.3);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Purple Orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.glow-orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #9333ea, #7c3aed);
  top: -120px;
  left: 10%;
}

.glow-orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #c084fc, #d946ef);
  top: 30%;
  right: 5%;
}

.glow-orb-3 {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, #6b21a8, #ec4899);
  bottom: -150px;
  left: 30%;
  opacity: 0.3;
}

/* App Container */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 24px 40px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  gap: 24px;
}

/* ==========================================================================
   Header & Custom Logo
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Custom Lightbulb Logo */
.brand-custom-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.45)) drop-shadow(0 0 20px rgba(168, 85, 247, 0.35));
  transition: transform 0.25s ease;
}

.brand-custom-img:hover {
  transform: scale(1.08) rotate(4deg);
}

.brand-logo-fallback {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.brand-icon {
  width: 26px;
  height: 26px;
  color: #ffffff;
}

.brand-text h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand-text h1 span {
  background: linear-gradient(135deg, #c084fc, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: 0.82rem;
  color: #a8a29e;
  font-weight: 500;
}

/* Buttons */
button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--transition-normal);
}

.btn-ghost-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(244, 63, 94, 0.08);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
}

.btn-ghost-danger:hover {
  color: #ffffff;
  background: rgba(244, 63, 94, 0.25);
  border-color: #f43f5e;
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}

.btn-ghost-danger i, .btn-ghost-danger svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Email Control Center Card (Purple Neon Glass)
   ========================================================================== */
.email-control-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  padding: 24px 28px;
}

.email-control-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #a855f7, #ec4899, transparent);
}

.email-control-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.email-header-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.email-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(217, 70, 239, 0.12);
  border: 1px solid rgba(217, 70, 239, 0.35);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  width: fit-content;
  font-size: 0.8rem;
  font-weight: 600;
  color: #f0abfc;
}

.timer-icon {
  width: 15px;
  height: 15px;
  color: var(--accent-magenta);
}

.countdown-digits {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
}

/* Email Display & Action Strip */
.email-display-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 12px 16px 12px 24px;
  gap: 16px;
  transition: border-color var(--transition-normal);
}

.email-display-container:hover {
  border-color: rgba(168, 85, 247, 0.45);
}

.email-address-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.mail-icon-prefix {
  width: 24px;
  height: 24px;
  color: var(--accent-purple);
  flex-shrink: 0;
}

.email-address-text {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: all;
  cursor: pointer;
}

.address-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-copy {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(217, 70, 239, 0.25));
  border-color: rgba(168, 85, 247, 0.45);
  color: #ffffff;
}

.btn-copy:hover {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: var(--shadow-glow);
}

.btn-copy.copied {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.btn-renew {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.35);
  color: #e9d5ff;
}

.btn-renew:hover {
  background: rgba(168, 85, 247, 0.28);
  border-color: #a855f7;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.35);
}

.btn-random:hover {
  color: var(--accent-magenta);
  border-color: rgba(217, 70, 239, 0.4);
}

.action-icon {
  width: 16px;
  height: 16px;
}

/* Control Footer (Sync info & 1s Cooldown Refresh Button) */
.control-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.sync-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sync-time-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.clock-icon {
  width: 15px;
  height: 15px;
  color: var(--text-dim);
}

.auto-polling-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.polling-spinner {
  width: 8px;
  height: 8px;
  border: 2px solid rgba(168, 85, 247, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ==========================================================================
   1-SECOND COOLDOWN REFRESH BUTTON (Purple Neon)
   ========================================================================== */
.btn-refresh {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #1e1136, #110922);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #f8fafc;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  min-width: 130px;
  user-select: none;
}

.btn-refresh:hover:not(:disabled) {
  border-color: #c084fc;
  background: linear-gradient(135deg, #2d1952, #1a0e33);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-refresh:active:not(:disabled) {
  transform: translateY(1px);
}

.refresh-icon {
  width: 17px;
  height: 17px;
  color: var(--accent-purple);
  flex-shrink: 0;
  margin-right: 2px;
  transition: transform 0.4s ease;
}

.btn-refresh.spinning .refresh-icon {
  animation: spin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-refresh:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  border-color: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Main Workspace (Gmail-Style Full-Width Single-View Layout)
   ========================================================================== */
.gmail-workspace {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   STATE 1: Full-Width Gmail-Style Inbox List View
   ========================================================================== */
.gmail-inbox-view {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 640px;
}

.inbox-toolbar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 8, 26, 0.5);
}

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

.inbox-badge-title h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.toolbar-inbox-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-purple);
}

.badge-counter {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.45);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.gmail-email-list {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Gmail-Style Email Row */
.gmail-email-row {
  display: grid;
  grid-template-columns: 240px 1fr 110px;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.gmail-email-row:hover {
  background: rgba(168, 85, 247, 0.12);
  border-bottom-color: rgba(168, 85, 247, 0.25);
}

.gmail-sender-col {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.gmail-sender-photo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  background: #140b22;
  border: 1px solid rgba(168, 85, 247, 0.4);
  padding: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.25);
}

.gmail-sender-name {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gmail-content-col {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.gmail-row-subject {
  font-weight: 700;
  color: #f8fafc;
  font-size: 0.92rem;
  flex-shrink: 0;
}

.gmail-row-sep {
  color: #64748b;
  flex-shrink: 0;
}

.gmail-row-snippet {
  color: #94a3b8;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmail-date-col {
  text-align: right;
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px;
  text-align: center;
  flex: 1;
}

.radar-container {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.radar-icon {
  width: 32px;
  height: 32px;
  color: var(--accent-purple);
  z-index: 2;
}

.radar-circle {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  animation: radar-pulse 3s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.circle-1 { width: 45px; height: 45px; animation-delay: 0s; }
.circle-2 { width: 70px; height: 70px; animation-delay: 1s; }
.circle-3 { width: 95px; height: 95px; animation-delay: 2s; }

@keyframes radar-pulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  50% { opacity: 0.4; }
  100% { transform: scale(1.4); opacity: 0; }
}

.empty-state h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.88rem;
  color: var(--text-dim);
  max-width: 280px;
  margin-bottom: 16px;
}

.empty-tip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.empty-tip i {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   STATE 2: Full-Width Gmail-Style Email Reader View
   ========================================================================== */
.gmail-reader-view {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 750px;
  animation: fadeIn 0.2s ease;
}

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

.reader-top-bar {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 8, 26, 0.5);
}

.btn-back-inbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #e9d5ff;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-back-inbox:hover {
  background: rgba(168, 85, 247, 0.32);
  border-color: #a855f7;
  color: #ffffff;
  transform: translateX(-3px);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.35);
}

.btn-back-inbox i, .btn-back-inbox svg {
  width: 16px;
  height: 16px;
}

/* Smart OTP Banner */
.otp-alert-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(217, 70, 239, 0.25));
  border-bottom: 1px solid rgba(168, 85, 247, 0.45);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.otp-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.otp-icon-bubble {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #a855f7, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.55);
}

.otp-icon-bubble i, .otp-icon-bubble svg {
  width: 22px;
  height: 22px;
}

.otp-details {
  display: flex;
  flex-direction: column;
}

.otp-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e9d5ff;
}

.otp-code-highlight {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.12em;
}

.btn-otp-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.btn-otp-copy:hover {
  background: #fdf4ff;
  transform: scale(1.03);
}

/* Reader Header Card */
.reader-header-card {
  padding: 24px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.view-subject {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.reader-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.reader-sender-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reader-sender-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  background: #140b22;
  border: 1.5px solid rgba(168, 85, 247, 0.5);
  padding: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}

.reader-sender-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reader-sender-name {
  font-weight: 700;
  color: #ffffff;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.reader-recipient-text {
  font-size: 0.84rem;
  color: var(--text-dim);
}

.reader-recipient-text span {
  color: #cbd5e1;
}

.reader-date-text {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Reader Body & IFrame */
.reader-body-card {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #08040f;
  display: flex;
  flex-direction: column;
  min-height: 680px;
}

.email-iframe {
  width: 100%;
  height: 100%;
  min-height: 680px;
  border: none;
  background: transparent;
  display: block;
}

/* ==========================================================================
   Toasts
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #1e1136;
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  pointer-events: auto;
  animation: slideInUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.toast-success {
  border-left: 4px solid var(--accent-emerald);
}

.toast.toast-info {
  border-left: 4px solid var(--accent-primary);
}

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

/* ==========================================================================
   Custom In-App Confirmation Modal (Replaces browser alert/confirm)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 8, 0.85);
  backdrop-filter: blur(14px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.confirm-modal-card {
  background: #130a21;
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 400px;
  padding: 28px 24px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(168, 85, 247, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.modal-bubble-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fb7185;
}

.modal-bubble-icon svg, .modal-bubble-icon i {
  width: 26px;
  height: 26px;
}

.modal-text-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.modal-text-content p {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
}

.modal-btn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

.btn-modal-cancel {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.btn-modal-danger {
  flex: 1;
  background: linear-gradient(135deg, #e11d48, #be123c);
  border: 1px solid #f43f5e;
  color: #ffffff;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
  transition: all 0.2s ease;
}

.btn-modal-danger:hover {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.6);
  transform: translateY(-1px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 16px 0 8px;
  font-weight: 600;
}

/* ==========================================================================
   Mobile-Friendly Responsive Styles
   ========================================================================== */
@media (max-width: 860px) {
  .app-container {
    padding: 16px 12px;
    gap: 20px;
  }

  .email-control-card {
    padding: 18px 16px;
  }

  .email-display-container {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 14px;
  }

  .email-address-wrapper {
    justify-content: flex-start;
    overflow: hidden;
  }

  .email-address-text {
    font-size: 1.1rem;
  }

  .address-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
  }

  .address-actions .btn-action {
    padding: 9px 6px;
    font-size: 0.8rem;
    justify-content: center;
  }

  .control-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .sync-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 0.8rem;
    gap: 8px;
  }

  .sync-time-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }

  .auto-polling-indicator {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .btn-refresh {
    width: 100%;
    justify-content: center;
  }

  /* Responsive Gmail Row (Stacked for mobile) */
  .gmail-email-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 16px;
  }

  .gmail-sender-col {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .gmail-date-col {
    text-align: right;
    font-size: 0.75rem;
  }

  .gmail-content-col {
    width: 100%;
    font-size: 0.85rem;
  }

  .inbox-toolbar {
    padding: 14px 16px;
  }

  .reader-top-bar {
    padding: 12px 16px;
  }

  .reader-header-card {
    padding: 18px 16px;
  }

  .view-subject {
    font-size: 1.25rem;
  }

  .reader-body-card {
    min-height: 520px;
  }

  .email-iframe {
    min-height: 520px;
  }
}

@media (max-width: 480px) {
  .brand {
    gap: 10px;
  }

  .brand-text h1 {
    font-size: 1.4rem;
  }

  .brand-custom-img {
    width: 40px;
    height: 40px;
  }

  .email-timer-pill {
    font-size: 0.75rem;
    padding: 4px 12px;
  }

  .email-address-text {
    font-size: 0.98rem;
  }

  .address-actions {
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 6px;
  }

  .address-actions .btn-action {
    padding: 8px 4px;
    font-size: 0.74rem;
    gap: 4px;
  }

  .action-icon {
    width: 14px;
    height: 14px;
  }
}
