/* ═══════════════════════════════════════════
   SPECIAL CHAT - Premium Design System
   ═══════════════════════════════════════════ */

:root {
  --primary: #00d4aa;
  --primary-dark: #075e54;
  --primary-darker: #054d44;
  --accent: #25d366;
  --accent-glow: rgba(37, 211, 102, 0.3);
  
  --bg-dark: #0b141a;
  --bg-card: #111b21;
  --bg-chat: #0b141a;
  --bg-input: #1e2a30;
  --bg-header: #1a2930;
  --bg-hover: #182229;
  --bg-modal: rgba(0, 0, 0, 0.7);
  
  --text-primary: #e9edef;
  --text-secondary: #8696a0;
  --text-muted: #667781;
  --text-accent: #00d4aa;
  
  --border: #222d34;
  --border-light: #2a3942;
  
  --msg-sent: #005c4b;
  --msg-sent-hover: #006d59;
  --msg-received: #1a2930;
  --msg-received-hover: #1f3038;
  
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input, button, textarea {
  font-family: inherit;
}

/* ═══════════════════════════════════════════
   SCREEN MANAGEMENT
   ═══════════════════════════════════════════ */
#app {
  height: 100%;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  box-shadow: var(--shadow-lg);
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
  background: var(--bg-dark);
}

.screen.active {
  transform: translateX(0);
  visibility: visible;
}

.screen.slide-left {
  transform: translateX(-30%);
}

.hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════ */
.login-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 28px;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 100%);
}

.login-logo {
  text-align: center;
  margin-bottom: 48px;
  animation: fadeInUp 0.8s ease;
}

.logo-icon {
  margin-bottom: 16px;
  filter: drop-shadow(0 0 30px var(--accent-glow));
  animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 20px var(--accent-glow)); }
  50% { filter: drop-shadow(0 0 40px var(--accent-glow)); }
}

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

.login-logo h1 {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-form {
  animation: fadeInUp 0.6s ease 0.2s both;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.phone-input {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.phone-prefix {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  background: var(--bg-header);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

.phone-input input {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.verify-input {
  display: flex;
  gap: 8px;
}

.verify-input input {
  flex: 1;
}

.btn-primary {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

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

.btn-secondary {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
}

.btn-small {
  padding: 10px 18px;
  background: var(--primary-dark);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-small:hover {
  background: var(--primary-darker);
}

.btn-danger {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1.5px solid var(--danger);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 12px;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-divider span {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 14px;
  text-align: center;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ═══════════════════════════════════════════
   MAIN HEADER
   ═══════════════════════════════════════════ */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
}

.main-header h2 {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  gap: 4px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

label.icon-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════ */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  margin: 8px 12px;
  background: var(--bg-input);
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--primary);
}

.search-bar svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   CHAT LIST
   ═══════════════════════════════════════════ */
.chat-list {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 140px;
}

.chat-list::-webkit-scrollbar {
  width: 4px;
}

.chat-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.chat-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  position: relative;
}

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

.chat-item:active {
  background: var(--bg-input);
}

.chat-item .avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  position: relative;
}

.avatar .online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-dark);
}

.chat-item-info {
  flex: 1;
  margin-left: 14px;
  overflow: hidden;
}

.chat-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.chat-item-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.chat-item-time {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

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

.chat-item-message {
  font-size: 14px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 8px;
}

.unread-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--accent);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 16px;
}

.empty-state span {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════
   FAB
   ═══════════════════════════════════════════ */
.fab {
  position: absolute;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
  z-index: 10;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px var(--accent-glow);
}

.fab:active {
  transform: scale(0.95);
}

/* ═══════════════════════════════════════════
   BOTTOM NAV
   ═══════════════════════════════════════════ */
.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 0 12px;
  background: var(--bg-header);
  border-top: 1px solid var(--border);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius-md);
}

.nav-item:hover {
  color: var(--text-secondary);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item span {
  font-size: 11px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   CHAT SCREEN
   ═══════════════════════════════════════════ */
.chat-header {
  display: flex;
  align-items: center;
  padding: 10px 8px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  gap: 4px;
}

.chat-header-info {
  display: flex;
  align-items: center;
  flex: 1;
  cursor: pointer;
  gap: 12px;
}

.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.chat-header-text h3 {
  font-size: 16px;
  font-weight: 600;
}

.online-status {
  font-size: 12px;
  color: var(--text-muted);
}

.online-status.online {
  color: var(--accent);
}

.chat-header-actions {
  display: flex;
  gap: 2px;
}

/* ═══════════════════════════════════════════
   MESSAGES
   ═══════════════════════════════════════════ */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg-chat);
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(0, 212, 170, 0.03) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(37, 211, 102, 0.03) 0%, transparent 60%);
}

.messages-container::-webkit-scrollbar {
  width: 4px;
}

.messages-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  position: relative;
  animation: messageIn 0.3s ease;
  word-wrap: break-word;
}

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

.message.sent {
  align-self: flex-end;
  background: var(--msg-sent);
  border-bottom-right-radius: 4px;
}

.message.received {
  align-self: flex-start;
  background: var(--msg-received);
  border-bottom-left-radius: 4px;
}

.message-content {
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text-primary);
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
}

.message-time {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}

.message-status {
  font-size: 14px;
}

