/* --- GENERAL RESET & VARIABLE TOKENS --- */
:root {
  --bg-dark: #07070a;
  --bg-card: rgba(18, 18, 30, 0.55);
  --border-glass: rgba(255, 255, 255, 0.045);
  --accent-primary: #4d7cff;
  --accent-secondary: #8a2be2;
  --accent-glow: rgba(77, 124, 255, 0.25);
  --text-primary: #f3f3f6;
  --text-muted: #8d8d9b;
  --font-main: 'Outfit', sans-serif;
  --spring-easing: cubic-bezier(0.34, 1.56, 0.64, 1);
  --fluid-easing: cubic-bezier(0.25, 1, 0.5, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  font-family: var(--font-main);
  background: linear-gradient(-45deg, #07070a, #111122, #05050f, #160a26);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background 0.8s cubic-bezier(0.25, 1, 0.5, 1), color 0.5s ease;
}

.no-scroll {
  overflow: hidden !important;
}

/* Background Physics Particle Canvas */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
}

/* Background Glowing Orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: screen;
}

body.light-theme .glow-orb {
  opacity: 0.08;
  filter: blur(160px);
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(77, 124, 255, 0.8) 0%, rgba(77, 124, 255, 0) 70%);
  top: -10%;
  left: -10%;
  animation: floatOrb1 20s infinite alternate ease-in-out;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.8) 0%, rgba(138, 43, 226, 0) 70%);
  bottom: -15%;
  right: -10%;
  animation: floatOrb2 25s infinite alternate ease-in-out;
  animation-delay: -5s;
}

.orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(255, 74, 150, 0.7) 0%, rgba(255, 74, 150, 0) 70%);
  top: 40%;
  right: 15%;
  animation: floatOrb3 18s infinite alternate ease-in-out;
  animation-delay: -2s;
}

.orb-4 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.6) 0%, rgba(0, 242, 254, 0) 70%);
  bottom: 10%;
  left: 20%;
  animation: floatOrb4 22s infinite alternate ease-in-out;
  animation-delay: -8s;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, 80px) scale(1.15); }
  100% { transform: translate(-50px, 50px) scale(0.9); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-120px, -70px) scale(0.85); }
  100% { transform: translate(80px, -110px) scale(1.1); }
}

@keyframes floatOrb3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-80px, 120px) scale(1.2); }
  100% { transform: translate(60px, -40px) scale(0.95); }
}

@keyframes floatOrb4 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(90px, -90px) scale(0.9); }
  100% { transform: translate(-70px, 80px) scale(1.1); }
}

/* Glassmorphism Card Utility */
.glassmorphic {
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border-radius: 20px;
}

/* --- TYPEWRITER WELCOME INTRO --- */
.portal-intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  background: #07070a;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease-in-out;
}

.portal-intro.active {
  opacity: 1;
  pointer-events: all;
}

.intro-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.intro-text {
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(to right, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  min-height: 3.5rem;
  border-right: 3px solid var(--accent-primary);
  animation: caretPulse 0.75s step-end infinite;
  padding-right: 6px;
  white-space: pre-line;
}

@keyframes caretPulse {
  50% { border-color: transparent; }
}

.intro-loader {
  width: 180px;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.intro-loader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
  transition: width 2.5s cubic-bezier(0.1, 0.85, 0.25, 1);
}

/* --- HEADPHONES TOAST ALERT --- */
.toast-alert {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(18, 18, 30, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--spring-easing), opacity 0.4s;
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
}

.toast-alert.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- SECURE EMAIL DECRYPTION MODAL --- */
.password-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2500;
  background: rgba(4, 4, 10, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--fluid-easing);
}

.password-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.password-modal-card {
  width: 90%;
  max-width: 440px;
  padding: 2.6rem 2.4rem;
  text-align: center;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.4s var(--spring-easing), opacity 0.3s ease;
  background: rgba(18, 18, 30, 0.88);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 25px 65px rgba(0, 0, 0, 0.6),
    0 0 35px rgba(77, 124, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  border-radius: 24px;
}

.password-modal-overlay.active .password-modal-card {
  transform: scale(1) translateY(0);
}

.modal-lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(77, 124, 255, 0.15), rgba(138, 43, 226, 0.15));
  border: 1px solid rgba(77, 124, 255, 0.3);
  color: var(--accent-primary);
  margin-bottom: 1.1rem;
  box-shadow: 0 8px 20px rgba(77, 124, 255, 0.2);
}

body.light-theme .modal-lock-badge {
  background: rgba(77, 124, 255, 0.1);
  border-color: rgba(77, 124, 255, 0.25);
  box-shadow: 0 6px 16px rgba(77, 124, 255, 0.12);
}

.password-modal-card h3 {
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.password-modal-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.password-modal-actions {
  display: flex;
  gap: 0.9rem;
  justify-content: flex-end;
  margin-top: 1.4rem;
}

.password-modal-card.shake {
  animation: shakeAlert 0.4s ease;
}

body.light-theme .password-modal-overlay {
  background: rgba(220, 225, 238, 0.75);
}

body.light-theme .password-modal-card {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 
    0 25px 65px rgba(0, 0, 0, 0.12),
    0 8px 25px rgba(77, 124, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

body.light-theme .password-modal-card h3 {
  color: #0f172a !important;
}

body.light-theme .password-modal-card p {
  color: #64748b !important;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* --- BUTTONS & INTERACTIVE ELEMENTS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  outline: none;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  box-shadow: 0 8px 24px rgba(77, 124, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(77, 124, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

#logout-btn:hover {
  background: rgba(255, 74, 74, 0.15) !important;
  border-color: rgba(255, 74, 74, 0.35) !important;
  color: #ff4a4a !important;
  box-shadow: 0 0 15px rgba(255, 74, 74, 0.2) !important;
}

.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

/* --- THEME TOGGLE BUTTONS (Separate light & dark buttons) --- */
.theme-buttons-container {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 3px;
  border-radius: 20px;
  gap: 0.2rem;
}

.theme-btn-icon-only {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--fluid-easing);
  outline: none;
}

.theme-btn-icon-only:hover {
  color: #fff;
}

.theme-btn-icon-only.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(77, 124, 255, 0.35);
}

.theme-icon-new {
  width: 16px;
  height: 16px;
}

/* --- SECTIONS --- */
section {
  display: none;
  width: 100%;
  max-width: 1200px;
  padding: 2rem;
  z-index: 1;
}

section.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* --- LOGIN VIEW --- */
#login-section {
  min-height: 100vh;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 2.8rem 2.5rem;
  background: rgba(18, 18, 30, 0.78);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 30px 70px rgba(0, 0, 0, 0.55),
    0 0 35px rgba(138, 43, 226, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-radius: 24px;
}

body.light-theme .login-card {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.08),
    0 4px 20px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 #ffffff !important;
}

.login-header {
  text-align: center;
  margin-bottom: 2.2rem;
}

.login-header h2 {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

body.light-theme .login-header h2 {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

body.light-theme .login-header p {
  color: #64748b;
}

.form-group {
  margin-bottom: 1.4rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

body.light-theme .form-group label {
  color: #475569;
}

.form-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.9rem 1.15rem;
  font-family: var(--font-main);
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.form-group input:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.form-group input:focus {
  border-color: #4d7cff;
  box-shadow: 0 0 0 3.5px rgba(77, 124, 255, 0.25), 0 4px 15px rgba(77, 124, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
}

body.light-theme .form-group input {
  background: #ffffff !important;
  border: 1.5px solid #d1d5db !important;
  color: #0f172a !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .form-group input:hover {
  border-color: #9ca3af !important;
}

body.light-theme .form-group input:focus {
  border-color: #4d7cff !important;
  box-shadow: 0 0 0 3.5px rgba(77, 124, 255, 0.18), 0 2px 8px rgba(77, 124, 255, 0.12) !important;
  background: #ffffff !important;
}

.password-toggle-btn {
  border-radius: 8px;
  transition: all 0.2s ease;
}

.password-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

body.light-theme .password-toggle-btn {
  color: #64748b !important;
}

body.light-theme .password-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}

.error-msg {
  color: #ff4a4a;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  min-height: 1.2rem;
  text-align: center;
}

/* --- MAIN APP HEADER --- */
.app-header {
  width: 100%;
  max-width: 1100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- MAILBOX DASHBOARD GRID --- */
.workspace {
  width: 100%;
  min-height: calc(100vh - 100px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

.mailbox-dashboard,
body.light-theme .mailbox-dashboard {
  width: 100%;
  max-width: 1100px;
  height: auto;
  min-height: 560px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* --- MAILBOX LIST PANE --- */
.mailbox-list-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mailbox-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.mailbox-list-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Mailbox scrollable email cards list */
.mailbox-list {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-right: 0.5rem;
}

.mailbox-list::-webkit-scrollbar {
  width: 6px;
}

.mailbox-list::-webkit-scrollbar-track {
  background: transparent;
}

.mailbox-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.mailbox-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Email Card Item */
.email-card {
  position: relative;
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: transform 0.4s var(--spring-easing), box-shadow 0.4s var(--spring-easing), border-color 0.3s, background-color 0.3s;
  outline: none;
  user-select: none;
  text-align: left;
}

.email-card:hover {
  transform: translateY(-3px) scale(1.015);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25), 0 0 15px rgba(77, 124, 255, 0.05);
}

.email-card:focus-visible {
  border-color: var(--accent-primary);
  background: rgba(77, 124, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(77, 124, 255, 0.2), 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  position: relative;
}

.card-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Unread indicator dot */
.unread-indicator {
  position: absolute;
  top: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background: #ff4a4a;
  border: 2px solid #0a0a14;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 74, 74, 0.6);
}

.card-content {
  flex-grow: 1;
  min-width: 0;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.card-sender {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.email-card.unread .card-sender {
  font-weight: 700;
}

.card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-subject {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-card.unread .card-subject {
  font-weight: 600;
  color: #fff;
}

.card-snippet {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.clip-icon {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
}

.star-indicator {
  width: 12px;
  height: 12px;
  color: #ffd700;
  fill: currentColor;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s;
}

.email-card.starred .star-indicator {
  opacity: 1;
}

/* Light Sweep Sheen overlay class triggered right before opening */
@keyframes lightSweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.light-sweep-active::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.16) 45%, rgba(255, 255, 255, 0.28) 50%, rgba(255, 255, 255, 0.16) 55%, transparent 70%);
  background-size: 200% 100%;
  animation: lightSweep 0.8s ease-out forwards;
  pointer-events: none;
  z-index: 10;
  border-radius: inherit;
}

/* --- PREMIUM EMAIL DETAIL OVERLAY --- */
.email-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--fluid-easing);
}

.email-detail-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.overlay-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 3, 5, 0.75);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: backdrop-filter 0.6s var(--fluid-easing), -webkit-backdrop-filter 0.6s var(--fluid-easing);
}

.email-detail-overlay.active .overlay-backdrop {
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

/* Dual Box Split Layout */
.detail-split-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  width: 90%;
  max-width: 840px;
  height: 86vh;
  max-height: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 101;
}

/* Left Box (Content) */
.detail-left-box {
  flex: 1;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--border-glass);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  transform: scale(0.95) translateY(16px);
  opacity: 0;
  transition: transform 0.4s var(--fluid-easing), opacity 0.4s ease;
}

.email-detail-overlay.active .detail-left-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Right Box (Profile) */
.detail-right-box {
  width: 320px;
  height: 100%;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.2rem 1.8rem;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.5s var(--fluid-easing), transform 0.5s var(--fluid-easing);
}

.email-detail-overlay.active .detail-right-box {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.25s;
}

/* Inner content scrollable layout */
.detail-scrollable {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2.5rem 2.8rem;
  width: 100%;
  box-sizing: border-box;
  overscroll-behavior: contain !important;
}

.detail-scrollable::-webkit-scrollbar {
  width: 6px;
}

.detail-scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

/* Close button on Left Box */
.close-detail-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 105;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  outline: none;
}

.close-detail-btn:hover, .close-detail-btn:focus-visible {
  color: #ff4a4a;
  background: rgba(255, 74, 74, 0.1);
  border-color: rgba(255, 74, 74, 0.2);
  transform: rotate(90deg);
}

/* --- DEDICATED PANEL CONTAINERS --- */
.detail-view-panel {
  width: 100%;
}

.detail-view-panel.hidden {
  display: none !important;
}

/* ==========================================================================
   VIEW 1: SPECIAL CONFIDENTIAL LETTER STYLES (PAPER-THEMED)
   ========================================================================== */
.letter-view-panel .detail-header-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  text-align: left;
}

.letter-view-panel .detail-subject-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.letter-view-panel .detail-badge {
  display: inline-block;
  background: rgba(77, 124, 255, 0.12);
  border: 1px solid rgba(77, 124, 255, 0.25);
  color: var(--accent-primary);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 6px;
  align-self: flex-start;
}

.letter-view-panel .detail-subject {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.4px;
}

body.light-theme .letter-view-panel .detail-subject {
  color: #0f172a;
}

/* Parallel Header Row (Single Unified Row: Sender Info on Left + Audio Player on Right) */
.letter-view-panel .detail-sender-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 1rem !important;
  width: 100% !important;
  margin: 0.6rem 0 !important;
  padding: 0.4rem 0 !important;
}

