:root {
  /* Color Palette */
  --royal-blue: #1e3a8a;
  --neon-blue: #00f0ff;
  --sky-blue: #38bdf8;
  --soft-cyan: #bae6fd;
  
  /* Backgrounds */
  --bg-dark: #020617; /* Deep midnight blue/black */
  --bg-card: rgba(15, 23, 42, 0.6); /* Frosted glass */
  
  /* Accents */
  --primary: #38bdf8;
  --primary-hover: #00f0ff;
  
  /* Text */
  --text-main: #ffffff; /* Clean white */
  --text-muted: #94a3b8;
  
  /* UI Colors */
  --danger: #ef4444;
  --success: #10b981;
  --border-color: rgba(56, 189, 248, 0.15); /* Soft cyan border */
  
  /* Effects */
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow: 0 0 20px rgba(0, 240, 255, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background: radial-gradient(circle at top left, #0f172a 0%, #020617 100%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
  color: var(--primary-hover);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

/* Glassmorphism Cards */
.auth-card, .user-card, .profile-card, .step-card, .chat-header, .chat-input-area, .modal-content {
  background: var(--bg-card) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-glass) !important;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

/* Background Glowing Orbs for extra premium feel */
.auth-container::before {
  content: '';
  position: absolute;
  top: -10%; left: -10%; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
  z-index: -1;
}

.auth-container::after {
  content: '';
  position: absolute;
  bottom: -10%; right: -10%; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,240,255,0.15) 0%, transparent 70%);
  z-index: -1;
}

.auth-card {
  padding: 40px;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
  background: linear-gradient(135deg, #ffffff, var(--soft-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
  font-size: 14px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--soft-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  background: rgba(2, 6, 23, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 15px;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
  background: rgba(2, 6, 23, 0.6);
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--royal-blue) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--neon-blue) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.alert {
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  backdrop-filter: blur(8px);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ff7675;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #55efc4;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.auth-links {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* Home Page Specific Refinements */
.profile-card {
  transition: all 0.3s ease !important;
}

.profile-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-glow) !important;
  border-color: var(--primary) !important;
}

.profile-img {
  border-bottom: 1px solid var(--border-color);
}

.status-dot.online {
  background: var(--neon-blue) !important;
  box-shadow: 0 0 8px var(--neon-blue);
}

/* Chat Specific Refinements */
.message.user {
  background: linear-gradient(135deg, var(--royal-blue), var(--primary)) !important;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.message.profile {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color);
}

.chat-input {
  background: rgba(2, 6, 23, 0.5) !important;
}

.send-btn {
  background: linear-gradient(135deg, var(--primary), var(--neon-blue)) !important;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.3);
  transition: all 0.3s ease;
}

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

/* Video Call specific additions */
.local-video-mock {
  border: 2px solid var(--neon-blue) !important;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3) !important;
}

.control-btn {
  backdrop-filter: blur(10px);
}

.btn-end {
  background: rgba(239, 68, 68, 0.8) !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.btn-end:hover {
  background: #ef4444 !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
}

/* Custom Scrollbar for a polished feel */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.8);
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}

/* ==========================================
   Premium Global Sticky Navbar
   ========================================== */
.main-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.nav-logo:hover {
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.logo-accent {
  color: var(--primary);
  background: linear-gradient(135deg, var(--neon-blue), var(--sky-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

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

.nav-balance {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
}

.balance-amount {
  color: var(--success);
}

.nav-btn {
  background: linear-gradient(135deg, var(--royal-blue) 0%, var(--primary) 100%);
  color: white;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--neon-blue) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  color: var(--danger) !important;
  box-shadow: none !important;
}

.btn-logout:hover {
  background: var(--danger) !important;
  color: white !important;
  border-color: var(--danger) !important;
}

/* Mobile Hamburger Menu */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-menu .bar {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Page Content Padding for Fixed Navbar */
.page-content {
  padding-top: 80px; /* Adjust based on navbar height */
  min-height: calc(100vh - 180px);
}

/* ==========================================
   Premium Footer
   ========================================== */
.main-footer {
  background: rgba(2, 6, 23, 0.9);
  border-top: 1px solid var(--border-color);
  padding: 40px 24px 20px;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: center;
}

.footer-info .footer-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  display: inline-block;
}

.footer-info p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 400px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-main);
}

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hamburger-menu {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 250px;
    height: calc(100vh - 70px);
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    flex-direction: column;
    padding: 40px 24px;
    gap: 20px;
    align-items: stretch;
    transition: right 0.3s ease;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}