.message-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.message-file:hover {
  background: rgba(0,0,0,0.25);
}

.message-file-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.message-file-info {
  flex: 1;
  overflow: hidden;
}

.message-file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-file-size {
  font-size: 11px;
  color: var(--text-muted);
}

.message-image {
  max-width: 100%;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.message-image:hover {
  opacity: 0.9;
}

.date-separator {
  text-align: center;
  margin: 16px 0;
}

.date-separator span {
  padding: 4px 14px;
  background: var(--bg-input);
  border-radius: var(--radius-xl);
  font-size: 12px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   TYPING INDICATOR
   ═══════════════════════════════════════════ */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.typing-dots {
  display: flex;
  gap: 3px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
  animation: typingBounce 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ═══════════════════════════════════════════
   MESSAGE INPUT
   ═══════════════════════════════════════════ */
.message-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-header);
  border-top: 1px solid var(--border);
}

.message-input-container input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}

.message-input-container input:focus {
  border-color: var(--primary);
}

.message-input-container input::placeholder {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   ATTACH MENU (WhatsApp tarzi)
   ═══════════════════════════════════════════ */
.attach-menu {
  position: absolute;
  bottom: 70px;
  left: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  gap: 16px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.2s ease;
}

.attach-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.attach-menu-item:hover {
  transform: scale(1.1);
}

.attach-menu-item span {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.attach-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-input-container {
  position: relative;
}

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}

.send-btn:active {
  transform: scale(0.95);
}

/* ═══════════════════════════════════════════
   SUB HEADER (Contacts, Profile)
   ═══════════════════════════════════════════ */
.sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
}

.sub-header h3 {
  font-size: 18px;
  font-weight: 600;
}

/* ═══════════════════════════════════════════
   CONTACTS
   ═══════════════════════════════════════════ */
.add-contact-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.add-contact-bar input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.add-contact-bar input:focus {
  border-color: var(--primary);
}

.contacts-list {
  flex: 1;
  overflow-y: auto;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

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

.contact-item .avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.contact-item-info {
  margin-left: 14px;
}

.contact-item-name {
  font-size: 16px;
  font-weight: 500;
}

.contact-item-status {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════
   PROFILE
   ═══════════════════════════════════════════ */
.profile-container {
  flex: 1;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
  box-shadow: var(--shadow-glow);
}

.profile-info {
  width: 100%;
  max-width: 400px;
}

/* ═══════════════════════════════════════════
   CALL SCREEN
   ═══════════════════════════════════════════ */
.call-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.call-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #0a2e28 0%, #0b141a 50%, #1a0a2e 100%);
  z-index: 0;
}

.call-bg::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  animation: callPulse 3s infinite;
}

@keyframes callPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.3; }
  50% { transform: translateX(-50%) scale(1.2); opacity: 0.6; }
}

.call-info {
  text-align: center;
  z-index: 1;
}

.call-avatar {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 24px;
  box-shadow: 0 0 40px var(--accent-glow);
  animation: callAvatarPulse 2s infinite;
}

@keyframes callAvatarPulse {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 60px var(--accent-glow); }
}

.call-info h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.call-info p {
  font-size: 16px;
  color: var(--text-secondary);
}

#call-timer {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.call-video-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 100px;
  z-index: 1;
}

#remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

#local-video {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 120px;
  height: 160px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #333;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-md);
}

.call-actions {
  display: flex;
  gap: 24px;
  z-index: 2;
  margin-top: 60px;
}

.call-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: var(--radius-lg);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  min-width: 70px;
}

.call-btn:hover {
  background: rgba(255,255,255,0.15);
}

.call-btn span {
  font-size: 12px;
  color: var(--text-secondary);
}

.call-btn.call-end {
  background: var(--danger);
}

.call-btn.call-end:hover {
  background: #dc2626;
}

.call-btn.call-accept {
  background: var(--accent);
}

.call-btn.call-accept:hover {
  background: #1db954;
}

.call-btn.active {
  background: var(--primary-dark);
}

/* ═══════════════════════════════════════════
   INCOMING CALL MODAL
   ═══════════════════════════════════════════ */
.call-modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-modal);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

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

.call-modal-content {
  text-align: center;
  padding: 40px;
  animation: fadeInUp 0.5s ease;
}

.call-modal-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 20px;
  animation: callAvatarPulse 1.5s infinite;
}

.call-modal-content h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}

.call-modal-content p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.call-modal-actions {
  display: flex;
  gap: 32px;
  justify-content: center;
}

/* ═══════════════════════════════════════════
   SERVER SECTION
   ═══════════════════════════════════════════ */
.server-section {
  width: 100%;
  max-width: 400px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.server-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.server-info-box {
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.server-info-box.online {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.server-info-box.offline {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.refresh-btn {
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
}

.refresh-btn:hover {
  border-color: var(--primary) !important;
}

/* ═══════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════ */
.toast {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: var(--shadow-md);
  z-index: 2000;
  animation: toastIn 0.3s ease;
  white-space: nowrap;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════
   SCREEN SHARE & REMOTE CONTROL
   ═══════════════════════════════════════════ */
.screen-view-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  position: relative;
  overflow: hidden;
}

.screen-view-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.screen-share-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.remote-input-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: crosshair;
  z-index: 5;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (min-width: 481px) {
  #app {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}