.letter-view-panel .detail-sender-info {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.85rem !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.letter-view-panel .detail-avatar,
.detail-avatar {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)) !important;
  color: #fff !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  border: 2px solid rgba(77, 124, 255, 0.4) !important;
  box-shadow: 0 4px 14px rgba(77, 124, 255, 0.3) !important;
}

.letter-view-panel .detail-avatar img,
.detail-avatar img {
  width: 100% !important;
  height: 100% !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
}

.letter-view-panel .detail-sender-meta {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 3px !important;
  min-width: 0 !important;
}

.letter-view-panel .detail-sender-name {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
}

body.light-theme .letter-view-panel .detail-sender-name {
  color: #0f172a !important;
}

.letter-view-panel .detail-sender-email {
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
  line-height: 1.2 !important;
}

/* Audio Player Deck on the Right Side (Parallel on the same line) */
.letter-view-panel .reader-controls.gemini-audio-deck {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.65rem !important;
  background: rgba(18, 18, 30, 0.75) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 5px 8px !important;
  margin: 0 !important;
  margin-left: auto !important;
  width: fit-content !important;
  max-width: none !important;
  flex-shrink: 0 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.light-theme .letter-view-panel .reader-controls.gemini-audio-deck {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

/* Play/Pause Button Wrapper & Compact Play Button */
.audio-play-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.compact-play-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4d7cff 0%, #8a2be2 100%);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(77, 124, 255, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.compact-play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 5px 18px rgba(77, 124, 255, 0.6), 0 0 10px rgba(138, 43, 226, 0.45);
}

.compact-play-btn:active {
  transform: scale(0.95);
}

.compact-play-btn svg {
  width: 16px;
  height: 16px;
  }

/* Language Switcher Pills (Short TE / EN Only) */
.compact-lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
  flex-shrink: 0;
}

.compact-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 4px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  white-space: nowrap;
}

.compact-lang-btn .lang-tag {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.compact-lang-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.compact-lang-btn.active {
  background: linear-gradient(135deg, rgba(77, 124, 255, 0.45), rgba(138, 43, 226, 0.45));
  border: 1px solid rgba(77, 124, 255, 0.5);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(77, 124, 255, 0.3);
}

body.light-theme .compact-lang-switcher {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .compact-lang-btn {
  color: #64748b;
}

body.light-theme .compact-lang-btn:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
}

body.light-theme .compact-lang-btn.active {
  background: #ffffff;
  border-color: rgba(77, 124, 255, 0.4);
  color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(77, 124, 255, 0.15);
}

/* Confidential Warning Banner */
/* Letter Quotation Header Banner */
.letter-view-panel .confidential-banner,
.letter-view-panel .letter-quote-banner {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  font-style: italic !important;
  color: #e0c3fc !important;
  background: rgba(138, 43, 226, 0.12) !important;
  border: 1px solid rgba(192, 132, 252, 0.28) !important;
  padding: 8px 18px !important;
  border-radius: 50px !important;
  margin-top: 0.3rem !important;
  margin-bottom: 1.1rem !important;
  width: fit-content !important;
  max-width: 100% !important;
  box-shadow: 0 4px 18px rgba(138, 43, 226, 0.15) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  line-height: 1.4 !important;
}

.letter-quote-banner .quote-sparkle-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #f472b6;
}

body.light-theme .letter-view-panel .confidential-banner,
body.light-theme .letter-view-panel .letter-quote-banner {
  color: #6d28d9 !important;
  background: rgba(138, 43, 226, 0.07) !important;
  border-color: rgba(138, 43, 226, 0.22) !important;
  box-shadow: 0 4px 14px rgba(138, 43, 226, 0.08) !important;
}

body.light-theme .letter-quote-banner .quote-sparkle-icon {
  color: #db2777 !important;
}

/* ==========================================================================
   AUTHENTIC CLEAN WHITE PAPER-SHEET LETTER CONTAINER STYLING
   ========================================================================== */
.letter-paper-sheet {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  background: #ffffff !important;
  background-image: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 18px !important;
  padding: 2.2rem 2.4rem !important;
  margin-top: 0.8rem !important;
  margin-bottom: 1.5rem !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15), 0 3px 12px rgba(0, 0, 0, 0.08) !important;
  color: #1e293b !important;
}

body.light-theme .letter-paper-sheet {
  background: #ffffff !important;
  background-image: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%) !important;
  border-color: rgba(203, 213, 225, 0.8) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.06), inset 0 0 35px rgba(255, 255, 255, 0.8) !important;
}

.letter-paper-header-accent {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.paper-vintage-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(241, 245, 249, 0.8);
  padding: 3px 9px;
  border-radius: 6px;
}

.paper-rule-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.8), transparent);
}

.letter-view-panel .detail-body-text {
  font-size: 1.15rem;
  line-height: 2.1;
  color: #1e293b !important;
  text-align: left;
  margin: 0;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  letter-spacing: 0.2px;
  word-spacing: 1px;
}

.letter-paragraph {
  margin-bottom: 1.8rem;
  line-height: 2.1;
  font-size: 1.15rem;
  text-align: left;
  letter-spacing: 0.2px;
  color: #1e293b !important;
}

.letter-paragraph:last-child {
  margin-bottom: 0.5rem;
}

/* Word tokens on paper sheet - Clean High Contrast & Smooth Active Highlight */
.letter-paper-sheet .word,
.detail-body-text .word {
  position: relative;
  display: inline;
  padding: 2px 3px;
  margin: 0;
  border-radius: 4px;
  color: #64748b !important;
  transition: color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
  cursor: default;
  font-weight: 500 !important;
  line-height: inherit;
  box-sizing: border-box;
}

.letter-paper-sheet .word:hover,
.detail-body-text .word:hover {
  color: #0f172a !important;
}

.letter-paper-sheet .word.active,
.detail-body-text .word.active {
  color: #1e40af !important;
  background: rgba(59, 130, 246, 0.2) !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3) !important;
  font-weight: 600 !important;
  border-radius: 4px;
  text-shadow: none !important;
}

.letter-paper-sheet .word.read,
.detail-body-text .word.read {
  color: #0f172a !important;
  font-weight: 500 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* ==========================================================================
   DUAL ACTION RESPONSE BUTTONS (LEFT: RED / RIGHT: GREEN) - ROCK-SOLID RESPONSIVE
   ========================================================================== */
.letter-cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2.4rem !important;
  padding-top: 2rem !important;
  border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
  background: radial-gradient(ellipse at top, rgba(77, 124, 255, 0.05) 0%, transparent 70%);
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  position: relative;
}

.letter-cta-container::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(77, 124, 255, 0.6), transparent);
}

.letter-action-buttons-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.9rem !important;
  width: 100% !important;
  max-width: 540px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

.letter-action-btn {
  flex: 1 1 210px !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.55rem !important;
  padding: 0.82rem 1.15rem !important;
  border-radius: 30px !important;
  font-family: var(--font-main) !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  cursor: pointer !important;
  letter-spacing: 0.3px !important;
  box-sizing: border-box !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: break-word !important;
}

.letter-action-btn .action-btn-svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
}

/* Left Button: Red / Not Interested */
.letter-action-btn.btn-not-interested {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  box-shadow: 0 5px 18px rgba(239, 68, 68, 0.38) !important;
}

.letter-action-btn.btn-not-interested:hover {
  transform: translateY(-2px) !important;
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5) !important;
}

.letter-action-btn.btn-not-interested:active {
  transform: scale(0.97) !important;
}

/* Right Button: Green / Interested */
.letter-action-btn.btn-interested {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 5px 18px rgba(16, 185, 129, 0.38) !important;
}

.letter-action-btn.btn-interested:hover {
  transform: translateY(-2px) !important;
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5) !important;
}

.letter-action-btn.btn-interested:active {
  transform: scale(0.97) !important;
}

.letter-cta-subtext {
  font-size: 0.78rem !important;
  color: #78644e !important;
  margin-top: 0.85rem !important;
  text-align: center !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  line-height: 1.4 !important;
}

@media (max-width: 768px) {
  .detail-scrollable {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2.5rem 2.8rem;
  width: 100%;
  box-sizing: border-box;
  overscroll-behavior: contain !important;
}
  .detail-subject {
    font-size: 1.6rem;
  }
  .detail-timestamp {
    display: block;
    margin-left: 0;
    margin-top: 0.2rem;
  }
  .detail-sender-info {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .mailbox-dashboard {
    height: auto;
    overflow: visible;
  }
  .mailbox-list-pane {
    height: auto;
    overflow: visible;
    padding: 1rem 0.5rem;
  }
}

/* --- REDESIGN LAYOUT UPGRADES --- */

/* Water ripple transition overlay style */
.theme-ripple-overlay {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%) scale(0);
  border: 8px solid rgba(77, 124, 255, 0.4);
  box-shadow: 0 0 100px rgba(77, 124, 255, 0.3), inset 0 0 100px rgba(77, 124, 255, 0.3);
  background: rgba(77, 124, 255, 0.03);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  width: 100vmax;
  height: 100vmax;
}

.theme-ripple-overlay.active {
  transform: translate(-50%, -50%) scale(2.5) !important;
  opacity: 1 !important;
}

.theme-ripple-overlay.animating {
  pointer-events: auto;
}

/* 9:16 portrait cards grid container */
.cards-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.aspect-9-16-card {
  width: 295px;
  height: 524px; /* Perfect 9:16 aspect ratio: 295 * 16 / 9 = 524.4 */
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.4s var(--spring-easing), box-shadow 0.4s var(--spring-easing), border-color 0.3s;
  cursor: pointer;
  outline: none;
  text-align: left;
}

.aspect-9-16-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-primary);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(77, 124, 255, 0.15);
}

.aspect-9-16-card:focus-visible {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(77, 124, 255, 0.25), 0 25px 50px rgba(0, 0, 0, 0.4);
}

/* Card content layout */
.card-9-16-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-9-16-badge {
  background: rgba(77, 124, 255, 0.1);
  border: 1px solid rgba(77, 124, 255, 0.2);
  color: var(--accent-primary);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 5px;
  align-self: flex-start;
}

.card-9-16-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

body.light-theme .card-9-16-title {
  color: #1a1a2e;
}

.card-9-16-body {
  flex-grow: 1;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.info-details-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.info-label {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 4.5rem;
}

.info-value {
  color: var(--text-muted);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.card-9-16-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-9-16-action-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.arrow-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--fluid-easing);
}

