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

:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;

  /* Color Palette - Vibrant Slate / Violet Glow */
  --bg-primary: #0b0c10;
  --bg-secondary: #13141f;
  --bg-tertiary: #1b1c2e;
  
  --primary: #74bf69;
  --primary-hover: #5fa355;
  --primary-glow: rgba(116, 191, 105, 0.15);
  
  --secondary: #8dd985;
  --secondary-glow: rgba(141, 217, 133, 0.15);

  --accent: #14b8a6;
  --accent-glow: rgba(20, 184, 166, 0.18);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  --success-hover: #059669;
  --warning: #f59e0b;

  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(116, 191, 105, 0.4);
  
  --glass-bg: rgba(20, 21, 33, 0.6);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --glass-blur: 16px;

  --app-height: 100dvh;

  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(116, 191, 105, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.12) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Pinned Full-Height Container when Dashboard is active */
body.view-dashboard-active,
body:has(#view-dashboard:not(.hidden)) {
  height: 100vh;
  height: 100dvh;
  height: var(--app-height, 100dvh);
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

* {
  box-sizing: border-box;
}

/* Glass Card styling */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 16px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px var(--primary-glow); }
  50% { box-shadow: 0 0 20px rgba(116, 191, 105, 0.35); }
}

@keyframes pulse-border {
  0%, 100% { border-color: var(--glass-border); }
  50% { border-color: rgba(116, 191, 105, 0.4); }
}

@keyframes pulse-online {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
}

.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Typography settings */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin-top: 0;
}

/* Buttons */
button {
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  border: none;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 14px rgba(116, 191, 105, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(116, 191, 105, 0.45);
  background: linear-gradient(135deg, #8dd985, #5fa355);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-secondary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-1px);
  background: var(--danger-hover);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-1px);
  background: var(--success-hover);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Inputs */
input {
  font-family: var(--font-sans);
  font-size: 16px; /* Prevents auto-zoom on iOS */
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
  background: rgba(255, 255, 255, 0.08);
}

/* Layouts */
.app-container {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Auth Page CSS */
.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}

.auth-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.auth-logo:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.auth-title {
  font-size: 2.2rem;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

.auth-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ff8a8a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-top: 8px;
}

.auth-toggle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 24px;
}

.auth-toggle span {
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
}

/* Header CSS */
.site-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  width: 100%;
}

.app-header {
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 12, 16, 0.5);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 100;
  flex-shrink: 0;
}

/* Blog Announcement Banner (Under Top Bar) */
.blog-promo-banner {
  background: linear-gradient(90deg, rgba(16, 17, 26, 0.96) 0%, rgba(20, 32, 24, 0.96) 50%, rgba(16, 17, 26, 0.96) 100%);
  border-bottom: 1px solid rgba(116, 191, 105, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 24px;
  position: relative;
  z-index: 99;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: opacity 0.25s ease, max-height 0.25s ease, padding 0.25s ease;
  overflow: hidden;
  max-height: 80px;
}

.blog-promo-banner.closing {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
}

.blog-promo-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 30px;
}

.blog-promo-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
  padding: 0 36px;
}

.blog-promo-text {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.blog-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #0b0c10;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(116, 191, 105, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.blog-promo-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(116, 191, 105, 0.5);
  filter: brightness(1.08);
}

.blog-promo-btn:active {
  transform: translateY(0);
}

.blog-promo-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.blog-promo-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

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

.brand h1 {
  font-size: 1.4rem;
  margin: 0;
  background: linear-gradient(135deg, #fff 60%, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.brand-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.brand-logo:hover {
  transform: scale(1.1);
}

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

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(116, 191, 105, 0.1);
  border: 1px solid rgba(116, 191, 105, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 550;
  color: #c7d2fe;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
}

.pulse-indicator::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-online 2s infinite ease-in-out;
}

/* Dashboard Layout */
.dashboard {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  padding: 24px;
  gap: 24px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  height: calc(100vh - 80px);
  height: 100%;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  overflow-y: auto;
}

.sidebar-panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.sidebar-panel h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

/* User List CSS */
.user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
}

.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}

.user-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(116, 191, 105, 0.2);
}

.user-name-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-username {
  font-weight: 550;
  font-size: 0.95rem;
}

.user-self {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-list-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 16px;
  font-size: 0.9rem;
}

/* Call Banner / Controls Overlay */
.call-overlay {
  animation: pulse-border 3s infinite;
  border: 1px solid var(--glass-border);
}

.call-overlay.active {
  background: rgba(116, 191, 105, 0.07);
}