.aspect-9-16-card:hover .arrow-icon {
  transform: translateX(4px);
}

/* Speech & Language controls inline inside Left Box Audio Controller */
.audio-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0;
  margin-top: 0.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.8rem;
  gap: 1rem;
}

body.light-theme .audio-controls-row {
  border-top-color: rgba(0, 0, 0, 0.04);
}

.voice-switcher {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
}

.voice-btn {
  background: none;
  border: none;
  font-family: var(--font-main);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.35rem 0.8rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.voice-btn.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(77, 124, 255, 0.2);
}

body.light-theme .voice-switcher {
  background: rgba(0, 0, 0, 0.04);
}

/* Headphones Animated Alert Overlay styling */
.headphones-anim-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 3, 5, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--fluid-easing);
}

.headphones-anim-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.headphones-anim-card {
  padding: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  border-radius: 24px;
  max-width: 320px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.5s var(--spring-easing);
}

.headphones-anim-overlay.active .headphones-anim-card {
  transform: scale(1);
}

.headphones-svg-container {
  color: var(--accent-primary);
  width: 100px;
  height: 100px;
}

.headphones-icon-anim {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 15px rgba(77, 124, 255, 0.5));
}

.headphones-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
}

body.light-theme .headphones-text {
  color: #1a1a2e;
}

/* Animations for sound waves and headphones pulsing */
@keyframes pulseCups {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.headphones-icon-anim rect {
  transform-origin: 50% 50%;
  animation: pulseCups 1s infinite ease-in-out;
}

@keyframes waveRipple {
  0% { transform: scale(0.6); opacity: 0; }
  50% { opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.wave-left {
  transform-origin: 6px 61px;
  animation: waveRipple 1.6s infinite ease-out;
}

.wave-right {
  transform-origin: 94px 61px;
  animation: waveRipple 1.6s infinite ease-out;
}

.wave-2 {
  animation-delay: 0.8s;
}

/* Logout success notification message style */
.success-msg {
  color: #2ed573;
  font-size: 0.9rem;
  margin-top: 0.8rem;
  margin-bottom: 0.2rem;
  text-align: center;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.success-msg.hidden {
  display: none !important;
}

/* --- PREMIUM STYLING ADJUSTMENTS & ENHANCEMENTS --- */

/* Single Toggler Theme Button styling */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: transform 0.3s var(--spring-easing), background 0.3s, border-color 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.theme-toggle-btn:hover {
  transform: scale(1.08) rotate(15deg);
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
}

body.light-theme .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.03);
}

.theme-icon {
  transition: opacity 0.3s ease;
}

.theme-icon.hidden {
  display: none;
}

/* Fix Light Theme Whiteout & Lag */
body.light-theme {
  --bg-dark: #f5f5fa;
  --bg-card: rgba(255, 255, 255, 0.75);
  --border-glass: rgba(0, 0, 0, 0.06);
  --text-primary: #121221;
  --text-muted: #6b6b7a;
  background: #f5f5fa; /* Fix linear gradient lag on low-end screens */
  animation: none; /* Disable expensive animations in light theme to resolve lag */
}

/* Info Profile Details Custom Styles */
.info-profile-detail-card {
  animation: fadeIn 0.4s ease forwards;
}

.details-glass-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.light-theme .details-glass-box {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

body.light-theme .details-glass-box > div {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .details-glass-box span:first-child {
  color: #64748b !important;
  font-weight: 600 !important;
}

body.light-theme .details-glass-box span:last-child,
body.light-theme .details-glass-box a {
  color: #0f172a !important;
  font-weight: 600 !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Compact Language buttons */
.compact-lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s var(--fluid-easing);
  user-select: none;
}
.compact-lang-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}
.compact-lang-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(77, 124, 255, 0.3);
}
body.light-theme .compact-lang-btn {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-muted);
}
body.light-theme .compact-lang-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}
body.light-theme .compact-lang-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

/* ==========================================================================
   NEXT-GEN 3D CAROUSEL & COVERFLOW SYSTEM
   Engineered with Hardware-Accelerated 3D Depth, Perspective & Fixed Spacing
   ========================================================================== */

.carousel-wrapper {
  width: 100%;
  max-width: 950px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin: 0 auto;
  perspective: 1400px;
  perspective-origin: center center;
}

.cards-viewport {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  perspective: 1400px;
  perspective-origin: center center;
}

.carousel-arrow {
  display: none !important;
}

.carousel-dots {
  display: none !important;
}

@media (max-width: 768px) {
  .carousel-wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    perspective: 1200px !important;
    perspective-origin: center center !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
  }

  .cards-viewport {
    width: 290px !important;
    max-width: calc(100vw - 100px) !important;
    overflow: hidden !important; /* Perfect single card frame - prevents cards bleeding & merging! */
    border-radius: 24px !important;
    position: relative !important;
    margin: 0 auto !important;
    padding: 8px 0 !important;
    perspective: 1200px !important;
    perspective-origin: center center !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }

  .cards-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 40px !important; /* FIXED DISTANCE: Generous 40px gap between cards - NEVER MERGED! */
    padding: 6px 0 !important;
    margin: 0 !important;
    width: max-content !important;
    transform-style: preserve-3d !important;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.35, 1) !important;
    will-change: transform !important;
  }

  .aspect-9-16-card {
    flex: 0 0 280px !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    height: min(64vh, 475px) !important;
    padding: 1.6rem 1.3rem !important;
    border-radius: 24px !important;
    box-sizing: border-box !important;
    display: flex !important;
    transform-style: preserve-3d !important;
    backface-visibility: hidden !important;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.35, 1), box-shadow 0.35s ease, opacity 0.35s ease, border-color 0.3s ease !important;
    will-change: transform, box-shadow, opacity !important;
  }

  /* 3D Active Card - Front & Center, Full Opacity, Neon Glow */
  .aspect-9-16-card.card-3d-active {
    transform: scale(1) rotateY(0deg) translateZ(8px) !important;
    opacity: 1 !important;
    filter: none !important;
    z-index: 10 !important;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.52), 0 0 32px rgba(77, 124, 255, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(77, 124, 255, 0.5) !important;
    pointer-events: auto !important;
  }

  /* 3D Left-Angled Inactive Card */
  .aspect-9-16-card.card-3d-left {
    transform: scale(0.9) rotateY(16deg) translateZ(-30px) !important;
    opacity: 0.45 !important;
    z-index: 4 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    cursor: pointer !important;
  }

  /* 3D Right-Angled Inactive Card */
  .aspect-9-16-card.card-3d-right {
    transform: scale(0.9) rotateY(-16deg) translateZ(-30px) !important;
    opacity: 0.45 !important;
    z-index: 4 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    cursor: pointer !important;
  }

  /* Navigation Arrows - Flanking Outside the Card Viewport, NEVER on top of card content! */
  .carousel-arrow {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 42px !important;
    height: 42px !important;
    background: rgba(14, 18, 34, 0.94) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1.5px solid rgba(77, 124, 255, 0.35) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 60 !important;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 15px rgba(77, 124, 255, 0.35) !important;
    padding: 0 !important;
  }

  .carousel-nav-svg {
    width: 22px !important;
    height: 22px !important;
  }

  .carousel-arrow:hover {
    background: rgba(26, 32, 58, 0.98) !important;
    border-color: rgba(77, 124, 255, 0.6) !important;
    transform: translateY(-50%) scale(1.08) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 20px rgba(77, 124, 255, 0.5) !important;
  }

  .carousel-arrow:active {
    transform: translateY(-50%) scale(0.92) !important;
  }

  .prev-arrow {
    left: max(4px, calc(50% - 195px)) !important;
  }

  .next-arrow {
    right: max(4px, calc(50% - 195px)) !important;
  }

  body.light-theme .carousel-arrow {
    background: rgba(255, 255, 255, 0.96) !important;
    color: #0f172a !important;
    border-color: rgba(77, 124, 255, 0.3) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14) !important;
  }

  .carousel-dots {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 1.4rem !important;
  }

  .carousel-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 4px !important;
    background: rgba(255, 255, 255, 0.28) !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }

  body.light-theme .carousel-dot {
    background: rgba(0, 0, 0, 0.25) !important;
  }

  .carousel-dot.active {
    width: 28px !important;
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6) !important;
    box-shadow: 0 0 14px rgba(77, 124, 255, 0.55) !important;
  }
}

@media (max-width: 600px) {
  .info-profile-detail-card > div:first-child {
    flex-direction: column;
    text-align: center;
    align-items: center !important;
    gap: 0.8rem !important;
  }
  .info-profile-detail-card h3 {
    font-size: 1.5rem !important;
  }
}

/* Confidential Banner Red Pulse Animation */
@keyframes redPulse {
  0% {
    box-shadow: 0 0 4px rgba(255, 74, 74, 0.4), inset 0 0 4px rgba(255, 74, 74, 0.2);
    border-color: rgba(255, 74, 74, 0.3) !important;
  }
  50% {
    box-shadow: 0 0 15px rgba(255, 74, 74, 0.8), inset 0 0 8px rgba(255, 74, 74, 0.4);
    border-color: rgba(255, 74, 74, 0.8) !important;
  }
  100% {
    box-shadow: 0 0 4px rgba(255, 74, 74, 0.4), inset 0 0 4px rgba(255, 74, 74, 0.2);
    border-color: rgba(255, 74, 74, 0.3) !important;
  }
}

.confidential-banner {
  background: rgba(255, 74, 74, 0.08) !important;
  border: 1px solid rgba(255, 74, 74, 0.3) !important;
  color: #ff4a4a !important;
  animation: redPulse 2s infinite ease-in-out !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 1.2rem !important;
  width: 100% !important;
}

/* Telegram CTA Box styling */
.telegram-cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-glass);
  text-align: center;
  gap: 0.8rem;
}

.telegram-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(46, 213, 115, 0.15);
  border: 1px solid rgba(46, 213, 115, 0.3);
  color: #2ed573;
  padding: 0.9rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--spring-easing);
  box-shadow: 0 4px 15px rgba(46, 213, 115, 0.1);
}

.telegram-cta-btn:hover {
  background: #2ed573;
  color: #fff;
  border-color: #2ed573;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 25px rgba(46, 213, 115, 0.35);
}

.telegram-icon-svg {
  flex-shrink: 0;
  transition: transform 0.3s var(--spring-easing);
}

.telegram-cta-btn:hover .telegram-icon-svg {
  transform: scale(1.1) rotate(15deg);
}

.telegram-cta-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.4;
}

body.light-theme .telegram-cta-btn {
  background: rgba(46, 213, 115, 0.1);
  color: #26af5f;
  border-color: rgba(46, 213, 115, 0.25);
  box-shadow: 0 4px 15px rgba(46, 213, 115, 0.05);
}

body.light-theme .telegram-cta-btn:hover {
  background: #26af5f;
  color: #fff;
  border-color: #26af5f;
}

/* --- UNIFIED FLOATING AUTOMATION CONTROLLER --- */
.automation-floating-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
}

.automation-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 20, 38, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(77, 124, 255, 0.45);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 30px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(77, 124, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  user-select: none;
  letter-spacing: 0.2px;
}

.automation-toggle-btn:hover {
  transform: translateY(-2px) scale(1.03);
  background: rgba(28, 32, 60, 0.95);
  border-color: #6c97ff;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(77, 124, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.automation-toggle-btn:active {
  transform: translateY(0) scale(0.98);
}

.automation-toggle-btn.running {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-color: #a78bfa;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4), 0 0 25px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.automation-toggle-btn.running:hover {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-color: #c4b5fd;
  box-shadow: 0 14px 35px rgba(139, 92, 246, 0.55), 0 0 30px rgba(59, 130, 246, 0.4);
}

.auto-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(77, 124, 255, 0.2);
  color: #6c97ff;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.automation-toggle-btn:hover .auto-icon {
  background: rgba(77, 124, 255, 0.35);
  color: #ffffff;
}

.automation-toggle-btn.running .auto-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

body.light-theme .automation-toggle-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border: 1.5px solid rgba(77, 124, 255, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 0 18px rgba(77, 124, 255, 0.15);
}

body.light-theme .automation-toggle-btn:hover {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12), 0 0 25px rgba(77, 124, 255, 0.25);
}

body.light-theme .automation-toggle-btn.running {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
  border-color: #a78bfa;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.35);
}

body.light-theme .automation-toggle-btn .auto-icon {
  background: rgba(77, 124, 255, 0.12);
  color: #2563eb;
}

body.light-theme .automation-toggle-btn.running .auto-icon {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

@media (max-width: 600px) {
  .automation-floating-widget {
    bottom: 16px;
    right: 16px;
  }
  .automation-toggle-btn {
    padding: 9px 16px;
    font-size: 0.82rem;
    gap: 8px;
  }
  .auto-icon {
    width: 20px;
    height: 20px;
  }
}

/* Security & Anti-Inspection Protections */
.detail-body-text,
.letter-box-container,
.aspect-9-16-card,
.info-profile-detail-card {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/* Responsive audio deck styles for mobile */
@media (max-width: 650px) {
  .reader-controls.gemini-audio-deck {
    gap: 0.5rem;
    padding: 4px 6px;
  }

  .compact-play-btn {
    width: 34px;
    height: 34px;
  }

  .compact-play-btn svg {
    width: 14px;
    height: 14px;
  }

  .compact-lang-btn {
    padding: 3px 8px;
    font-size: 0.72rem;
  }

  .detail-scrollable {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2.5rem 2.8rem;
  width: 100%;
  box-sizing: border-box;
  overscroll-behavior: contain !important;
}

  .detail-subject {
    font-size: 1.6rem;
  }

  .detail-body-text {
    font-size: 1.05rem;
    line-height: 1.85;
  }
}

@media (max-width: 400px) {
  .reader-controls.gemini-audio-deck {
    padding: 4px 6px;
    gap: 0.4rem;
  }

  .compact-lang-btn {
    font-size: 0.7rem;
    padding: 2px 6px;
  }
}

/* --- LUXURY SOCIAL MEDIA & EXTERNAL CHANNELS --- */
.social-section-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(77, 124, 255, 0.1);
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid rgba(77, 124, 255, 0.2);
  letter-spacing: 0.3px;
}

.social-channel-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  color: var(--text-primary);
}

.channel-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  transition: all 0.25s ease;
  position: relative;
}

.channel-svg {
  width: 20px;
  height: 20px;
  display: block;
}

.channel-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.channel-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.channel-platform-title {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.channel-badge {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.channel-badge.badge-highlight {
  background: rgba(46, 213, 115, 0.15);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.channel-handle {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-action-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.channel-action-arrow svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.social-channel-card:hover {
  transform: translateY(-2px);
}

.social-channel-card:hover .channel-action-arrow {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.social-channel-card:hover .channel-action-arrow svg {
  transform: translate(2px, -2px);
}

/* 1. Telegram */
.channel-telegram .channel-icon-box {
  background: rgba(42, 171, 238, 0.14);
  color: #2AABEE;
  border: 1px solid rgba(42, 171, 238, 0.25);
}
.channel-telegram:hover {
  background: rgba(42, 171, 238, 0.08);
  border-color: rgba(42, 171, 238, 0.4);
  box-shadow: 0 8px 24px rgba(42, 171, 238, 0.18);
}
.channel-telegram:hover .channel-icon-box {
  background: #2AABEE;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(42, 171, 238, 0.4);
}

/* 2. LinkedIn */
.channel-linkedin .channel-icon-box {
  background: rgba(10, 102, 194, 0.14);
  color: #0A66C2;
  border: 1px solid rgba(10, 102, 194, 0.25);
}
.channel-linkedin:hover {
  background: rgba(10, 102, 194, 0.08);
  border-color: rgba(10, 102, 194, 0.4);
  box-shadow: 0 8px 24px rgba(10, 102, 194, 0.18);
}
.channel-linkedin:hover .channel-icon-box {
  background: #0A66C2;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(10, 102, 194, 0.4);
}

/* 3. Instagram */
.channel-instagram .channel-icon-box {
  background: rgba(225, 48, 108, 0.14);
  color: #E1306C;
  border: 1px solid rgba(225, 48, 108, 0.25);
}
.channel-instagram:hover {
  background: rgba(225, 48, 108, 0.08);
  border-color: rgba(225, 48, 108, 0.4);
  box-shadow: 0 8px 24px rgba(225, 48, 108, 0.2);
}
.channel-instagram:hover .channel-icon-box {
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(225, 48, 108, 0.45);
}

/* 4. X (Twitter) */
.channel-x .channel-icon-box {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.channel-x:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}
.channel-x:hover .channel-icon-box {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* 5. Reddit */
.channel-reddit .channel-icon-box {
  background: rgba(255, 69, 0, 0.14);
  color: #FF4500;
  border: 1px solid rgba(255, 69, 0, 0.25);
}
.channel-reddit:hover {
  background: rgba(255, 69, 0, 0.08);
  border-color: rgba(255, 69, 0, 0.4);
  box-shadow: 0 8px 24px rgba(255, 69, 0, 0.2);
}
.channel-reddit:hover .channel-icon-box {
  background: #FF4500;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
}

/* 6. Snapchat */
.channel-snapchat .channel-icon-box {
  background: rgba(255, 252, 0, 0.15);
  color: #FFFC00;
  border: 1px solid rgba(255, 252, 0, 0.25);
}
.channel-snapchat:hover {
  background: rgba(255, 252, 0, 0.08);
  border-color: rgba(255, 252, 0, 0.45);
  box-shadow: 0 8px 24px rgba(255, 252, 0, 0.16);
}
.channel-snapchat:hover .channel-icon-box {
  background: #FFFC00;
  color: #000000;
  box-shadow: 0 4px 15px rgba(255, 252, 0, 0.35);
}

/* 7. Facebook */
.channel-facebook .channel-icon-box {
  background: rgba(24, 119, 242, 0.14);
  color: #1877F2;
  border: 1px solid rgba(24, 119, 242, 0.25);
}
.channel-facebook:hover {
  background: rgba(24, 119, 242, 0.08);
  border-color: rgba(24, 119, 242, 0.4);
  box-shadow: 0 8px 24px rgba(24, 119, 242, 0.2);
}
.channel-facebook:hover .channel-icon-box {
  background: #1877F2;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4);
}

/* Light Theme Overrides for Social Channel Cards */
body.light-theme .social-channel-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .social-channel-card:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .channel-platform-title {
  color: #0f172a !important;
}

body.light-theme .channel-handle {
  color: #64748b !important;
}

body.light-theme .channel-badge {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #64748b !important;
}

body.light-theme .channel-badge.badge-highlight {
  background: rgba(46, 213, 115, 0.12) !important;
  color: #16a34a !important;
}

body.light-theme .channel-action-arrow {
  background: rgba(0, 0, 0, 0.04);
  color: #64748b;
}

body.light-theme .social-channel-card:hover .channel-action-arrow {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

body.light-theme .channel-x .channel-icon-box {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .channel-x:hover .channel-icon-box {
  background: #000000;
  color: #ffffff;
}

body.light-theme .channel-snapchat .channel-icon-box {
  background: rgba(234, 179, 8, 0.12);
  color: #ca8a04;
  border: 1px solid rgba(234, 179, 8, 0.25);
}

body.light-theme .channel-snapchat:hover .channel-icon-box {
  background: #FFFC00;
  color: #000000;
}

/* Special Opening Banner: "Thank you for opening this website" */
.thank-you-opening-banner {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999;
  transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
}

.thank-you-opening-banner.visible {
  top: 24px;
}

.opening-banner-content {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  background: rgba(18, 18, 30, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(138, 43, 226, 0.35);
  color: #ffffff;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.opening-banner-text {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #ffffff;
}

body.light-theme .opening-banner-content {
  background: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12), 0 0 20px rgba(138, 43, 226, 0.18) !important;
}

body.light-theme .opening-banner-text {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

body.light-theme .banner-inner-row svg {
  color: #7c3aed !important;
}

.laser-border-svg {
  position: absolute;
  top: -1px;
  left: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  pointer-events: none;
  border-radius: 50px;
  overflow: visible;
}

.laser-border-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.5;
}

body.light-theme .laser-border-track {
  stroke: rgba(0, 0, 0, 0.08);
}

.laser-border-progress {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.banner-inner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

@media (max-width: 600px) {
  .thank-you-opening-banner.visible {
    top: 16px;
    width: 90%;
  }
  .opening-banner-content {
    padding: 10px 18px;
    justify-content: center;
    width: 100%;
  }
  .opening-banner-text {
    font-size: 0.88rem;
  }
}

/* --- CUSTOM GLOWING & ELEGANT SCROLLBARS --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 15, 25, 0.4);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4d7cff 0%, #8a2be2 100%);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(138, 43, 226, 0.4);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6b93ff 0%, #a855f7 100%);
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.7);
}

body.light-theme ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
}

body.light-theme ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8a2be2 0%, #4d7cff 100%);
  border-radius: 10px;
}

.detail-scrollable::-webkit-scrollbar {
  width: 6px;
}

.detail-scrollable::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.detail-scrollable::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(77, 124, 255, 0.6), rgba(138, 43, 226, 0.7));
  border-radius: 10px;
}

.detail-scrollable::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(77, 124, 255, 0.85), rgba(138, 43, 226, 0.95));
}

body.light-theme .detail-scrollable::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
}

body.light-theme .detail-scrollable::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(77, 124, 255, 0.45), rgba(138, 43, 226, 0.55));
}

/* ==========================================================================
   CIRCULAR REVEAL THEME TRANSITIONS (View Transitions API)
   ========================================================================== */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) {
  z-index: 1;
}
::view-transition-new(root) {
  z-index: 999999;
}

/* ==========================================================================
   WATER DROPLET / CIRCLE RIPPLE THEME TRANSITION
   ========================================================================== */
.theme-ripple-overlay {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999998;
  width: 0;
  height: 0;
}

.theme-ripple-overlay.animating {
  pointer-events: none;
}

.water-drop-ring {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  opacity: 0;
}

.water-drop-ring.animating {
  animation: waterWaveExpand 0.75s cubic-bezier(0.12, 0.88, 0.28, 1) forwards;
}

.water-drop-ring.ring-1 {
  width: 140vmax;
  height: 140vmax;
  border: 4px solid rgba(99, 102, 241, 0.65);
  box-shadow: 0 0 50px rgba(99, 102, 241, 0.45), inset 0 0 40px rgba(99, 102, 241, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.water-drop-ring.ring-2 {
  width: 170vmax;
  height: 170vmax;
  border: 3px solid rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.35), inset 0 0 45px rgba(168, 85, 247, 0.2);
  animation-delay: 0.1s !important;
}

.water-drop-ring.ring-3 {
  width: 200vmax;
  height: 200vmax;
  border: 2px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 70px rgba(56, 189, 248, 0.3);
  animation-delay: 0.2s !important;
}

.water-drop-surface {
  position: absolute;
  top: 0;
  left: 0;
  width: 260vmax;
  height: 260vmax;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.water-drop-surface.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

body.light-theme .water-drop-surface {
  background: radial-gradient(circle, #f8fafc 40%, rgba(241, 245, 249, 0.95) 70%, rgba(226, 232, 240, 0.8) 100%);
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.08);
}

body:not(.light-theme) .water-drop-surface {
  background: radial-gradient(circle, #080b14 40%, rgba(10, 14, 26, 0.96) 70%, rgba(15, 23, 42, 0.85) 100%);
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.6);
}

@keyframes waterWaveExpand {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.9;
  }
  40% {
    opacity: 0.75;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

/* ==========================================================================
   HEADPHONES 10-SECOND COUNTDOWN MODAL
   ========================================================================== */
.headphones-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 14, 26, 0.45) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.2rem;
}

.headphones-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.headphones-modal-card {
  background: linear-gradient(145deg, rgba(20, 24, 42, 0.96) 0%, rgba(12, 14, 26, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: 2.2rem 2rem 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 45px rgba(77, 124, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: scale(0.92) translateY(18px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}

.headphones-modal-overlay.active .headphones-modal-card {
  transform: scale(1) translateY(0);
}

.headphones-anim-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 0.2rem;
}

.headphones-3d-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 124, 255, 0.25) 0%, rgba(138, 43, 226, 0.15) 60%, transparent 80%);
  border: 1px solid rgba(77, 124, 255, 0.35);
  box-shadow: 0 0 30px rgba(77, 124, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  animation: floatHeroHeadphones 2.6s ease-in-out infinite alternate;
}

.headphones-main-svg {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 4px 10px rgba(77, 124, 255, 0.5));
}

@keyframes floatHeroHeadphones {
  0% { transform: translateY(0) scale(0.98); }
  100% { transform: translateY(-6px) scale(1.02); }
}

.headphones-sound-waves {
  display: flex;
  align-items: center;
  gap: 4px;
}

.headphones-sound-waves span {
  width: 3.5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #4d7cff 0%, #c084fc 100%);
  animation: wavePulse 1.2s ease-in-out infinite alternate;
}

.left-waves span:nth-child(1) { height: 12px; animation-delay: 0.1s; }
.left-waves span:nth-child(2) { height: 22px; animation-delay: 0.3s; }
.left-waves span:nth-child(3) { height: 32px; animation-delay: 0.5s; }

.right-waves span:nth-child(1) { height: 32px; animation-delay: 0.5s; }
.right-waves span:nth-child(2) { height: 22px; animation-delay: 0.3s; }
.right-waves span:nth-child(3) { height: 12px; animation-delay: 0.1s; }

@keyframes wavePulse {
  0% { transform: scaleY(0.4); opacity: 0.4; }
  100% { transform: scaleY(1); opacity: 1; }
}

.headphones-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(77, 124, 255, 0.15);
  border: 1px solid rgba(77, 124, 255, 0.3);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #93c5fd;
}

.headphones-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
}

.headphones-modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  max-width: 360px;
}

.countdown-track-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0.4rem;
}

.countdown-bar-wrapper {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.countdown-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #4d7cff 0%, #a855f7 50%, #ec4899 100%);
  border-radius: 6px;
}

.countdown-timer-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.countdown-timer-status strong {
  color: #60a5fa;
  font-weight: 700;
}

.headphones-modal-actions {
  width: 100%;
  margin-top: 0.4rem;
}

/* Light Theme overrides */
body.light-theme .headphones-modal-overlay {
  background: rgba(241, 245, 249, 0.85);
}

body.light-theme .headphones-modal-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.12), 0 0 35px rgba(77, 124, 255, 0.15);
}

body.light-theme .headphones-modal-title {
  color: #0f172a;
}

body.light-theme .countdown-bar-wrapper {
  background: rgba(0, 0, 0, 0.08);
}


/* ==========================================================================
   MID-LETTER INTERACTIVE OPINION BANNER (DROPS DOWN FROM TOP)
   ========================================================================== */
.opinion-banner-top {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  z-index: 10005;
  width: 92%;
  max-width: 520px;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

.opinion-banner-top.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.opinion-banner-card {
  position: relative;
  background: rgba(18, 24, 38, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 105, 180, 0.35);
  border-radius: 20px;
  padding: 1.3rem 1.4rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 105, 180, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow: hidden;
}

.opinion-banner-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 77, 136, 0.15) 0%, transparent 60%);
  pointer-events: none;
  animation: pulseGlow 4s ease-in-out infinite alternate;
}

.opinion-banner-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.opinion-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 77, 136, 0.25), rgba(255, 143, 163, 0.15));
  border: 1px solid rgba(255, 77, 136, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff4d88;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(255, 77, 136, 0.3);
  animation: heartPulse 1.8s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.opinion-heart-svg {
  width: 22px;
  height: 22px;
}

.opinion-text-content {
  flex: 1;
}

.opinion-banner-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.2rem 0;
  line-height: 1.3;
}