.call-status-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.call-status-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.call-peer-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.call-status-badge {
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.call-status-badge.calling { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.call-status-badge.incoming { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.call-status-badge.connecting { background: rgba(116, 191, 105, 0.15); color: #8dd985; }
.call-status-badge.connected { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.call-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

.call-actions button {
  flex: 1;
}

/* Chat Panel CSS */
.chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.chat-empty-state {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
}

.chat-empty-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.chat-empty-logo:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.chat-empty-state p {
  max-width: 400px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Active Chat */
.chat-active-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.chat-peer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-peer-details {
  display: flex;
  flex-direction: column;
}

.chat-peer-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.chat-peer-status {
  font-size: 0.8rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Messages List */
.messages-container {
  flex: 1 1 0;
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message-bubble {
  max-width: 65%;
  padding: 12px 18px;
  border-radius: 16px;
  line-height: 1.45;
  font-size: 0.95rem;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-bubble.me {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message-bubble.them {
  align-self: flex-start;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.message-time {
  font-size: 0.7rem;
  opacity: 0.7;
  align-self: flex-end;
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: rgba(19, 20, 31, 0.4);
  flex-shrink: 0;
}

.chat-form {
  display: flex;
  gap: 12px;
}

.chat-input {
  flex: 1;
}

/* Diagnostics Panel */
.diagnostics-panel {
  background: rgba(11, 12, 16, 0.6);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 16px;
  max-height: 180px;
  overflow-y: auto;
}

.diagnostics-panel h4 {
  margin-bottom: 12px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  font-size: 0.8rem;
  font-family: monospace;
}

.diag-label {
  color: var(--text-muted);
}

.diag-val {
  text-align: right;
  color: var(--text-secondary);
}

.diag-val.active {
  color: var(--accent);
  font-weight: bold;
}

.diag-val.connected {
  color: var(--success);
  font-weight: bold;
}

/* Collapsible Diagnostics Styling */
.diagnostics-wrapper {
  margin-top: 16px;
}
.diagnostics-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.diagnostics-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: rgba(116, 191, 105, 0.3);
}
.diagnostics-toggle.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: rgba(255, 255, 255, 0.05);
}
.diagnostics-wrapper .diagnostics-panel {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
  margin-top: 0;
}

/* Radar Connection View */
.chat-connecting-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
  position: relative;
}
.connecting-radar {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}
.radar-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid var(--primary);
  border-radius: 50%;
  opacity: 0;
  animation: radarGlow 3s infinite linear;
}
.circle-1 { animation-delay: 0s; }
.circle-2 { animation-delay: 1s; }
.circle-3 { animation-delay: 2s; }
.connecting-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
  z-index: 2;
}
@keyframes radarGlow {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
    border-color: var(--secondary);
  }
}
.connecting-title {
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: var(--text-primary);
  background: linear-gradient(135deg, #fff 50%, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.connecting-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 380px;
  line-height: 1.5;
  margin: 0;
}

/* Global Incoming Call Banner */
.global-call-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  width: 90%;
  max-width: 480px;
  padding: 16px 20px;
  background: rgba(20, 21, 33, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(116, 191, 105, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(116, 191, 105, 0.15);
  border-radius: 16px;
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideDown {
  from {
    transform: translate(-50%, -40px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}
.call-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.call-banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.call-pulse {
  width: 10px;
  height: 10px;
  background: var(--warning);
}
.call-pulse::after {
  background: var(--warning);
}
.call-banner-details {
  display: flex;
  flex-direction: column;
}
.call-banner-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}
.call-banner-user {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}
.call-banner-actions {
  display: flex;
  gap: 8px;
}
.call-banner-actions button {
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* Header Buttons & Back Control */
.btn-back {
  padding: 6px 12px;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}
.btn-hangup {
  padding: 8px 14px;
  font-size: 0.85rem;
  background: var(--danger);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}
.btn-hangup:hover {
  background: var(--danger-hover);
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.35);
}
.btn-new-session {
  padding: 8px 14px;
  font-size: 0.85rem;
  background: var(--success);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}
.btn-new-session:hover:not(:disabled) {
  background: var(--success-hover);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}
.btn-new-session:active:not(:disabled) {
  transform: translateY(0);
}
.btn-logout {
  padding: 6px 12px;
  font-size: 0.85rem;
}
.btn-settings {
  padding: 6px 10px;
  font-size: 0.95rem;
}

/* Mobile Devices (Phones & Tablets) */
@media (max-width: 768px) {
  body.view-dashboard-active,
  body:has(#view-dashboard:not(.hidden)) {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
  }

  .app-header {
    padding: 10px 14px;
    flex-shrink: 0;
    position: relative;
    top: 0;
    z-index: 100;
  }
  .blog-promo-banner {
    padding: 8px 14px;
    max-height: 120px;
  }
  .blog-promo-inner {
    justify-content: flex-start;
  }
  .blog-promo-main {
    padding: 0 28px 0 0;
    gap: 8px;
    justify-content: flex-start;
    text-align: left;
  }
  .blog-promo-text {
    font-size: 0.8rem;
    line-height: 1.35;
  }
  .blog-promo-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
  .brand h1 {
    font-size: 1.15rem;
  }
  .brand-dot {
    width: 8px;
    height: 8px;
  }
  .user-profile {
    gap: 8px;
  }
  .status-badge {
    padding: 4px 8px;
    font-size: 0.8rem;
  }
  .btn-logout {
    padding: 4px 8px;
    font-size: 0.8rem;
  }
  .btn-settings {
    padding: 4px 6px;
    font-size: 0.9rem;
  }
  .dashboard {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
    height: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  
  .sidebar {
    display: none;
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
  }
  .sidebar.mobile-active {
    display: flex;
    flex-direction: column;
  }
  
  .chat-panel {
    display: none;
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
  }
  .chat-panel.mobile-active {
    display: flex;
    flex-direction: column;
  }

  .chat-active-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  
  .chat-header {
    padding: 8px 12px;
    gap: 8px;
    flex-shrink: 0;
    background: rgba(19, 20, 31, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 90;
  }
  .chat-peer-profile {
    gap: 8px;
  }
  .chat-peer-profile .user-avatar,
  .chat-peer-profile .chat-peer-details {
    display: none;
  }
  .btn-back {
    padding: 4px 8px;
    font-size: 0.9rem;
    margin-right: 4px;
  }
  .chat-header-actions {
    gap: 6px;
    display: flex;
    align-items: center;
  }
  .btn-audio-control {
    padding: 5px 9px;
    font-size: 0.78rem;
    gap: 4px;
  }
  .btn-hangup {
    padding: 5px 9px;
    font-size: 0.78rem;
  }
  .btn-new-session {
    padding: 5px 9px;
    font-size: 0.78rem;
  }
  .messages-container {
    padding: 14px 12px;
    gap: 12px;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  .message-bubble {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  .chat-input-bar {
    padding: 10px 12px max(10px, env(safe-area-inset-bottom, 10px)) 12px;
    flex-shrink: 0;
    background: rgba(19, 20, 31, 0.9);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .global-call-banner {
    top: 12px;
    padding: 12px 16px;
  }
  .call-banner-user {
    font-size: 0.95rem;
  }
  .call-banner-actions button {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .chat-connecting-state {
    padding: 24px 16px;
  }
  .connecting-radar {
    width: 90px;
    height: 90px;
    margin-bottom: 24px;
  }
  .connecting-avatar {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }
  .connecting-title {
    font-size: 1.35rem;
  }
  .connecting-subtitle {
    font-size: 0.85rem;
    max-width: 300px;
  }
}

/* Small Mobile Devices (Portrait) */
@media (max-width: 480px) {
  .auth-card {
    padding: 24px;
    border-radius: 16px;
  }
  .auth-title {
    font-size: 1.8rem;
  }
  .auth-subtitle {
    margin-bottom: 24px;
    font-size: 0.85rem;
  }
  .auth-toggle {
    margin-top: 16px;
    font-size: 0.85rem;
  }
}

/* Soundwave Animation & Controls */
.soundwave-container {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 14px;
  margin-left: 8px;
}

.soundwave-bar {
  width: 2px;
  height: 100%;
  background-color: var(--accent);
  border-radius: 2px;
  animation: bounce-soundwave 0.8s infinite ease-in-out alternate;
  transform-origin: bottom;
}

.soundwave-bar.bar-1 { animation-delay: 0.1s; height: 30%; }
.soundwave-bar.bar-2 { animation-delay: 0.3s; height: 100%; }
.soundwave-bar.bar-3 { animation-delay: 0.5s; height: 50%; }
.soundwave-bar.bar-4 { animation-delay: 0.2s; height: 80%; }

@keyframes bounce-soundwave {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1.1); }
}

.btn-audio-control {
  padding: 6px 12px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.btn-audio-control.active {
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(20, 184, 166, 0.3);
  color: #2dd4bf;
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.15);
}

.btn-audio-control.muted {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.btn-audio-control:hover {
  transform: translateY(-1px);
}

.btn-audio-control:active {
  transform: translateY(0);
}

/* Settings Modal Styles */
.settings-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  animation: fadeInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.settings-modal {
  width: 90%;
  max-width: 480px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  border-radius: 16px;
  overflow: hidden;
  animation: scaleInModal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.settings-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.settings-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: rgba(11, 12, 16, 0.4);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.toggle-switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.toggle-switch-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toggle-switch-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.toggle-switch-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 24px;
  border: 1px solid var(--border);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary);
  border-color: rgba(116, 191, 105, 0.4);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
  background-color: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* Failed connection UI */
.failed-state {
  animation: fadeIn 0.4s ease;
}

.failed-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: wobble 0.6s ease;
}

@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

.failed-actions button {
  width: 100%;
}

/* Apple Sign In CSS */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  margin: 8px 0;
  font-size: 0.85rem;
  width: 100%;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider:not(:empty)::before {
  margin-right: .5em;
}

.auth-divider:not(:empty)::after {
  margin-left: .5em;
}

.btn-apple {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  margin-top: 8px;
}

.btn-apple:hover {
  background: #f4f4f4;
  border-color: #f4f4f4;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-apple:active {
  transform: translateY(0);
}

.mobile-only-btn {
  display: none !important;
}

@media (max-width: 900px) {
  .mobile-only-btn {
    display: inline-flex !important;
  }
}

/* Landing Page Styles */
.landing-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 40px;
  position: sticky;
  top: 16px;
  left: 20px;
  right: 20px;
  width: calc(100% - 40px);
  margin: 0 auto;
  z-index: 100;
  border-radius: 16px;
  margin-top: 16px;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.landing-brand:hover {
  transform: scale(1.02);
}

.landing-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}

.landing-logo-small {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.landing-brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  background: linear-gradient(135deg, #fff 40%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link-btn {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-link-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link-btn.active {
  color: var(--primary);
  background: rgba(116, 191, 105, 0.08);
  font-weight: 600;
}

.landing-header-actions {
  display: flex;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 6px 12px;
  margin-left: 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mobile-nav-link {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 10px 16px;
  border-radius: 8px;
  text-align: left;
  transition: all 0.2s ease;
  font-weight: 500;
  border: none;
  width: 100%;
  cursor: pointer;
}

.mobile-nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.mobile-nav-link.active {
  color: var(--primary);
  background: rgba(116, 191, 105, 0.08);
  font-weight: 600;
}

.landing-main {
  flex: 1;
  padding: 40px 24px 100px 24px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 120px;
}

/* Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  padding-top: 40px;
  min-height: 70vh;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(116, 191, 105, 0.08);
  border: 1px solid rgba(116, 191, 105, 0.15);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background-color: var(--primary);
  animation: pulse-online 2s infinite ease-in-out;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 540px;
}

/* Download Button Large */
.download-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 380px;
}

.btn-download-large {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-download-large:hover {
  background: #f4f4f4;
  border-color: #f4f4f4;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.1), 0 6px 18px rgba(0, 0, 0, 0.4);
  color: #000000;
}

.btn-download-large:active {
  transform: translateY(0);
}

.download-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* P2P Connection Diagram */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
}

.p2p-diagram {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1.1;
  padding: 30px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-radius: 24px;
  background: rgba(20, 21, 33, 0.4);
}

.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.node:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.node-icon {
  font-size: 1.8rem;
}

.node-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.client-node {
  position: absolute;
  left: 30px;
  bottom: 60px;
  border-color: rgba(20, 184, 166, 0.3);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.1);
}

.server-node {
  position: absolute;
  right: 30px;
  bottom: 60px;
  border-color: rgba(116, 191, 105, 0.3);
  box-shadow: 0 8px 24px rgba(116, 191, 105, 0.1);
}

.signaling-node {
  position: absolute;
  top: 40px;
  background: rgba(20, 21, 33, 0.8);
  border-color: rgba(255, 255, 255, 0.05);
}

.connection-badge {
  position: absolute;
  bottom: 24px;
  font-size: 0.75rem;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.25);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.lock-icon {
  font-size: 0.8rem;
}

/* Connection channels & lines */
.p2p-channels {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.channel-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.05);
}

/* Signaling lines: Client to server (V-shape) */

/* Direct connection horizontal P2P line */
.direct-p2p-line {
  bottom: 105px;
  left: 140px;
  width: calc(100% - 280px);
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.5);
  border-radius: 4px;
}

.p2p-glow-wave {
  position: absolute;
  top: -2px;
  left: 0;
  width: 30px;
  height: 7px;
  background: #ffffff;
  border-radius: 50%;
  filter: blur(2px);
  box-shadow: 0 0 10px #ffffff;
  animation: glow-wave-move 2.5s infinite linear;
}

@keyframes glow-wave-move {
  0% { left: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Features Grid */
.features-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-title {
  font-size: 2.4rem;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  width: 100%;
}

.feature-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(116, 191, 105, 0.2);
  box-shadow: 0 16px 40px rgba(116, 191, 105, 0.05), var(--glass-shadow);
}

.feature-icon-wrapper {
  font-size: 1.8rem;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.92rem;
  margin: 0;
}

/* How It Works Steps */
.how-it-works-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: 100%;
}

.step-item {
  padding: 40px 32px;
  border-radius: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.step-item:hover {
  border-color: rgba(20, 184, 166, 0.25);
}

.step-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), transparent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.step-item h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.step-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Blog Styles */
.blog-section-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 20px;
}

.blog-index-header {
  margin-bottom: 40px;
  text-align: left;
}

.btn-home-back, .btn-blog-back {
  padding: 8px 14px;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.blog-title {
  font-size: 2.8rem;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.5;
  max-width: 700px;
}

.blog-controls {
  padding: 20px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.blog-search-input {
  width: 100%;
}

.blog-tags-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 99px;
  transition: all 0.2s ease;
}

.tag-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.tag-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-card {
  padding: 30px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(116, 191, 105, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), var(--glass-shadow);
}

.blog-card-meta {
  display: flex;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.blog-card-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.blog-card:hover .blog-card-title {
  color: var(--primary);
}

.blog-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 16px;
}

.blog-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-emoji {
  font-size: 1.1rem;
}

.author-name-small {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.read-more-link {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-more-link .arrow {
  transition: transform 0.2s ease;
}

.blog-card:hover .read-more-link .arrow {
  transform: translateX(3px);
}

.blog-empty-state {
  padding: 60px;
  text-align: center;
  border-radius: 18px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

/* Blog Detailed Reading View */
.blog-post-detail {
  text-align: left;
}

.blog-post-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 30px;
  margin-bottom: 40px;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.blog-post-title {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.blog-post-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.author-avatar {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.author-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.author-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.blog-post-tags {
  display: flex;
  gap: 6px;
}

.tag-badge {
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.15);
  padding: 4px 10px;
  border-radius: 99px;
  font-weight: 600;
}

/* Post Contents Typography */
.blog-post-content-wrapper {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #e2e8f0;
}

.blog-post-body p {
  margin-bottom: 24px;
}

.blog-post-body h3 {
  font-size: 1.6rem;
  margin: 40px 0 16px 0;
  color: #ffffff;
}

.blog-post-body ul,
.blog-post-body ol {
  margin: 0 0 24px 24px;
  padding: 0;
}

.blog-post-body li {
  margin-bottom: 8px;
}

.blog-post-body blockquote {
  border-left: 4px solid var(--primary);
  background: rgba(116, 191, 105, 0.05);
  padding: 16px 20px;
  margin: 32px 0;
  border-radius: 0 8px 8px 0;
  font-size: 1.05rem;
  color: #cbd5e1;
}

.blog-post-body pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.9rem;
  margin: 24px 0;
  color: #a7f3d0;
}

.blog-post-body .table-container {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
}

.blog-post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.blog-post-body th {
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #f8fafc;
}

.blog-post-body td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.6;
  color: #cbd5e1;
}

.blog-post-body tr:last-child td {
  border-bottom: none;
}

.blog-post-body tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.blog-post-footer {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Landing Page Footer */
.landing-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 11, 16, 0.8);
  padding: 60px 40px 30px 40px;
  width: 100%;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 280px;
  text-align: left;
  line-height: 1.4;
  margin: 0;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  opacity: 0.9;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--primary);
}

.social-links-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.social-icon-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.social-icon-btn svg {
  display: block;
  transition: transform 0.2s ease;
}

.social-icon-btn:hover svg {
  transform: scale(1.1);
}

.mobile-menu-social {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu-social-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.settings-community-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-community-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
}

/* Responsiveness for Landing Page */
@media (max-width: 1000px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 60px;
    padding-top: 20px;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .steps-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .landing-header {
    padding: 10px 20px;
    top: 10px;
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
  }

  .landing-nav {
    display: none; /* Hide top nav links, keep simple */
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-title {
    font-size: 2.6rem;
  }

  .landing-main {
    padding: 24px 16px 80px 16px;
    gap: 80px;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
  }

  .footer-left,
  .footer-col {
    align-items: center;
  }

  .footer-right {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}

/* Modal Backdrop & Dialog Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 16px;
  overflow-y: auto;
}

.modal-content {
  position: relative;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}





/* Utility Classes for Vanilla SPA */
.hidden {
  display: none !important;
}