.opinion-banner-desc {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  line-height: 1.35;
}

.opinion-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.opinion-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.opinion-close-btn svg {
  width: 14px;
  height: 14px;
}

.opinion-timer-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.opinion-timer-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}

.opinion-timer-progress {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff4d88, #ff758c);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.opinion-timer-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  font-variant-numeric: tabular-nums;
  min-width: 24px;
}

.opinion-banner-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.opinion-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  font-family: inherit;
}

/* Left Option: Red (Not Interested) */
.btn-opinion-no {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35) !important;
}

.btn-opinion-no:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5) !important;
}

.btn-opinion-no:active {
  transform: translateY(0) !important;
}

/* Right Option: Green (Interested) */
.btn-opinion-yes {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35) !important;
}

.btn-opinion-yes:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5) !important;
}

.btn-opinion-yes:active {
  transform: translateY(0) !important;
}

.opinion-btn-icon {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   ROMANTIC PINK THEME (body.theme-pink)
   ========================================================================== */
body.theme-pink {
  --primary-accent: #ff4d88;
  --accent-glow: rgba(255, 77, 136, 0.4);
  --border-glass: rgba(255, 143, 163, 0.28);
  background: radial-gradient(ellipse at 15% 15%, rgba(255, 77, 136, 0.22) 0%, transparent 45%),
              radial-gradient(ellipse at 85% 85%, rgba(255, 143, 163, 0.18) 0%, transparent 45%),
              linear-gradient(135deg, #1d0a19 0%, #2e0f26 50%, #150614 100%) !important;
  transition: background 0.8s ease, filter 0.8s ease;
}

body.theme-pink .portal-card,
body.theme-pink .glassmorphic {
  border-color: rgba(255, 105, 180, 0.3) !important;
  box-shadow: 0 16px 40px rgba(255, 77, 136, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

body.theme-pink .letter-paper-sheet .word.active,
body.theme-pink .detail-body-text .word.active {
  color: #ffffff !important;
  background: rgba(255, 77, 136, 0.32) !important;
  box-shadow: 0 0 12px rgba(255, 77, 136, 0.42) !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
}

body.theme-pink .badge-active,
body.theme-pink .badge-status {
  background: rgba(255, 77, 136, 0.2) !important;
  color: #ff758c !important;
  border-color: rgba(255, 77, 136, 0.4) !important;
}

body.theme-pink #seek-bar-progress {
  background: linear-gradient(90deg, #ff4d88, #ff758c) !important;
}

/* ==========================================================================
   DIMMED THEME (body.theme-dimmed)
   ========================================================================== */
body.theme-dimmed {
  filter: brightness(0.8) contrast(0.95);
  transition: filter 0.8s ease;
}

/* ==========================================================================
   SMOOTH & BEAUTIFUL WORD HIGHLIGHT BOX (NO LAYOUT JITTER)
   ========================================================================== */
.letter-paper-sheet .word,
.detail-body-text .word {
  position: relative;
  display: inline;
  padding: 2px 3px;
  margin: 0;
  border-radius: 4px;
  color: #64748b !important;
  transition: color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
  font-weight: 500 !important;
}

.letter-paper-sheet .word.active,
.detail-body-text .word.active {
  color: #1e40af !important;
  background: rgba(59, 130, 246, 0.2) !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3) !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  text-shadow: none !important;
}

.letter-paper-sheet .word.read,
.detail-body-text .word.read {
  color: #0f172a !important;
  font-weight: 500 !important;
  background: transparent !important;
  box-shadow: none !important;
}




/* ==========================================================================
   DEDICATED PROFILE & EXTERNAL INFORMATION UI/UX STYLING
   ========================================================================== */
.profile-view-panel {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.profile-top-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  margin-bottom: 0.2rem;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(138, 43, 226, 0.15);
  border: 1px solid rgba(138, 43, 226, 0.4);
  color: #c084fc;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 50px;
  box-shadow: 0 2px 10px rgba(138, 43, 226, 0.2);
}

.profile-main-title {
  font-size: 1.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin: 0;
  line-height: 1.2;
}

body.light-theme .profile-main-title {
  color: #0f172a;
}

.profile-top-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 480px;
  line-height: 1.4;
}

/* Card 1: Personal Details Card */
.profile-personal-card {
  background: linear-gradient(160deg, rgba(24, 30, 52, 0.92) 0%, rgba(13, 17, 30, 0.95) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  padding: 2.4rem 2.2rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.35rem;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.profile-personal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.7), rgba(168, 85, 247, 0.7), transparent);
}

body.light-theme .profile-personal-card {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%) !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body.light-theme .profile-personal-card::before {
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.45), rgba(168, 85, 247, 0.45), transparent);
}

.profile-avatar-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.profile-avatar-box {
  width: 108px;
  height: 108px;
  min-width: 108px;
  max-width: 108px;
  min-height: 108px;
  max-height: 108px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4), inset 0 0 15px rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  cursor: default;
}

.profile-avatar-box:hover {
  transform: scale(1.05) rotate(1.5deg);
  box-shadow: 0 16px 45px rgba(168, 85, 247, 0.6);
}

.profile-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  background: #0f121d;
}

.profile-online-badge {
  position: absolute;
  bottom: 5px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2ed573;
  border: 3.5px solid #0f121d;
  box-shadow: 0 0 14px #2ed573;
  animation: onlinePulse 2s infinite ease-in-out;
}

body.light-theme .profile-online-badge {
  border-color: #ffffff;
}

@keyframes onlinePulse {
  0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 3px #2ed573); }
  50% { transform: scale(1.15); opacity: 0.85; filter: drop-shadow(0 0 8px #2ed573); }
}

.profile-name-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.profile-person-name {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .profile-person-name {
  background: linear-gradient(180deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-role-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 50px;
  background: rgba(99, 102, 241, 0.14);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.32);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
}

body.light-theme .profile-role-pill {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.22);
}

.profile-bio-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 540px;
  margin: 0 auto;
}

body.light-theme .profile-bio-text {
  color: #475569;
}

/* Attributes Grid (Balanced 2x2 Grid) */
.profile-attributes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  margin-top: 0.6rem;
  box-sizing: border-box;
}

.profile-attr-box {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.05rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

body.light-theme .profile-attr-box {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%) !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

.profile-attr-box:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

body.light-theme .profile-attr-box:hover {
  background: #ffffff !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06) !important;
}

.attr-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.85px;
}

.attr-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #a78bfa;
  transition: transform 0.25s ease;
}

.profile-attr-box:hover .attr-icon {
  transform: scale(1.12);
}

.attr-icon-purple { color: #c084fc; }
.attr-icon-blue { color: #60a5fa; }
.attr-icon-green { color: #4ade80; }
.attr-icon-cyan { color: #38bdf8; }

body.light-theme .attr-icon-purple { color: #9333ea; }
body.light-theme .attr-icon-blue { color: #2563eb; }
body.light-theme .attr-icon-green { color: #16a34a; }
body.light-theme .attr-icon-cyan { color: #0284c7; }

.attr-box-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: #ffffff;
  word-break: break-all;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

body.light-theme .attr-box-value {
  color: #0f172a;
}

.status-active-value {
  color: #2ed573;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ed573;
  box-shadow: 0 0 10px #2ed573;
  display: inline-block;
  flex-shrink: 0;
  animation: onlinePulse 2s infinite ease-in-out;
}

.attr-email-link {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  font-weight: 600;
}

.attr-email-link:hover {
  color: #93c5fd;
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
}

body.light-theme .attr-email-link {
  color: #2563eb;
}

body.light-theme .attr-email-link:hover {
  color: #1d4ed8;
}

/* Card 2: Dedicated Social Media Card */
.profile-social-card {
  background: linear-gradient(160deg, rgba(24, 30, 52, 0.92) 0%, rgba(13, 17, 30, 0.95) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  padding: 2.2rem 2.2rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.profile-social-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(46, 213, 115, 0.7), rgba(42, 171, 238, 0.7), transparent);
}

body.light-theme .profile-social-card {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%) !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body.light-theme .profile-social-card::before {
  background: linear-gradient(90deg, transparent, rgba(46, 213, 115, 0.45), rgba(42, 171, 238, 0.45), transparent);
}

.profile-social-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1.1rem;
  flex-wrap: wrap;
  gap: 0.6rem;
}

body.light-theme .profile-social-header {
  border-bottom-color: rgba(226, 232, 240, 0.9);
}

.profile-social-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-social-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #ffffff;
  margin: 0;
}

body.light-theme .profile-social-title {
  color: #0f172a;
}

.profile-social-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.social-section-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 5px 14px;
  border-radius: 50px;
  background: rgba(46, 213, 115, 0.12);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.3);
}

body.light-theme .social-section-badge {
  background: rgba(46, 213, 115, 0.1);
  color: #16a34a;
  border-color: rgba(46, 213, 115, 0.25);
}

.social-channels-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.social-channel-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
  padding: 0.95rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  overflow: hidden;
}

body.light-theme .social-channel-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%) !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

.social-channel-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

body.light-theme .social-channel-card:hover {
  background: #ffffff !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06) !important;
}

.social-channel-card.channel-facebook {
  grid-column: span 2;
}

.channel-icon-box {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-channel-card:hover .channel-icon-box {
  transform: scale(1.1);
}

.channel-svg {
  width: 22px;
  height: 22px;
}

/* Brand specific icon box styling */
.channel-telegram .channel-icon-box {
  background: rgba(42, 171, 238, 0.16);
  color: #2AABEE;
  border: 1px solid rgba(42, 171, 238, 0.35);
}

.channel-linkedin .channel-icon-box {
  background: rgba(10, 102, 194, 0.16);
  color: #0A66C2;
  border: 1px solid rgba(10, 102, 194, 0.35);
}

.channel-instagram .channel-icon-box {
  background: rgba(228, 64, 95, 0.16);
  color: #E4405F;
  border: 1px solid rgba(228, 64, 95, 0.35);
}

.channel-x .channel-icon-box {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

body.light-theme .channel-x .channel-icon-box {
  color: #0f172a;
}

.channel-reddit .channel-icon-box {
  background: rgba(255, 69, 0, 0.16);
  color: #FF4500;
  border: 1px solid rgba(255, 69, 0, 0.35);
}

.channel-snapchat .channel-icon-box {
  background: rgba(255, 252, 0, 0.16);
  color: #FFFC00;
  border: 1px solid rgba(255, 252, 0, 0.35);
}

.channel-facebook .channel-icon-box {
  background: rgba(24, 119, 242, 0.16);
  color: #1877F2;
  border: 1px solid rgba(24, 119, 242, 0.35);
}

.channel-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.channel-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.channel-platform-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

body.light-theme .channel-platform-title {
  color: #0f172a;
}

.channel-handle {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.2;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.channel-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
}

body.light-theme .channel-badge {
  background: rgba(0, 0, 0, 0.06);
  color: #475569;
}

.channel-badge.badge-highlight {
  background: rgba(42, 171, 238, 0.18);
  color: #2AABEE;
  border: 1px solid rgba(42, 171, 238, 0.35);
}

.channel-action-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.social-channel-card:hover .channel-action-arrow {
  background: rgba(99, 102, 241, 0.25);
  color: #818cf8;
  transform: translate(2px, -2px);
}

body.light-theme .social-channel-card:hover .channel-action-arrow {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}

/* Individual Channel Hover Colors */
.channel-telegram:hover {
  border-color: rgba(42, 171, 238, 0.5);
  box-shadow: 0 12px 30px rgba(42, 171, 238, 0.2);
}
.channel-linkedin:hover {
  border-color: rgba(10, 102, 194, 0.5);
  box-shadow: 0 12px 30px rgba(10, 102, 194, 0.2);
}
.channel-instagram:hover {
  border-color: rgba(228, 64, 95, 0.5);
  box-shadow: 0 12px 30px rgba(228, 64, 95, 0.2);
}
.channel-x:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.12);
}
.channel-reddit:hover {
  border-color: rgba(255, 69, 0, 0.5);
  box-shadow: 0 12px 30px rgba(255, 69, 0, 0.2);
}
.channel-snapchat:hover {
  border-color: rgba(255, 252, 0, 0.5);
  box-shadow: 0 12px 30px rgba(255, 252, 0, 0.18);
}
.channel-facebook:hover {
  border-color: rgba(24, 119, 242, 0.5);
  box-shadow: 0 12px 30px rgba(24, 119, 242, 0.2);
}

/* ==========================================================================
   EXPLICIT MOBILE RESPONSIVENESS (<= 600px - Perfect 9:16 & Phone Viewports)
   ========================================================================== */
@media (max-width: 600px) {
  .profile-view-panel {
    gap: 1.1rem !important;
    width: 100% !important;
  }

  .profile-top-header {
    gap: 0.3rem !important;
  }

  .profile-main-title {
    font-size: 1.55rem !important;
  }

  .profile-top-subtitle {
    font-size: 0.8rem !important;
  }

  .profile-personal-card,
  .profile-social-card {
    padding: 1.3rem 1.1rem !important;
    border-radius: 18px !important;
    gap: 1.1rem !important;
  }

  .profile-avatar-box {
    width: 84px !important;
    height: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    min-height: 84px !important;
    max-height: 84px !important;
  }

  .profile-person-name {
    font-size: 1.38rem !important;
  }

  .profile-bio-text {
    font-size: 0.86rem !important;
    line-height: 1.5 !important;
  }

  /* Single Column Stack for Mobile */
  .profile-attributes-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .profile-attr-box.profile-attr-full {
    grid-column: span 1 !important;
  }

  .profile-attr-box {
    padding: 0.8rem 1rem !important;
    border-radius: 14px !important;
  }

  .attr-box-value {
    font-size: 0.92rem !important;
  }

  /* Single Column Stack for Social Channels */
  .social-channels-list {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .social-channel-card.channel-facebook {
    grid-column: span 1 !important;
  }

  .social-channel-card {
    padding: 0.75rem 0.95rem !important;
    border-radius: 14px !important;
    min-height: 52px !important;
  }

  .channel-icon-box {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 10px !important;
  }

  .channel-svg {
    width: 19px !important;
    height: 19px !important;
  }

  .channel-platform-title {
    font-size: 0.9rem !important;
  }

  .channel-handle {
    font-size: 0.76rem !important;
  }
}



/* ==========================================================================
   MASTER NEXT-LEVEL MOBILE & LAPTOP RESPONSIVE UI/UX SYSTEM
   Engineered for 100% Pixel-Perfect Fit on All Smartphones & Laptops
   ========================================================================== */

/* --- TABLET & SMALL LAPTOPS (<= 900px) --- */
@media (max-width: 900px) {
  .cards-container {
    gap: 1.5rem !important;
    max-width: 700px !important;
  }

  .aspect-9-16-card {
    width: 270px !important;
    height: 480px !important;
    padding: 1.8rem 1.5rem !important;
  }
}

/* --- MOBILE PHONES & PORTRAIT TABLETS (<= 768px) --- */
@media (max-width: 768px) {
  /* Global Shell & Viewport */
  body {
    overflow-x: hidden !important;
  }

  .app-header {
    padding: 0.75rem 1rem !important;
  }

  .brand-logo-icon {
    width: 32px !important;
    height: 32px !important;
  }

  .brand-logo-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .brand-main-title {
    font-size: 0.92rem !important;
  }

  .brand-sub-title {
    font-size: 0.65rem !important;
  }

  .header-actions {
    gap: 0.5rem !important;
  }

  .theme-toggle-btn {
    width: 34px !important;
    height: 34px !important;
  }

  #logout-btn {
    padding: 0.35rem 0.75rem !important;
    font-size: 0.78rem !important;
  }

  /* Mailbox Dashboard Carousel */
  .workspace {
    padding: 0.5rem !important;
  }

  .mailbox-dashboard {
    height: auto !important;
    min-height: calc(100vh - 70px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .mailbox-list-pane {
    padding: 0.8rem 0.5rem !important;
    height: auto !important;
    width: 100% !important;
  }

  /* Mobile Rotation & Responsive Scaling Adaptations */
  .carousel-wrapper {
    perspective: 1200px !important;
    perspective-origin: center center !important;
  }

  .card-9-16-header {
    margin-top: 0.5rem !important;
  }

  .mail-icon-wrapper,
  .info-avatar-wrapper {
    width: 58px !important;
    height: 58px !important;
    margin-bottom: 0.8rem !important;
  }

  .card-9-16-badge {
    font-size: 0.65rem !important;
    padding: 2px 7px !important;
  }

  .card-9-16-title {
    font-size: 1.45rem !important;
    margin-top: 0.2rem !important;
  }

  .card-9-16-body p {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
  }

  .card-9-16-action-text {
    padding: 0.55rem 1rem !important;
    font-size: 0.82rem !important;
  }

  /* Mobile Landscape Orientation (Phone Rotation) */
  @media (orientation: landscape) and (max-height: 540px) {
    .mailbox-dashboard {
      min-height: auto !important;
      padding: 0.4rem 0 !important;
    }
    .mailbox-list-pane {
      padding: 0.4rem !important;
    }
    .carousel-wrapper {
      max-width: 480px !important;
    }
    .cards-viewport {
      max-width: 460px !important;
      padding: 4px 0 !important;
    }
    .aspect-9-16-card {
      height: min(80vh, 320px) !important;
      width: auto !important;
      aspect-ratio: 9 / 16 !important;
      flex: 0 0 auto !important;
      padding: 0.9rem 0.8rem !important;
    }
    .card-9-16-header {
      margin-top: 0.1rem !important;
    }
    .mail-icon-wrapper,
    .info-avatar-wrapper {
      width: 38px !important;
      height: 38px !important;
      margin-bottom: 0.3rem !important;
    }
    .card-9-16-title {
      font-size: 1.1rem !important;
    }
    .card-9-16-body p {
      font-size: 0.74rem !important;
      line-height: 1.25 !important;
    }
    .card-9-16-action-text {
      padding: 0.3rem 0.6rem !important;
      font-size: 0.75rem !important;
    }
  }

  /* Fullscreen Native Mobile Overlay Shell */
  .email-detail-overlay {
    padding: 0 !important;
    align-items: stretch !important;
  }

  .detail-split-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  .detail-left-box {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #0a0c16 !important;
  }

  body.light-theme .detail-left-box {
    background: #f8fafc !important;
  }

  .detail-scrollable {
    padding: 1rem 0.95rem 2.8rem 0.95rem !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .close-detail-btn {
    top: 10px !important;
    right: 12px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 1.4rem !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
  }

  body.light-theme .close-detail-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
  }

  /* Letter View on Mobile */
  .letter-view-panel .detail-header-section {
    margin-bottom: 0.6rem !important;
  }

  .detail-badge {
    font-size: 0.68rem !important;
    padding: 2px 9px !important;
  }

  .detail-subject {
    font-size: 1.28rem !important;
    line-height: 1.35 !important;
    margin: 0.25rem 0 0.5rem 0 !important;
    letter-spacing: -0.3px !important;
  }

  .detail-sender-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
  }

  .detail-sender-info {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    width: 100% !important;
  }

  .detail-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 0.95rem !important;
  }

  .detail-sender-name {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
  }

  .detail-date-badge {
    font-size: 0.68rem !important;
    padding: 2px 7px !important;
  }

  .detail-sender-email {
    font-size: 0.75rem !important;
  }

  

  .compact-play-btn {
    width: 34px !important;
    height: 34px !important;
  }

  .compact-play-btn svg {
    width: 15px !important;
    height: 15px !important;
  }

  .compact-lang-btn {
    padding: 3px 8px !important;
    font-size: 0.72rem !important;
  }

  .letter-view-panel .confidential-banner,
  .letter-view-panel .letter-quote-banner {
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 0.78rem !important;
    padding: 6px 12px !important;
    margin-top: 0.4rem !important;
    margin-bottom: 0.8rem !important;
  }

  /* Letter Paper Sheet Container */
  .letter-paper-sheet {
    padding: 1.15rem 1rem !important;
    border-radius: 16px !important;
    margin-top: 0.4rem !important;
    margin-bottom: 1rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
  }

  .letter-paper-header-accent {
    margin-bottom: 1rem !important;
  }

  .paper-vintage-stamp {
    font-size: 0.65rem !important;
    padding: 2px 7px !important;
  }

  .letter-view-panel .detail-body-text,
  .letter-paragraph {
    font-size: 1.02rem !important;
    line-height: 1.85 !important;
    margin-bottom: 1.1rem !important;
  }

  .letter-paper-sheet .word,
  .detail-body-text .word {
    padding: 1px 2px !important;
  }

  /* Dual Action Response Buttons on Mobile */
  .letter-cta-container {
    margin-top: 1.6rem !important;
    padding-top: 1.3rem !important;
    width: 100% !important;
  }

  .letter-action-buttons-wrapper {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.6rem !important;
    width: 100% !important;
  }

  .letter-action-btn {
    flex: 1 1 0 !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 0.7rem 0.85rem !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
    gap: 0.4rem !important;
  }

  .letter-action-btn .action-btn-svg {
    width: 16px !important;
    height: 16px !important;
  }

  .letter-cta-subtext {
    font-size: 0.74rem !important;
    margin-top: 0.7rem !important;
  }

  /* Profile View on Mobile */
  .profile-view-panel {
    gap: 0.95rem !important;
    width: 100% !important;
  }

  .profile-top-header {
    gap: 0.25rem !important;
    margin-bottom: 0 !important;
  }

  .profile-badge {
    font-size: 0.68rem !important;
    padding: 2px 10px !important;
  }

  .profile-main-title {
    font-size: 1.38rem !important;
  }

  .profile-top-subtitle {
    font-size: 0.76rem !important;
  }

  .profile-personal-card,
  .profile-social-card {
    padding: 1.15rem 0.95rem !important;
    border-radius: 18px !important;
    gap: 0.85rem !important;
  }

  .profile-avatar-box {
    width: 76px !important;
    height: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    min-height: 76px !important;
    max-height: 76px !important;
  }

  .profile-person-name {
    font-size: 1.32rem !important;
  }

  .profile-role-pill {
    font-size: 0.7rem !important;
    padding: 2px 10px !important;
  }

  .profile-bio-text {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
  }

  /* 2-Column Compact Attributes on Mobile */
  .profile-attributes-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin-top: 0.2rem !important;
  }

  .profile-attr-box {
    padding: 0.65rem 0.75rem !important;
    border-radius: 12px !important;
    gap: 2px !important;
  }

  .profile-attr-box.profile-attr-full {
    grid-column: span 2 !important;
  }

  .attr-box-header {
    font-size: 0.62rem !important;
    gap: 5px !important;
  }

  .attr-icon {
    width: 12px !important;
    height: 12px !important;
  }

  .attr-box-value {
    font-size: 0.85rem !important;
  }

  /* Social Channels Stack */
  .profile-social-header {
    padding-bottom: 0.65rem !important;
  }

  .profile-social-title {
    font-size: 1.05rem !important;
  }

  .social-section-badge {
    font-size: 0.65rem !important;
    padding: 2px 8px !important;
  }

  .social-channels-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
    width: 100% !important;
  }

  .social-channel-card {
    padding: 0.65rem 0.85rem !important;
    border-radius: 12px !important;
    min-height: 48px !important;
    gap: 0.75rem !important;
  }

  .social-channel-card.channel-facebook {
    grid-column: span 1 !important;
  }

  .channel-icon-box {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 10px !important;
  }

  .channel-svg {
    width: 18px !important;
    height: 18px !important;
  }

  .channel-platform-title {
    font-size: 0.88rem !important;
  }

  .channel-handle {
    font-size: 0.74rem !important;
  }

  .channel-badge {
    font-size: 0.62rem !important;
    padding: 1px 6px !important;
  }

  .channel-action-arrow {
    width: 26px !important;
    height: 26px !important;
  }

  /* Modals on Mobile */
  .login-card {
    width: min(92vw, 360px) !important;
    padding: 1.8rem 1.3rem !important;
    border-radius: 20px !important;
  }

  .password-modal-card {
    width: min(92vw, 360px) !important;
    padding: 1.6rem 1.2rem !important;
    border-radius: 20px !important;
  }

  .opinion-banner-top {
    top: 10px !important;
    width: 94% !important;
    max-width: 420px !important;
  }

  .opinion-banner-card {
    padding: 0.95rem 1rem !important;
    border-radius: 18px !important;
  }

  .opinion-icon-badge {
    width: 34px !important;
    height: 34px !important;
  }

  .opinion-banner-title {
    font-size: 0.92rem !important;
  }

  .opinion-banner-desc {
    font-size: 0.76rem !important;
  }

  .opinion-action-btn {
    padding: 0.6rem 0.8rem !important;
    font-size: 0.8rem !important;
    min-height: 42px !important;
    border-radius: 20px !important;
  }

  .headphones-modal-card {
    width: min(92vw, 340px) !important;
    padding: 1.6rem 1.2rem !important;
    border-radius: 20px !important;
  }
}

/* --- ULTRA-COMPACT MOBILE PHONES (<= 380px, e.g. iPhone SE, Small Android) --- */
@media (max-width: 380px) {
  .letter-action-buttons-wrapper {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .profile-attributes-grid {
    grid-template-columns: 1fr !important;
  }

  .profile-attr-box.profile-attr-full {
    grid-column: span 1 !important;
  }

  .detail-subject {
    font-size: 1.15rem !important;
  }

  .letter-view-panel .detail-body-text,
  .letter-paragraph {
    font-size: 0.96rem !important;
    line-height: 1.75 !important;
  }
}


/* Overflow Protection for Paper Sheet and Paragraphs */
.letter-paper-sheet,
.detail-body-text,
.letter-paragraph {
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}



/* --- PRECISE SENDER ROW & SIDE-BY-SIDE COMPACT AUDIO DECK --- */
.detail-sender-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.8rem !important;
  width: 100% !important;
  margin-top: 0.35rem !important;
  margin-bottom: 0.65rem !important;
  flex-wrap: nowrap !important;
}

.detail-sender-info {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.detail-avatar {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #4d7cff 0%, #8a2be2 100%) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  box-shadow: 0 4px 12px rgba(77, 124, 255, 0.35) !important;
  flex-shrink: 0 !important;
}

.detail-sender-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.detail-sender-name-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

.detail-sender-name {
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  white-space: nowrap !important;
}

.detail-date-badge {
  font-size: 0.68rem !important;
  padding: 2px 7px !important;
  border-radius: 10px !important;
  background: rgba(77, 124, 255, 0.12) !important;
  border: 1px solid rgba(77, 124, 255, 0.25) !important;
  color: var(--accent-primary) !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.detail-sender-email {
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
}

/* Compact Side-by-Side Audio Deck Pill */
.reader-controls.gemini-audio-deck {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: rgba(18, 18, 32, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 50px !important;
  padding: 4px 6px !important;
  margin: 0 !important;
  margin-left: auto !important;
  width: fit-content !important;
  max-width: fit-content !important;
  min-width: fit-content !important;
  flex-shrink: 0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

body.light-theme .reader-controls.gemini-audio-deck {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08) !important;
}

.compact-play-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #4d7cff 0%, #8a2be2 100%) !important;
  border: none !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 3px 10px rgba(77, 124, 255, 0.4) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  outline: none !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
}

.compact-play-btn:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 5px 15px rgba(77, 124, 255, 0.6) !important;
}

.compact-play-btn:active {
  transform: scale(0.94) !important;
}

.compact-play-btn svg {
  width: 15px !important;
  height: 15px !important;
}

.compact-lang-switcher {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 50px !important;
  padding: 2px !important;
  gap: 2px !important;
  flex-shrink: 0 !important;
}

body.light-theme .compact-lang-switcher {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.compact-lang-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  font-family: var(--font-main) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  padding: 3px 8px !important;
  border-radius: 50px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.compact-lang-btn.active {
  background: linear-gradient(135deg, #4d7cff, #8b5cf6) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(77, 124, 255, 0.4) !important;
}

body.light-theme .compact-lang-btn.active {
  background: #ffffff !important;
  color: var(--accent-primary) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* --- MOBILE SPECIFIC OVERRIDES (<= 768px) --- */
@media (max-width: 768px) {
  .detail-sender-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.4rem !important;
    width: 100% !important;
    margin-top: 0.25rem !important;
    margin-bottom: 0.5rem !important;
  }

  .detail-sender-info {
    gap: 0.55rem !important;
  }

  .detail-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 0.92rem !important;
  }

  .detail-sender-name {
    font-size: 0.9rem !important;
  }

  .detail-date-badge {
    font-size: 0.62rem !important;
    padding: 1px 5px !important;
  }

  .detail-sender-email {
    font-size: 0.7rem !important;
  }

  .reader-controls.gemini-audio-deck {
    gap: 4px !important;
    padding: 3px 5px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }

  .compact-play-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }

  .compact-play-btn svg {
    width: 13px !important;
    height: 13px !important;
  }

  .compact-lang-btn {
    padding: 3px 6px !important;
    font-size: 0.66rem !important;
  }
}



/* ==========================================================================
   MASTER CLEAN SENDER ROW & SIDE-BY-SIDE AUDIO DECK PILL
   ========================================================================== */
.detail-sender-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  width: 100% !important;
  margin-top: 0.35rem !important;
  margin-bottom: 0.65rem !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.detail-sender-info {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.7rem !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.detail-avatar {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #4d7cff 0%, #8a2be2 100%) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  box-shadow: 0 4px 12px rgba(77, 124, 255, 0.35) !important;
  flex-shrink: 0 !important;
}

.detail-avatar img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
}

.detail-sender-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.detail-sender-name-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

.detail-sender-name {
  font-size: 0.96rem !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

body.light-theme .detail-sender-name {
  color: #0f172a !important;
}

.detail-date-badge {
  font-size: 0.68rem !important;
  padding: 1px 7px !important;
  border-radius: 10px !important;
  background: rgba(77, 124, 255, 0.12) !important;
  border: 1px solid rgba(77, 124, 255, 0.25) !important;
  color: var(--accent-primary) !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

.detail-sender-email {
  font-size: 0.76rem !important;
  color: var(--text-muted) !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  line-height: 1.2 !important;
}

/* Side-by-Side Compact Audio Deck (Play + Language Switcher Together) */
.reader-controls.gemini-audio-deck,
.letter-view-panel .reader-controls.gemini-audio-deck {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: rgba(18, 18, 32, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 50px !important;
  padding: 3px 5px !important;
  margin: 0 !important;
  margin-left: auto !important;
  width: auto !important;
  max-width: fit-content !important;
  min-width: 0 !important;
  flex-shrink: 0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

body.light-theme .reader-controls.gemini-audio-deck,
body.light-theme .letter-view-panel .reader-controls.gemini-audio-deck {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08) !important;
}

.audio-play-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.compact-play-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #4d7cff 0%, #8a2be2 100%) !important;
  border: none !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 3px 10px rgba(77, 124, 255, 0.4) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  outline: none !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
}

.compact-play-btn:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 5px 15px rgba(77, 124, 255, 0.6) !important;
}

.compact-play-btn:active {
  transform: scale(0.94) !important;
}

.compact-play-btn svg {
  width: 15px !important;
  height: 15px !important;
}

.compact-lang-switcher {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 50px !important;
  padding: 2px !important;
  gap: 2px !important;
  flex-shrink: 0 !important;
}

body.light-theme .compact-lang-switcher {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.compact-lang-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  font-family: var(--font-main) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  padding: 3px 8px !important;
  border-radius: 50px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.compact-lang-btn:hover {
  color: var(--text-primary) !important;
}

.compact-lang-btn.active {
  background: linear-gradient(135deg, #4d7cff, #8b5cf6) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(77, 124, 255, 0.4) !important;
}

body.light-theme .compact-lang-btn.active {
  background: #ffffff !important;
  color: var(--accent-primary) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* --- MOBILE SPECIFIC OVERRIDES (<= 768px) --- */
@media (max-width: 768px) {
  .detail-sender-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.45rem !important;
    width: 100% !important;
    margin-top: 0.25rem !important;
    margin-bottom: 0.5rem !important;
  }

  .detail-sender-info {
    gap: 0.55rem !important;
  }

  .detail-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    font-size: 0.92rem !important;
  }

  .detail-sender-name {
    font-size: 0.9rem !important;
  }

  .detail-date-badge {
    font-size: 0.62rem !important;
    padding: 1px 5px !important;
  }

  .detail-sender-email {
    font-size: 0.7rem !important;
  }

  .reader-controls.gemini-audio-deck,
  .letter-view-panel .reader-controls.gemini-audio-deck {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 3px 5px !important;
    margin: 0 !important;
    margin-left: auto !important;
    width: auto !important;
    max-width: fit-content !important;
    flex-shrink: 0 !important;
  }

  .compact-play-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
  }

  .compact-play-btn svg {
    width: 13px !important;
    height: 13px !important;
  }

  .compact-lang-switcher {
    padding: 2px !important;
    gap: 2px !important;
  }

  .compact-lang-btn {
    padding: 2px 6px !important;
    font-size: 0.66rem !important;
  }
}



/* ==========================================================================
   ROCK-SOLID STATIONARY WORD TOKENS (ZERO LAYOUT JITTER / ZERO LINE BOUNCE)
   ========================================================================== */
.letter-paper-sheet .word,
.detail-body-text .word {
  position: relative !important;
  display: inline !important;
  padding: 0 1px !important;
  margin: 0 !important;
  border-radius: 4px !important;
  color: #64748b !important;
  transition: color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease !important;
  cursor: default !important;
  font-weight: 500 !important;
  line-height: inherit !important;
  box-sizing: border-box !important;
  vertical-align: baseline !important;
  letter-spacing: inherit !important;
  word-spacing: inherit !important;
}

.letter-paper-sheet .word:hover,
.detail-body-text .word:hover {
  color: #0f172a !important;
}

.letter-paper-sheet .word.active,
.detail-body-text .word.active {
  color: #1e40af !important;
  background: rgba(59, 130, 246, 0.22) !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.35) !important;
  font-weight: 500 !important;
  border-radius: 4px !important;
  text-shadow: none !important;
}

.letter-paper-sheet .word.read,
.detail-body-text .word.read {
  color: #0f172a !important;
  font-weight: 500 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Equal-Width Dual Action Response CTA Buttons */
.letter-cta-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.85rem !important;
  width: 100% !important;
  margin-top: 2rem !important;
  padding-top: 1.5rem !important;
  border-top: 1px dashed rgba(0, 0, 0, 0.15) !important;
  box-sizing: border-box !important;
}

.letter-action-buttons-wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1rem !important;
  width: 100% !important;
  max-width: 520px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

.letter-action-btn {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.85rem 1.25rem !important;
  border-radius: 50px !important;
  font-family: var(--font-main) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  line-height: 1.2 !important;
}

.letter-action-btn.btn-not-interested {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.35) !important;
  color: #ef4444 !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.15) !important;
}

.letter-action-btn.btn-not-interested:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
}

.letter-action-btn.btn-interested {
  background: rgba(46, 213, 115, 0.12) !important;
  border: 1.5px solid rgba(46, 213, 115, 0.35) !important;
  color: #2ed573 !important;
  box-shadow: 0 4px 14px rgba(46, 213, 115, 0.15) !important;
}

.letter-action-btn.btn-interested:hover {
  background: linear-gradient(135deg, #2ed573 0%, #10b981 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(46, 213, 115, 0.4) !important;
}

.letter-cta-subtext {
  font-size: 0.76rem !important;
  color: #64748b !important;
  text-align: center !important;
  max-width: 480px !important;
  line-height: 1.4 !important;
}

@media (max-width: 480px) {
  .letter-action-buttons-wrapper {
    flex-direction: row !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }
  .letter-action-btn {
    padding: 0.75rem 0.6rem !important;
    font-size: 0.8rem !important;
  }
}



/* --- COMPACT PLAY/PAUSE ICON SINGLE BUTTON TOGGLE FIX --- */
.compact-play-btn {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.compact-play-btn svg {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0 !important;
  pointer-events: none !important;
}

.compact-play-btn svg.hidden,
.compact-play-btn .play-icon-svg.hidden,
.compact-play-btn .pause-icon-svg.hidden,
.compact-play-btn .hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.compact-play-btn svg:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}



/* ==========================================================================
   BULLETPROOF SINGLE-BUTTON PLAY/PAUSE ICON TOGGLE
   ========================================================================== */
.compact-play-btn {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.compact-play-btn .play-icon-svg,
.compact-play-btn .pause-icon-svg {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0 !important;
  pointer-events: none !important;
}

/* When play button is in idle/paused state */
.compact-play-btn .play-icon-svg {
  display: block !important;
  visibility: visible !important;
}
.compact-play-btn .pause-icon-svg {
  display: none !important;
  visibility: hidden !important;
}

/* When playing (.playing class on container or .compact-play-btn.playing) */
#reader-controls.playing .compact-play-btn .play-icon-svg,
.compact-play-btn.playing .play-icon-svg,
.compact-play-btn .play-icon-svg.hidden {
  display: none !important;
  visibility: hidden !important;
}

#reader-controls.playing .compact-play-btn .pause-icon-svg,
.compact-play-btn.playing .pause-icon-svg {
  display: block !important;
  visibility: visible !important;
}

.compact-play-btn .pause-icon-svg.hidden {
  display: none !important;
  visibility: hidden !important;
}



/* ==========================================================================
   PERFECT SINGLE-SVG DYNAMIC PLAY/PAUSE BUTTON
   ========================================================================== */
.compact-play-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #4d7cff 0%, #8a2be2 100%) !important;
  border: none !important;
  color: #ffffff !important;
  cursor: pointer !important;
  box-shadow: 0 3px 10px rgba(77, 124, 255, 0.4) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  outline: none !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.compact-play-btn:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 5px 15px rgba(77, 124, 255, 0.6) !important;
}

.compact-play-btn:active {
  transform: scale(0.94) !important;
}

.compact-play-btn .compact-play-svg,
.compact-play-btn svg {
  width: 15px !important;
  height: 15px !important;
  display: block !important;
  pointer-events: none !important;
  flex-shrink: 0 !important;
}



/* ==========================================================================
   MID-LETTER INTERACTIVE OPINION BANNER (DARK & LIGHT THEME ELEGANCE)
   ========================================================================== */
.opinion-banner-top {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  z-index: 10005;
  width: 92%;
  max-width: 520px;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

.opinion-banner-top.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Dark Theme (Default) Card */
.opinion-banner-card {
  position: relative;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 77, 136, 0.35) !important;
  border-radius: 22px !important;
  padding: 1.25rem 1.4rem !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(255, 77, 136, 0.22) !important;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Light Theme Card */
body.light-theme .opinion-banner-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(255, 77, 136, 0.3) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12), 0 0 25px rgba(255, 77, 136, 0.12) !important;
}

.opinion-banner-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 77, 136, 0.14) 0%, transparent 60%);
  pointer-events: none;
  animation: pulseGlow 4s ease-in-out infinite alternate;
}

body.light-theme .opinion-banner-glow {
  background: radial-gradient(circle at center, rgba(255, 77, 136, 0.08) 0%, transparent 60%);
}

.opinion-banner-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.opinion-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 77, 136, 0.25), rgba(255, 143, 163, 0.15));
  border: 1px solid rgba(255, 77, 136, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff4d88;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(255, 77, 136, 0.3);
  animation: heartPulse 1.8s ease-in-out infinite;
}

.opinion-heart-svg {
  width: 22px;
  height: 22px;
}

.opinion-text-content {
  flex: 1;
  min-width: 0;
}

.opinion-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.25rem;
}

.opinion-banner-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff !important;
  margin: 0;
  line-height: 1.3;
}

body.light-theme .opinion-banner-title {
  color: #0f172a !important;
}

.opinion-banner-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8) !important;
  margin: 0;
  line-height: 1.35;
}

body.light-theme .opinion-banner-desc {
  color: #475569 !important;
}

/* Elegant Digital Countdown Seconds Badge (No line bar) */
.opinion-seconds-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(255, 77, 136, 0.16);
  border: 1px solid rgba(255, 77, 136, 0.35);
  color: #ff4d88;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
}

body.light-theme .opinion-seconds-badge {
  background: rgba(255, 77, 136, 0.12);
  border-color: rgba(255, 77, 136, 0.3);
  color: #e11d48;
}

.timer-badge-icon {
  width: 12px;
  height: 12px;
}

.opinion-timer-seconds {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

.opinion-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

body.light-theme .opinion-close-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: #64748b;
}

.opinion-close-btn:hover {
  background: rgba(255, 77, 136, 0.2);
  color: #ff4d88;
}

.opinion-banner-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.1rem;
}



/* ==========================================================================
   OPINION YES CHANNELS LIST VIEW & ELEGANT SOCIAL LISTING
   ========================================================================== */
.opinion-yes-channels-view {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  animation: fadeInModal 0.35s ease;
}

.opinion-yes-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.opinion-yes-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.opinion-yes-sparkle {
  font-size: 1.1rem;
}

.opinion-yes-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ff4d88 !important;
  margin: 0;
  line-height: 1.25;
}

.opinion-yes-subtitle {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8) !important;
  margin: 0;
}

body.light-theme .opinion-yes-subtitle {
  color: #475569 !important;
}

.opinion-channels-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.opinion-channel-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: #ffffff !important;
  transition: all 0.22s ease;
}

body.light-theme .opinion-channel-card {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(226, 232, 240, 0.9);
  color: #0f172a !important;
}

.opinion-channel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 77, 136, 0.4);
}

body.light-theme .opinion-channel-card:hover {
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.op-channel-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.op-channel-icon-box.tg-icon {
  background: rgba(36, 161, 222, 0.15);
  color: #24A1DE;
}

.op-channel-icon-box.ig-icon {
  background: rgba(225, 48, 108, 0.15);
  color: #E1306C;
}

.op-channel-icon-box.li-icon {
  background: rgba(10, 102, 194, 0.15);
  color: #0A66C2;
}

.op-channel-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.op-channel-name {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.op-channel-sub {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.65);
}

body.light-theme .op-channel-sub {
  color: #64748b;
}

.op-channel-arrow {
  font-size: 1.1rem;
  color: #ff4d88;
  transition: transform 0.2s;
}

.opinion-channel-card:hover .op-channel-arrow {
  transform: translateX(4px);
}

}

