/* Global Styles */
:root {
  --dark-bg: #121212;
  --text-color: #ffffff;
  --text-secondary: #b3b3b3;
  --accent-purple: #8a2be2;
  --accent-teal: #00ced1;
  --secondary-bg: #1e1e1e;
  --card-bg: #252525;
  --gradient-bg: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-teal) 100%);
  --transition-speed: 0.3s;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
}

h1 span {
  background: var(--gradient-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2.2rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed) ease;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: all 0.4s ease;
  background: transparent;
}

.header.scrolled {
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  margin-left: 30px;
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-bg);
  transition: width var(--transition-speed) ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  gap: 10px;
}

.btn-primary {
  background: var(--gradient-bg);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(138, 43, 226, 0.6);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent-teal);
  color: var(--accent-teal);
}

.btn-secondary:hover {
  background: rgba(0, 206, 209, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 206, 209, 0.3);
}

/* Hero Section */
.hero {
  padding: 160px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 50px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.guarantee {
  font-size: 0.9rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-visual {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* AI Avatar & Pulse */
.ai-avatar {
  position: relative;
  z-index: 2;
}

.ai-avatar img {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--accent-purple);
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.5);
  position: relative;
  z-index: 2;
  transition: transform 0.5s ease;
}

.ai-avatar:hover img {
  transform: scale(1.02);
}

.pulse-ring, .pulse-ring-2 {
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

.pulse-ring {
  width: 380px;
  height: 380px;
  border: 2px solid var(--accent-purple);
  animation: pulse-animation 3s infinite;
}

.pulse-ring-2 {
  width: 420px;
  height: 420px;
  border: 2px solid var(--accent-teal);
  animation: pulse-animation 4s infinite 1s;
}

@keyframes pulse-animation {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0;
  }
}

/* Floating Features */
.floating-features {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
}

.feature-bubble {
  position: absolute;
  background: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 20px;
  padding: 12px 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.feature-bubble i {
  color: var(--accent-teal);
}

.feature-bubble:hover {
  transform: scale(1.1) !important;
}

.bubble-1 {
  top: 10%;
  right: 0;
  animation: float 6s ease-in-out infinite;
}

.bubble-2 {
  bottom: 15%;
  left: -20px;
  animation: float 7s ease-in-out infinite 1s;
}

.bubble-3 {
  bottom: 5%;
  right: 10%;
  animation: float 8s ease-in-out infinite 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Features Section */
.features {
  padding: 100px 0;
  background-color: var(--secondary-bg);
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
  font-size: 2.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--card-bg);
  padding: 40px 30px;
  border-radius: 20px;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
  transform: translateY(-10px);
  background: #2a2a2a;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-purple);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 25px;
  background: var(--gradient-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

/* Footer */
.footer {
  padding: 50px 0;
  background-color: #0a0a0a;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
}

.social-links {
  margin-bottom: 20px;
}

.social-links a {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin: 0 15px;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-teal);
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.6;
}

/* Animations */
.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.pulse-animation {
  animation: pulse-btn 2s infinite;
}

@keyframes pulse-btn {
  0% { box-shadow: 0 0 0 0 rgba(138, 43, 226, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(138, 43, 226, 0); }
  100% { box-shadow: 0 0 0 0 rgba(138, 43, 226, 0); }
}

/* Responsive */
@media (max-width: 992px) {
  .hero-layout {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-content {
    margin-bottom: 50px;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .guarantee {
    justify-content: center;
  }
  
  h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-link {
    display: none;
  }
  
  .ai-avatar img {
    width: 280px;
    height: 280px;
  }
  
  .pulse-ring { width: 300px; height: 300px; }
  .pulse-ring-2 { width: 340px; height: 340px; }
  
  .download-content {
    padding: 30px;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--card-bg);
  border: 1px solid var(--accent-purple);
  padding: 40px;
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  position: relative;
  box-shadow: 0 0 50px rgba(138, 43, 226, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
  transform: scale(1);
}

/* Animated Developer Profile */
.animated-modal {
  background: linear-gradient(145deg, #1a1a1a, #252525);
  border: 1px solid rgba(138, 43, 226, 0.3);
  overflow: hidden;
}

.animated-modal::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.1) 0%, transparent 70%);
  animation: rotate-bg 10s linear infinite;
  pointer-events: none;
}

@keyframes rotate-bg {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dev-profile {
  position: relative;
  z-index: 2;
  text-align: center;
}

.dev-avatar-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 25px;
}

.dev-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-teal);
  box-shadow: 0 0 25px rgba(0, 206, 209, 0.4);
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.dev-avatar:hover {
  transform: scale(1.05) rotate(5deg);
}

.dev-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent-purple);
  animation: pulse-ring 2s infinite;
  z-index: 1;
}

@keyframes pulse-ring {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.dev-role {
  color: var(--accent-teal);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dev-bio {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 25px;
  color: rgba(255, 255, 255, 0.9);
}

.dev-skills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background: rgba(138, 43, 226, 0.15);
  color: var(--accent-purple);
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(138, 43, 226, 0.3);
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: var(--accent-purple);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  color: var(--text-secondary);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10;
}

.close-modal:hover {
  color: var(--accent-teal);
}

.modal-content h2 {
  color: white;
  margin-bottom: 10px;
  font-size: 2.2rem;
  background: var(--gradient-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-color);
}

/* Chat Modal Styles */
.chat-modal-content {
  max-width: 800px;
  height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 1px solid rgba(138, 43, 226, 0.3);
  box-shadow: 0 0 60px rgba(138, 43, 226, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.5);
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* Full Screen Chat Overrides */
.full-screen-modal {
  background-color: var(--dark-bg);
  backdrop-filter: none;
  height: 100dvh; /* Use dynamic viewport height for mobile */
  align-items: flex-start; /* Ensure it starts from the very top */
  padding: 0; /* Remove any padding */
}

.full-screen-content {
  max-width: 100% !important;
  width: 100% !important;
  height: 100dvh !important; /* Use dynamic viewport height */
  border-radius: 0 !important;
  border: none !important;
  transform: none !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  margin: 0; /* Ensure no margin */
}

.chat-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top)); /* Safe area for notch */
  background: rgba(26, 26, 26, 0.95); /* Match theme color #1a1a1a */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}

.chat-modal-content h2 {
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  font-size: 1.8rem;
}

.close-chat {
  position: absolute;
  top: max(30px, env(safe-area-inset-top)); /* Adjust for safe area */
  right: 20px;
  color: var(--text-secondary);
  font-size: 24px; /* Slightly smaller for mobile */
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 20;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  background: rgba(0,0,0,0.5);
  width: 40px; /* Smaller touch target visual */
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  position: relative;
  background: 
    radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.05) 0%, transparent 50%),
    linear-gradient(rgba(0,0,0,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.1) 1px, transparent 1px);
  background-size: 100% 100%, 20px 20px, 20px 20px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 100px; /* Extra space for input area */
  display: flex;
  flex-direction: column;
  gap: 20px;
  perspective: 1000px;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.message-container {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 80%;
}

.bot-container {
  align-self: flex-start;
}

.user-container {
  align-self: flex-end;
  justify-content: flex-end;
}

.message-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent-teal);
  box-shadow: 0 0 5px rgba(0, 206, 209, 0.3);
  flex-shrink: 0;
  display: block;
  animation: avatarPulse 2s infinite;
}

@keyframes avatarPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 206, 209, 0.4); transform: scale(1); }
  70% { box-shadow: 0 0 0 6px rgba(0, 206, 209, 0); transform: scale(1.05); }
  100% { box-shadow: 0 0 0 0 rgba(0, 206, 209, 0); transform: scale(1); }
}

.message {
  max-width: 100%;
  padding: 15px 20px;
  border-radius: 18px;
  font-size: 1rem;
  line-height: 1.6;
  word-wrap: break-word;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  opacity: 0;
  animation: messageSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transform-origin: bottom left;
}

@keyframes messageSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9) rotateX(-10deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
  }
}

.bot-message {
  align-self: flex-start;
  background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
  color: var(--text-color);
  border-bottom-left-radius: 5px;
  border-left: 3px solid var(--accent-teal);
}

.user-message {
  align-self: flex-end;
  background: var(--gradient-bg);
  color: white;
  border-bottom-right-radius: 5px;
  transform-origin: bottom right;
  border-right: 3px solid rgba(255,255,255,0.3);
}

.chat-input-area {
  padding: 15px;
  padding-bottom: max(15px, env(safe-area-inset-bottom)); /* Safe area for home indicator */
  background: rgba(20, 20, 20, 0.95); /* More opaque for mobile */
  backdrop-filter: blur(15px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
  z-index: 100; /* Increased z-index */
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  position: fixed; /* Fix to bottom of viewport */
  bottom: 0;
  left: 0;
  right: 0;
}

.chat-input-area input {
  flex: 1;
  padding: 15px 25px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}

.chat-input-area input:focus {
  border-color: var(--accent-teal);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 15px rgba(0, 206, 209, 0.2), inset 0 2px 5px rgba(0,0,0,0.2);
}

.chat-input-area button {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-bg);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.chat-input-area button:hover {
  transform: scale(1.1) rotate(-10deg);
  box-shadow: 0 8px 25px rgba(138, 43, 226, 0.6);
}

.chat-input-area button:active {
  transform: scale(0.95);
}

/* Upload button override - separate from gradient send button */
#uploadBtn {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  box-shadow: none !important;
  width: 50px !important;
  height: 50px !important;
  flex-shrink: 0;
  transition: all 0.3s ease !important;
  font-size: 1.1rem !important;
}

#uploadBtn:hover {
  background: rgba(0,206,209,0.15) !important;
  border-color: var(--accent-teal) !important;
  color: var(--accent-teal) !important;
  transform: scale(1.05) !important;
  box-shadow: 0 0 15px rgba(0,206,209,0.2) !important;
}

#imagePreviewContainer {
  position: fixed;
  bottom: 85px;
  left: 0;
  right: 0;
  z-index: 101;
  max-width: 1000px;
  margin: 0 auto;
}


/* ============================================================
   ADMIN PANEL STYLES
   ============================================================ */

/* Admin Nav Button */
.admin-nav-btn {
  background: linear-gradient(135deg, rgba(138,43,226,0.2), rgba(0,206,209,0.2));
  border: 1px solid rgba(138,43,226,0.4);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}
.admin-nav-btn:hover {
  background: linear-gradient(135deg, rgba(138,43,226,0.5), rgba(0,206,209,0.5));
  box-shadow: 0 0 15px rgba(138,43,226,0.4);
}

/* Admin Modal */
.admin-modal-content {
  background: #0d0d0d;
  display: flex;
  flex-direction: row !important;
  padding: 0 !important;
  overflow: hidden;
}

/* Admin Login Screen */
.admin-login-screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 60% 40%, rgba(138,43,226,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(0,206,209,0.1) 0%, transparent 50%),
              #0d0d0d;
  position: relative;
}
.admin-login-box {
  background: rgba(20,20,20,0.95);
  border: 1px solid rgba(138,43,226,0.3);
  border-radius: 20px;
  padding: 50px 40px;
  width: 380px;
  max-width: 90vw;
  position: relative;
  box-shadow: 0 0 60px rgba(138,43,226,0.2), 0 20px 60px rgba(0,0,0,0.5);
}
.admin-login-logo {
  text-align: center;
  margin-bottom: 35px;
}
.admin-login-logo i {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 12px;
}
.admin-login-logo h2 {
  font-size: 1.8rem;
  color: white;
  margin-bottom: 5px;
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.admin-login-logo p {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  margin: 0;
}
.admin-input-group {
  margin-bottom: 20px;
}
.admin-input-group label {
  display: block;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.admin-input-wrap {
  position: relative;
}
.admin-input-wrap i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-purple);
  font-size: 0.9rem;
}
.admin-input-wrap input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 13px 15px 13px 42px;
  color: white;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}
.admin-input-wrap input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px rgba(138,43,226,0.2);
}
.admin-login-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}
.admin-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(138,43,226,0.4);
}
.admin-login-err {
  color: #e74c3c;
  font-size: 0.85rem;
  text-align: center;
  margin: 10px 0 0;
  min-height: 20px;
}
.admin-close-btn-top {
  position: absolute;
  top: 15px;
  right: 18px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.admin-close-btn-top:hover {
  background: rgba(231,76,60,0.2);
  color: #e74c3c;
}

/* Admin Dashboard Layout */
.admin-dashboard {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.admin-sidebar {
  width: 220px;
  min-width: 220px;
  background: #111;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  padding: 0;
  transition: width 0.3s;
  overflow: hidden;
}
.admin-brand {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(135deg, rgba(138,43,226,0.1), rgba(0,206,209,0.05));
}
.admin-brand i {
  font-size: 1.3rem;
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.admin-brand span {
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.admin-nav {
  padding: 15px 0;
  flex: 1;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.45);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.admin-nav-item:hover {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.04);
}
.admin-nav-item.active {
  color: var(--accent-teal);
  background: rgba(0,206,209,0.06);
  border-left-color: var(--accent-teal);
}
.admin-nav-item i {
  width: 18px;
  text-align: center;
}
.admin-sidebar-footer {
  padding: 15px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}
.admin-online-dot {
  width: 8px;
  height: 8px;
  background: #2ecc71;
  border-radius: 50%;
  animation: blink-dot 2s infinite;
}
@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Admin Main Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0d0d0d;
}
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 25px;
  background: rgba(17,17,17,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.admin-topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-time {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  font-family: monospace;
  letter-spacing: 1px;
}
.admin-logout-btn {
  background: rgba(231,76,60,0.1);
  border: 1px solid rgba(231,76,60,0.3);
  color: #e74c3c;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-logout-btn:hover {
  background: rgba(231,76,60,0.2);
}

/* Admin Tabs */
.admin-tab {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 25px;
  scrollbar-width: thin;
  scrollbar-color: rgba(138,43,226,0.3) transparent;
}
.admin-tab.active { display: block; }

/* Stats Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.admin-stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-bg);
  opacity: 0.5;
}
.admin-stat-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(138,43,226,0.3);
  transform: translateY(-2px);
}
.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.stat-icon.purple { background: rgba(138,43,226,0.15); color: #8a2be2; }
.stat-icon.teal   { background: rgba(0,206,209,0.15);   color: #00ced1; }
.stat-icon.green  { background: rgba(46,204,113,0.15);  color: #2ecc71; }
.stat-icon.red    { background: rgba(231,76,60,0.15);   color: #e74c3c; }
.stat-info { flex: 1; }
.stat-number {
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}
.stat-trend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  align-self: flex-start;
}
.stat-trend.up  { background: rgba(46,204,113,0.15); color: #2ecc71; }
.stat-trend.down{ background: rgba(231,76,60,0.15);  color: #e74c3c; }
.stat-trend.neutral { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); }

/* Admin Row & Card */
.admin-row {
  display: flex;
  gap: 16px;
}
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.admin-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  overflow: hidden;
}
.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-card-header h3 {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-card-header h3 i {
  color: var(--accent-teal);
}
.admin-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Bar Chart */
.admin-chart-area {
  padding: 10px 0;
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
}
.bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(to top, #8a2be2, #00ced1);
  transition: height 0.8s ease;
  min-height: 4px;
}
.bar-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
}

/* System Status */
.system-status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.green  { background: #2ecc71; box-shadow: 0 0 6px #2ecc71; }
.status-dot.yellow { background: #f39c12; box-shadow: 0 0 6px #f39c12; }
.status-dot.red    { background: #e74c3c; box-shadow: 0 0 6px #e74c3c; }
.status-name { flex: 1; font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.status-val  { font-size: 0.8rem; color: rgba(255,255,255,0.4); }

/* Admin Table */
.admin-table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  white-space: nowrap;
}
.admin-table td {
  padding: 12px 14px;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: rgba(255,255,255,0.02);
}
.admin-table tr:last-child td { border-bottom: none; }
.user-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.user-badge.admin  { background: rgba(231,76,60,0.15);   color: #e74c3c; }
.user-badge.vip    { background: rgba(241,196,15,0.15);  color: #f1c40f; }
.user-badge.user   { background: rgba(0,206,209,0.12);   color: #00ced1; }
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.status-badge.active   { background: rgba(46,204,113,0.15); color: #2ecc71; }
.status-badge.inactive { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.35); }
.status-badge.banned   { background: rgba(231,76,60,0.15);   color: #e74c3c; }
.table-action-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 4px;
}
.table-action-btn:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}
.table-action-btn.danger:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

/* API Key Reveal */
.api-key-mask {
  font-family: monospace;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
}
.api-key-full {
  display: none;
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--accent-teal);
  word-break: break-all;
  white-space: normal;
  max-width: 200px;
}

/* API Config Grid */
.api-config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.api-config-item label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}
.api-config-value-wrap {
  display: flex;
  gap: 8px;
}
.admin-config-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 14px;
  color: white;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.3s;
}
.admin-config-input:focus {
  border-color: var(--accent-teal);
}
select.admin-config-input option {
  background: #1a1a1a;
  color: white;
}

/* Ping Monitor */
.ping-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 15px;
}
.ping-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid rgba(0,206,209,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(0,206,209,0.08), transparent);
  position: relative;
  box-shadow: 0 0 30px rgba(0,206,209,0.15);
}
.ping-circle::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(0,206,209,0.1);
  animation: ping-pulse 2s infinite;
}
@keyframes ping-pulse {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}
#pingValue {
  font-size: 2rem;
  font-weight: 700;
  color: #00ced1;
  line-height: 1;
}
.ping-circle small {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}
.ping-status-text {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}
.ping-history-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
  padding: 0 10px;
  margin-top: 10px;
}
.ping-bar {
  flex: 1;
  background: linear-gradient(to top, rgba(0,206,209,0.6), rgba(138,43,226,0.6));
  border-radius: 3px 3px 0 0;
  min-height: 3px;
  transition: height 0.4s ease;
}
.endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.endpoint-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
}
.endpoint-info { flex: 1; }
.endpoint-name { font-size: 0.85rem; color: rgba(255,255,255,0.7); font-weight: 500; }
.endpoint-url  { font-size: 0.72rem; color: rgba(255,255,255,0.3); margin-top: 2px; }
.endpoint-ping {
  font-family: monospace;
  font-size: 0.8rem;
  color: #00ced1;
  width: 55px;
  text-align: right;
}
.endpoint-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.endpoint-badge.green  { background: rgba(46,204,113,0.15); color: #2ecc71; }
.endpoint-badge.yellow { background: rgba(241,196,15,0.15);  color: #f1c40f; }
.endpoint-badge.red    { background: rgba(231,76,60,0.15);   color: #e74c3c; }

/* Log Terminal */
.log-terminal {
  background: #080808;
  border: 1px solid rgba(0,206,209,0.1);
  border-radius: 10px;
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  height: 380px;
  overflow-y: auto;
  line-height: 1.8;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,206,209,0.2) transparent;
}
.log-line { display: flex; gap: 12px; }
.log-time  { color: rgba(255,255,255,0.25); flex-shrink: 0; }
.log-level { width: 50px; font-weight: 700; flex-shrink: 0; }
.log-level.info  { color: #00ced1; }
.log-level.warn  { color: #f1c40f; }
.log-level.error { color: #e74c3c; }
.log-msg   { color: rgba(255,255,255,0.6); }

/* Settings */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.setting-item:last-child { border-bottom: none; }
.setting-title { font-size: 0.9rem; color: rgba(255,255,255,0.75); font-weight: 500; }
.setting-desc  { font-size: 0.78rem; color: rgba(255,255,255,0.3); margin-top: 3px; }
.admin-toggle  { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.admin-toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border-radius: 24px;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}
.admin-toggle input:checked + .toggle-slider { background: linear-gradient(135deg, #8a2be2, #00ced1); }
.admin-toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.admin-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 14px;
  color: white;
  font-size: 0.85rem;
  outline: none;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.3s;
}
.admin-textarea:focus { border-color: var(--accent-teal); }
.admin-form-group { margin-bottom: 16px; }
.admin-form-group label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}
.admin-form-group input,
.admin-form-group select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 11px 14px;
  color: white;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
}
.admin-form-group input:focus,
.admin-form-group select:focus { border-color: var(--accent-teal); }
.admin-form-group select option { background: #1a1a1a; }

/* Admin Buttons */
.admin-btn-primary {
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  border: none;
  color: white;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.admin-btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.admin-btn-primary.small { padding: 6px 12px; font-size: 0.78rem; }
.admin-btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.55);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.83rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.admin-btn-secondary:hover { background: rgba(255,255,255,0.08); color: white; }

/* Admin Search */
.admin-search-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 14px;
  color: white;
  font-size: 0.85rem;
  outline: none;
  width: 200px;
  transition: border-color 0.3s;
}
.admin-search-input:focus { border-color: var(--accent-teal); }

/* Admin Inner Modal (Add User) */
.admin-inner-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-inner-modal-content {
  background: #1a1a1a;
  border: 1px solid rgba(138,43,226,0.3);
  border-radius: 16px;
  padding: 30px;
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 0 40px rgba(138,43,226,0.2);
}
.admin-inner-modal-content h3 {
  color: white;
  margin-bottom: 20px;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.admin-inner-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* Responsive Admin */
@media (max-width: 768px) {
  .admin-sidebar { width: 55px; min-width: 55px; }
  .admin-sidebar .admin-brand span,
  .admin-sidebar .admin-nav-item span,
  .admin-sidebar .admin-sidebar-footer span { display: none; }
  .admin-brand { justify-content: center; padding: 15px; }
  .admin-nav-item { justify-content: center; padding: 14px; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-row { flex-direction: column; }
  .api-config-grid { grid-template-columns: 1fr; }
  .admin-search-input { width: 140px; }
}
@media (max-width: 480px) {
  .admin-stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-tab { padding: 15px; }
  .admin-topbar { padding: 12px 15px; }
}

/* Bar count label on top of bar */
.bar-count {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  min-height: 14px;
  text-align: center;
}

/* Shake animation for wrong password */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-6px); }
  40%,80% { transform: translateX(6px); }
}
.shake { animation: shake 0.4s ease; }

/* ============================================================
   AUTH FLOW STYLES
   ============================================================ */

.auth-modal-content {
  background: #0d0d0d;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-modal-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(138,43,226,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(0,206,209,0.12) 0%, transparent 50%);
  pointer-events: none;
}

/* Close X button */
.auth-close-x {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.07);
  border: none;
  color: rgba(255,255,255,0.5);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.auth-close-x:hover {
  background: rgba(231,76,60,0.2);
  color: #e74c3c;
}

/* Auth Step wrapper */
.auth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  padding: 20px;
  position: relative;
  z-index: 2;
}

/* Brand section */
.auth-brand {
  text-align: center;
  margin-bottom: 36px;
}

.auth-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(138,43,226,0.5);
  box-shadow: 0 0 25px rgba(138,43,226,0.3);
  margin-bottom: 16px;
  object-fit: cover;
}

.auth-otp-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(138,43,226,0.15), rgba(0,206,209,0.1));
  border: 2px solid rgba(138,43,226,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 16px;
  color: #8a2be2;
}

.auth-title {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.auth-title span {
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  color: rgba(255,255,255,0.4);
  font-size: 0.9rem;
  margin: 0;
}

/* Form */
.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-input-wrap {
  position: relative;
}
.auth-input-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(138,43,226,0.7);
  font-size: 0.95rem;
}
.auth-input-wrap input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 15px 16px 15px 46px;
  color: white;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}
.auth-input-wrap input:focus {
  border-color: var(--accent-purple);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 20px rgba(138,43,226,0.15);
}

.auth-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}
.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(138,43,226,0.4);
}
.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-err {
  font-size: 0.83rem;
  min-height: 18px;
  text-align: center;
}

.auth-note {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  margin: 0;
}

/* OTP Boxes */
.otp-boxes {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.otp-box {
  width: 48px;
  height: 56px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
  caret-color: var(--accent-teal);
}
.otp-box:focus {
  border-color: var(--accent-teal);
  background: rgba(0,206,209,0.08);
  box-shadow: 0 0 15px rgba(0,206,209,0.2);
}

@keyframes otp-shake {
  0%,100%{ transform: translateX(0); }
  20%,60%{ transform: translateX(-5px); }
  40%,80%{ transform: translateX(5px); }
}
.otp-shake { animation: otp-shake 0.4s ease; border-color: #e74c3c !important; }

/* Resend / back */
.auth-resend {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}
.auth-link-btn {
  background: none;
  border: none;
  color: var(--accent-teal);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0;
  transition: opacity 0.2s;
}
.auth-link-btn:hover  { opacity: 0.7; }
.auth-link-btn:disabled{ opacity: 0.35; cursor: not-allowed; }

.auth-back-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 6px 0;
  text-align: center;
  transition: color 0.2s;
}
.auth-back-btn:hover { color: rgba(255,255,255,0.65); }

/* Chat header user info */
.chat-header-user {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}
.chat-header-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: white;
}
.chat-header-status {
  font-size: 0.7rem;
  color: #2ecc71;
  letter-spacing: 0.3px;
}

/* Responsive */
@media (max-width: 480px) {
  .otp-box { width: 40px; height: 50px; font-size: 1.2rem; border-radius: 10px; }
  .otp-boxes { gap: 7px; }
  .auth-title { font-size: 1.7rem; }
  .auth-logo-img { width: 65px; height: 65px; }
}






/* ═══════════════════════════════════════════════════════════
   JARVIS VOICE ASSISTANT SECTION
═══════════════════════════════════════════════════════════ */
.voice-section {
  padding: 100px 0 80px;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,206,209,0.07) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(138,43,226,0.07) 0%, transparent 60%),
              var(--dark-bg);
  position: relative;
  overflow: hidden;
}
.voice-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,206,209,0.4), transparent);
}
.jarvis-wrapper {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.jarvis-avatar-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 460px;
}
.jarvis-hud-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,206,209,0.15);
  animation: hudSpin 20s linear infinite;
  pointer-events: none;
}
.ring-outer  { width: 340px; height: 340px; animation-duration: 30s; border-style: dashed; border-color: rgba(0,206,209,0.1); }
.ring-mid    { width: 280px; height: 280px; animation-duration: 20s; animation-direction: reverse; }
.ring-inner  { width: 220px; height: 220px; animation-duration: 12s; border-color: rgba(138,43,226,0.2); }
@keyframes hudSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
#jarvisCanvas {
  position: relative;
  z-index: 2;
  border-radius: 50%;
  filter: drop-shadow(0 0 30px rgba(0,206,209,0.35));
}
.jarvis-status-badge {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(0,206,209,0.3);
  border-radius: 20px;
  padding: 5px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-family: monospace;
  letter-spacing: 2px;
  color: rgba(0,206,209,0.8);
  z-index: 3;
  white-space: nowrap;
}
.jarvis-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #00ced1;
  box-shadow: 0 0 8px #00ced1;
  animation: dotPulse 2s ease-in-out infinite;
}
.jarvis-dot.speaking { background: #8a2be2; box-shadow: 0 0 8px #8a2be2; animation-duration: 0.4s; }
.jarvis-dot.listening { background: #e74c3c; box-shadow: 0 0 8px #e74c3c; animation-duration: 0.6s; }
@keyframes dotPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.6)} }
.jarvis-controls-box { display: flex; flex-direction: column; gap: 16px; }
.jarvis-screen {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,206,209,0.2);
  border-radius: 12px;
  overflow: hidden;
}
.jarvis-screen-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(0,206,209,0.1);
}
.jarvis-screen-dot { width: 10px; height: 10px; border-radius: 50%; }
.jarvis-screen-dot.red    { background: #e74c3c; }
.jarvis-screen-dot.yellow { background: #f39c12; }
.jarvis-screen-dot.green  { background: #2ecc71; }
.jarvis-transcript {
  height: 200px;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.jarvis-transcript::-webkit-scrollbar { width: 4px; }
.jarvis-transcript::-webkit-scrollbar-thumb { background: rgba(0,206,209,0.3); border-radius: 2px; }
.jarvis-msg { display: flex; flex-direction: column; gap: 3px; }
.jarvis-speaker { font-size: 0.62rem; font-family: monospace; letter-spacing: 1.5px; font-weight: 700; }
.jarvis-msg.system .jarvis-speaker { color: rgba(0,206,209,0.5); }
.jarvis-msg.user   .jarvis-speaker { color: rgba(138,43,226,0.7); }
.jarvis-msg.ai     .jarvis-speaker { color: rgba(0,206,209,0.8); }
.jarvis-msg-text { font-size: 0.82rem; color: rgba(255,255,255,0.75); line-height: 1.5; }
.jarvis-msg.ai .jarvis-msg-text { color: rgba(200,255,255,0.9); }
.jarvis-typing::after { content: '▌'; animation: blink 0.7s step-end infinite; color: #00ced1; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.jarvis-wave-container {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,206,209,0.1);
  border-radius: 8px;
  overflow: hidden;
  height: 60px;
}
#waveCanvas { display: block; }
.jarvis-btn-row { display: flex; align-items: center; gap: 16px; }
.jarvis-mic-btn {
  position: relative;
  width: 70px; height: 70px;
  border-radius: 50%;
  border: 2px solid rgba(0,206,209,0.5);
  background: rgba(0,206,209,0.08);
  color: #00ced1;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  outline: none;
}
.jarvis-mic-btn:hover { background: rgba(0,206,209,0.18); border-color: #00ced1; box-shadow: 0 0 20px rgba(0,206,209,0.3); }
.jarvis-mic-btn.active { background: rgba(231,76,60,0.15); border-color: #e74c3c; color: #e74c3c; box-shadow: 0 0 25px rgba(231,76,60,0.4); animation: micPulse 0.8s ease-in-out infinite; }
@keyframes micPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }
.jarvis-mic-ripple {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(0,206,209,0.3);
  animation: ripple 2s ease-out infinite;
  pointer-events: none;
}
@keyframes ripple { 0%{transform:scale(1);opacity:0.6} 100%{transform:scale(1.5);opacity:0} }
.jarvis-btn-labels { display: flex; flex-direction: column; gap: 4px; }
.jarvis-btn-label { font-size: 0.75rem; font-family: monospace; letter-spacing: 1.5px; color: rgba(0,206,209,0.7); font-weight: 600; }
.jarvis-btn-sublabel { font-size: 0.65rem; color: rgba(255,255,255,0.3); min-height: 14px; }
.jarvis-stop-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(138,43,226,0.5);
  background: rgba(138,43,226,0.1); color: #8a2be2;
  font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; outline: none; flex-shrink: 0;
}
.jarvis-stop-btn:hover { background: rgba(138,43,226,0.2); box-shadow: 0 0 15px rgba(138,43,226,0.3); }
.jarvis-quick-cmds { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.jarvis-quick-label { font-size: 0.68rem; font-family: monospace; color: rgba(255,255,255,0.25); letter-spacing: 1px; }
.jarvis-quick-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 5px 13px;
  font-size: 0.72rem; color: rgba(255,255,255,0.5);
  cursor: pointer; transition: all 0.25s ease; font-family: 'Roboto', sans-serif;
}
.jarvis-quick-btn:hover { background: rgba(0,206,209,0.1); border-color: rgba(0,206,209,0.3); color: rgba(0,206,209,0.9); }
@media (max-width: 768px) {
  .jarvis-wrapper { grid-template-columns: 1fr; gap: 24px; }
  .jarvis-avatar-box { height: 300px; }
  #jarvisCanvas { width: 220px !important; height: 290px !important; }
  .ring-outer { width: 240px; height: 240px; }
  .ring-mid   { width: 200px; height: 200px; }
  .ring-inner { width: 160px; height: 160px; }
}

/* ═══════════════════════════════════════════
   REBEL AI VOICE AVATAR BUTTON
════════════════════════════════════════════ */
.btn-voice-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: linear-gradient(135deg, rgba(0,206,209,0.15), rgba(138,43,226,0.15));
  border: 1.5px solid rgba(0,206,209,0.5);
  border-radius: 50px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
}
.btn-voice-avatar:hover {
  background: linear-gradient(135deg, rgba(0,206,209,0.3), rgba(138,43,226,0.3));
  border-color: rgba(0,206,209,0.9);
  box-shadow: 0 0 25px rgba(0,206,209,0.4), 0 0 60px rgba(138,43,226,0.2);
  transform: translateY(-2px);
}
.voice-btn-glow {
  position: absolute;
  width: 60px; height: 60px;
  background: radial-gradient(circle, rgba(0,206,209,0.6), transparent 70%);
  border-radius: 50%;
  top: 50%; left: 20px;
  transform: translateY(-50%);
  animation: voiceBtnPulse 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes voiceBtnPulse {
  0%,100% { opacity: 0.4; transform: translateY(-50%) scale(1); }
  50% { opacity: 0.9; transform: translateY(-50%) scale(1.4); }
}

/* ═══════════════════════════════════════════
   REBEL AI VOICE AVATAR MODAL
════════════════════════════════════════════ */
.va-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(16px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.va-overlay.show { display: flex; }

.va-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 95vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #0d0d1a 0%, #111120 60%, #0a0a15 100%);
  border: 1px solid rgba(0,206,209,0.2);
  border-radius: 24px;
  padding: 28px 24px 20px;
  box-shadow: 0 0 60px rgba(0,206,209,0.08), 0 0 120px rgba(138,43,226,0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,206,209,0.2) transparent;
}

.va-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 0.85rem;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.va-close:hover { background: rgba(231,76,60,0.2); border-color: rgba(231,76,60,0.4); color: #e74c3c; }

.va-header { text-align: center; }
.va-title-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,206,209,0.08);
  border: 1px solid rgba(0,206,209,0.2);
  border-radius: 20px; padding: 5px 16px;
  font-size: 0.72rem; letter-spacing: 2px;
  color: rgba(0,206,209,0.8); font-family: monospace;
  text-transform: uppercase; margin-bottom: 8px;
}
.va-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #00ced1;
  animation: vaPulse 1.2s ease-in-out infinite;
}
@keyframes vaPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.6)} }
.va-subtitle {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
}

/* ── Avatar Stage ── */
.va-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 360px;
}
.va-hud {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,206,209,0.12);
  animation: vaHudSpin 12s linear infinite;
}
.va-hud-1 { width: 320px; height: 320px; }
.va-hud-2 { width: 270px; height: 270px; border-color: rgba(138,43,226,0.12); animation-duration: 9s; animation-direction: reverse; }
.va-hud-3 { width: 220px; height: 220px; animation-duration: 6s; }
@keyframes vaHudSpin { from{transform:rotate(0)} to{transform:rotate(360deg)} }

#vaCanvas { position: relative; z-index: 2; }

.va-status-pill {
  position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,206,209,0.25);
  border-radius: 20px; padding: 4px 14px;
  font-size: 0.68rem; letter-spacing: 2px;
  color: rgba(255,255,255,0.5); font-family: monospace;
  z-index: 3;
}
.va-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(0,206,209,0.5);
  transition: background 0.3s;
}
.va-status-dot.listening { background: #00ff88; animation: vaPulse 0.6s ease-in-out infinite; }
.va-status-dot.speaking  { background: #ff6b35; animation: vaPulse 0.4s ease-in-out infinite; }
.va-status-dot.thinking  { background: #8a2be2; animation: vaPulse 0.8s ease-in-out infinite; }

/* ── Waveform ── */
.va-waveform {
  display: block; width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,206,209,0.1);
  border-radius: 10px;
}

/* ── Transcript ── */
.va-transcript-box {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 14px;
  max-height: 110px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,206,209,0.2) transparent;
  font-size: 0.82rem;
}
.va-msg { display: flex; align-items: flex-start; gap: 8px; }
.va-tag {
  flex-shrink: 0;
  font-size: 0.6rem; font-family: monospace; letter-spacing: 1px;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.35);
  margin-top: 1px;
}
.va-msg.va-user .va-tag { background: rgba(0,206,209,0.15); color: rgba(0,206,209,0.7); }
.va-msg.va-ai   .va-tag { background: rgba(138,43,226,0.15); color: rgba(138,43,226,0.8); }
.va-msg.va-sys  .va-tag { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.25); }
.va-msg span:last-child { color: rgba(255,255,255,0.7); line-height: 1.5; }

/* ── Controls ── */
.va-controls {
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.va-mic-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  width: 80px; height: 80px;
  background: linear-gradient(135deg, rgba(0,206,209,0.15), rgba(138,43,226,0.15));
  border: 1.5px solid rgba(0,206,209,0.4);
  border-radius: 50%;
  color: #fff; cursor: pointer; font-size: 1.3rem;
  transition: all 0.3s ease;
  overflow: hidden;
}
.va-mic-btn:hover, .va-mic-btn.active {
  background: linear-gradient(135deg, rgba(0,206,209,0.35), rgba(138,43,226,0.3));
  border-color: #00ced1;
  box-shadow: 0 0 30px rgba(0,206,209,0.5);
}
.va-mic-label { font-size: 0.48rem; letter-spacing: 1.5px; font-family: monospace; color: rgba(255,255,255,0.5); }
.va-mic-ripple {
  position: absolute; width: 100%; height: 100%;
  border-radius: 50%;
  background: rgba(0,206,209,0.1);
  animation: vaRipple 2s ease-out infinite;
  pointer-events: none;
}
@keyframes vaRipple {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}
.va-mic-btn.active .va-mic-ripple { background: rgba(0,255,136,0.2); animation-duration: 0.8s; }

.va-stop-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,107,53,0.15);
  border: 1px solid rgba(255,107,53,0.4);
  color: #ff6b35; cursor: pointer; font-size: 1rem;
  transition: all 0.25s;
}
.va-stop-btn:hover { background: rgba(255,107,53,0.3); }

/* ── Quick Commands ── */
.va-quick-cmds {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.va-quick {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 5px 14px;
  font-size: 0.74rem; color: rgba(255,255,255,0.45);
  cursor: pointer; transition: all 0.2s;
  font-family: 'Roboto', sans-serif;
}
.va-quick:hover {
  background: rgba(0,206,209,0.1);
  border-color: rgba(0,206,209,0.35);
  color: rgba(0,206,209,0.9);
}

@media (max-width: 540px) {
  .va-stage { height: 280px; }
  #vaCanvas { width: 240px !important; height: 270px !important; }
  .va-hud-1 { width: 240px; height: 240px; }
  .va-hud-2 { width: 200px; height: 200px; }
  .va-hud-3 { width: 160px; height: 160px; }
}


/* ── Voice Avatar — Voice Selector ─────────────────────── */
.va-voice-selector {
  width: 100%;
  padding: 10px 16px 4px;
}

.va-voice-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: rgba(0,206,209,0.6);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.va-voice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.va-voice-btn {
  background: rgba(0,206,209,0.04);
  border: 1px solid rgba(0,206,209,0.18);
  border-radius: 10px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.va-voice-btn:hover {
  background: rgba(0,206,209,0.12);
  border-color: rgba(0,206,209,0.5);
  transform: translateY(-1px);
}

.va-voice-btn.active {
  background: rgba(0,206,209,0.15);
  border-color: #00ced1;
  box-shadow: 0 0 12px rgba(0,206,209,0.3);
}

.va-voice-btn.active::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.6rem;
  color: #00ced1;
}

.va-voice-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.va-voice-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.05em;
}

.va-voice-tag {
  font-size: 0.55rem;
  color: rgba(0,206,209,0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Voice Tabs ─────────────────────────────────────────── */
.va-voice-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.va-vtab {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.68rem;
  font-family: monospace;
  letter-spacing: 0.08em;
  border-radius: 8px;
  border: 1px solid rgba(0,206,209,0.18);
  background: rgba(0,206,209,0.04);
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.2s;
}
.va-vtab.active {
  background: rgba(0,206,209,0.14);
  border-color: #00ced1;
  color: #00ced1;
  box-shadow: 0 0 10px rgba(0,206,209,0.18);
}
.va-vtab:hover:not(.active) {
  background: rgba(0,206,209,0.08);
  color: rgba(255,255,255,0.65);
}

/* hidden grid panel */
.va-voice-grid-hidden { display: none !important; }

/* Section divider label inside grid */
.va-voice-section-label {
  grid-column: 1 / -1;
  font-size: 0.58rem;
  font-family: monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(138,43,226,0.7);
  padding: 4px 0 2px;
  border-bottom: 1px solid rgba(138,43,226,0.15);
  margin-bottom: 2px;
}
/* ── API Key Inputs ────────────────────────────────────── */
.va-api-keys {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.va-api-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.va-api-badge {
  font-size: 0.58rem;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.06em;
  padding: 3px 6px;
  border-radius: 5px;
  flex-shrink: 0;
}
.va-api-badge.azure  { background: rgba(0,120,212,0.25); color: #4fc3f7; border: 1px solid rgba(0,120,212,0.4); }
.va-api-badge.google { background: rgba(66,133,244,0.2);  color: #90caf9; border: 1px solid rgba(66,133,244,0.35); }

.va-api-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,206,209,0.18);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 0.65rem;
  font-family: monospace;
  color: rgba(255,255,255,0.75);
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}
.va-api-input:focus { border-color: rgba(0,206,209,0.55); }
.va-api-input::placeholder { color: rgba(255,255,255,0.25); }

.va-api-region { max-width: 80px; }

.va-api-save-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  font-size: 0.62rem;
  font-family: monospace;
  letter-spacing: 0.06em;
  background: rgba(0,206,209,0.1);
  border: 1px solid rgba(0,206,209,0.3);
  border-radius: 7px;
  color: #00ced1;
  cursor: pointer;
  transition: all 0.2s;
}
.va-api-save-btn:hover { background: rgba(0,206,209,0.2); }

.va-api-status {
  font-size: 0.62rem;
  font-family: monospace;
  letter-spacing: 0.06em;
  min-height: 14px;
  padding-left: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   ACCESS REBEL AI BUTTON
═══════════════════════════════════════════════════════════════ */
.btn-access-rebel {
  position: relative;
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  color: #fff !important;
  border: none;
  overflow: hidden;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.btn-access-rebel:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(138,43,226,0.45);
}
.access-btn-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #8a2be2, #00ced1, #8a2be2);
  border-radius: inherit;
  background-size: 200% 200%;
  animation: accessGlow 2.5s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}
.btn-access-rebel:hover .access-btn-glow { opacity: 0.5; }
@keyframes accessGlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.btn-access-rebel i, .btn-access-rebel span { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════════
   ACCESS REBEL MODAL (Picker)
═══════════════════════════════════════════════════════════════ */
.access-rebel-content {
  background: linear-gradient(160deg, #0d0d1e 0%, #12122a 100%);
  border: 1px solid rgba(138,43,226,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 480px !important;
  margin: auto;
  border-radius: 20px;
  padding: 40px 30px;
}
.access-rebel-inner { width: 100%; text-align: center; }
.access-rebel-logo { margin-bottom: 32px; }
.access-rebel-logo .auth-logo-img { width: 70px; height: 70px; border-radius: 50%; border: 2px solid rgba(138,43,226,0.4); margin-bottom: 12px; }
.access-rebel-btns { display: flex; flex-direction: column; gap: 14px; }
.access-option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  color: white;
}
.access-option-btn:hover {
  background: rgba(138,43,226,0.12);
  border-color: rgba(138,43,226,0.4);
  transform: translateX(4px);
}
.access-option-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(138,43,226,0.25), rgba(0,206,209,0.15));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-purple);
  flex-shrink: 0;
}
.access-option-icon.voice { color: var(--accent-teal); background: linear-gradient(135deg,rgba(0,206,209,0.25),rgba(138,43,226,0.15)); }
.access-option-info { flex: 1; }
.access-option-title { display: block; font-weight: 600; font-size: 0.95rem; color: white; }
.access-option-desc  { display: block; font-size: 0.76rem; color: rgba(255,255,255,0.4); margin-top: 2px; }
.access-option-arrow { color: rgba(255,255,255,0.2); font-size: 0.8rem; }

/* ═══════════════════════════════════════════════════════════════
   AUTH MODAL — Password inputs
═══════════════════════════════════════════════════════════════ */
.auth-input-wrap + .auth-input-wrap { margin-top: 12px; }

/* ═══════════════════════════════════════════════════════════════
   REBEL AI VOICE ASSISTANT — FUTURISTIC UI v2
   Mobile-first, desktop expands to side-by-side layout
═══════════════════════════════════════════════════════════════ */
.rai-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(12px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.rai-overlay.show { display: flex; }

.rai-modal {
  background: linear-gradient(160deg, #06061a 0%, #0c0c24 60%, #0a0a1e 100%);
  border: 1px solid rgba(0,206,209,0.18);
  border-radius: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Desktop */
@media (min-width: 768px) {
  .rai-modal {
    border-radius: 20px;
    width: 92vw;
    height: 88vh;
    max-width: 960px;
    max-height: 680px;
    border: 1px solid rgba(0,206,209,0.22);
    box-shadow: 0 0 80px rgba(0,206,209,0.06), 0 0 40px rgba(138,43,226,0.08);
  }
}

/* ── Top Bar ── */
.rai-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(0,206,209,0.1);
  background: rgba(0,206,209,0.03);
  flex-shrink: 0;
}
.rai-topbar-center {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(0,206,209,0.6);
  text-transform: uppercase;
}
.rai-live-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}
.rai-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background 0.3s, box-shadow 0.3s;
}
.rai-live-dot.listening { background: #00ff88; box-shadow: 0 0 10px #00ff88; }
.rai-live-dot.speaking  { background: #00ced1; box-shadow: 0 0 10px #00ced1; }
.rai-live-dot.thinking  { background: #8a2be2; box-shadow: 0 0 10px #8a2be2; }
.rai-close-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  border-radius: 8px;
  width: 32px; height: 32px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.rai-close-btn:hover { background: rgba(231,76,60,0.15); border-color: rgba(231,76,60,0.3); color: #e74c3c; }

/* ── Body ── */
.rai-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
@media (min-width: 768px) {
  .rai-body { flex-direction: row; }
}

/* ── Avatar Panel ── */
.rai-avatar-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 16px;
  flex-shrink: 0;
  background: rgba(0,206,209,0.02);
  border-bottom: 1px solid rgba(0,206,209,0.08);
}
@media (min-width: 768px) {
  .rai-avatar-panel {
    width: 320px;
    border-bottom: none;
    border-right: 1px solid rgba(0,206,209,0.08);
    padding: 32px 24px;
  }
}

/* HUD rings around avatar */
.rai-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,206,209,0.15);
  pointer-events: none;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.rai-ring-1 { width: 220px; height: 220px; animation: raiRingPulse 3s ease-in-out infinite; }
.rai-ring-2 { width: 270px; height: 270px; border-color: rgba(138,43,226,0.1); animation: raiRingPulse 3s ease-in-out infinite 1s; }
.rai-ring-3 { width: 320px; height: 320px; border-style: dashed; border-color: rgba(0,206,209,0.06); animation: raiRingRotate 20s linear infinite; }
@media (max-width: 767px) {
  .rai-ring-1 { width: 170px; height: 170px; }
  .rai-ring-2 { width: 210px; height: 210px; }
  .rai-ring-3 { width: 250px; height: 250px; }
}
@keyframes raiRingPulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%,-50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%,-50%) scale(1.04); }
}
@keyframes raiRingRotate {
  from { transform: translate(-50%,-50%) rotate(0deg); }
  to   { transform: translate(-50%,-50%) rotate(360deg); }
}

/* Corner HUD accents */
.rai-corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: rgba(0,206,209,0.5);
  border-style: solid;
  pointer-events: none;
}
.rai-tl { top: 8px;  left: 8px;  border-width: 2px 0 0 2px; }
.rai-tr { top: 8px;  right: 8px; border-width: 2px 2px 0 0; }
.rai-bl { bottom: 8px; left: 8px;  border-width: 0 0 2px 2px; }
.rai-br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

.rai-canvas {
  position: relative;
  z-index: 2;
  border-radius: 50%;
  width: 150px; height: 150px;
  border: 2px solid rgba(0,206,209,0.3);
  box-shadow: 0 0 30px rgba(0,206,209,0.1);
}
@media (min-width: 768px) {
  .rai-canvas { width: 180px; height: 180px; }
}

.rai-wake-hint {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
  margin-top: 10px;
  text-transform: uppercase;
  position: relative; z-index: 2;
}
.rai-wake-hint span { color: rgba(0,206,209,0.7); font-weight: 600; }

.rai-waveform {
  position: relative; z-index: 2;
  margin-top: 8px;
  opacity: 0.7;
  width: 200px; height: 30px;
}
@media (min-width: 768px) {
  .rai-waveform { width: 240px; }
}

/* ── Control Panel ── */
.rai-control-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

/* Transcript */
.rai-transcript {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,206,209,0.2) transparent;
}
.rai-transcript::-webkit-scrollbar { width: 4px; }
.rai-transcript::-webkit-scrollbar-thumb { background: rgba(0,206,209,0.2); border-radius: 4px; }

.rai-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  line-height: 1.5;
  animation: raiFadeIn 0.3s ease;
}
@keyframes raiFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rai-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.4);
}
.rai-msg.rai-user .rai-tag { background: rgba(138,43,226,0.15); color: #8a2be2; }
.rai-msg.rai-ai   .rai-tag { background: rgba(0,206,209,0.12);   color: #00ced1; }
.rai-msg.rai-sys  .rai-tag { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.3); }
.rai-msg span:last-child { color: rgba(255,255,255,0.85); }
.rai-msg.rai-sys  span:last-child { color: rgba(255,255,255,0.4); font-size: 0.8rem; }

/* Mic Area */
.rai-mic-area {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid rgba(0,206,209,0.08);
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.rai-mic-btn {
  position: relative;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8a2be2, #00ced1);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(138,43,226,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.rai-mic-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(138,43,226,0.5); }
.rai-mic-btn.active { background: linear-gradient(135deg, #00ff88, #00ced1); box-shadow: 0 4px 24px rgba(0,255,136,0.4); }

.rai-mic-pulse, .rai-mic-pulse-2 {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(138,43,226,0.5);
  opacity: 0;
}
.rai-mic-btn.active .rai-mic-pulse {
  animation: raiMicPulse 1.2s ease-out infinite;
}
.rai-mic-btn.active .rai-mic-pulse-2 {
  animation: raiMicPulse 1.2s ease-out infinite 0.4s;
}
@keyframes raiMicPulse {
  0%   { transform: scale(1);   opacity: 0.6; border-color: rgba(0,255,136,0.6); }
  100% { transform: scale(2.2); opacity: 0;   border-color: rgba(0,255,136,0); }
}

.rai-mic-labels { flex: 1; }
.rai-mic-label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
}
.rai-mic-sub {
  display: block;
  font-size: 0.7rem;
  color: rgba(0,206,209,0.5);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.rai-stop-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(231,76,60,0.15);
  border: 1px solid rgba(231,76,60,0.3);
  color: #e74c3c;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.2s;
}
.rai-stop-btn:hover { background: rgba(231,76,60,0.3); }

/* ═══════════════════════════════════════════════════════════════
   AUTH — New Login-First Flow Styles
═══════════════════════════════════════════════════════════════ */

/* Secondary/outline button — Create Account */
.auth-btn-secondary {
  width: 100%;
  padding: 15px;
  background: transparent;
  border: 2px solid rgba(138,43,226,0.45);
  border-radius: 12px;
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-btn-secondary:hover {
  background: rgba(138,43,226,0.12);
  border-color: var(--accent-purple);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(138,43,226,0.2);
}

/* Divider between Login & Create Account */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.18);
  margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.auth-divider span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.25);
}

/* Shake animation for wrong credentials */
@keyframes authInputShake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-7px); }
  40%,80% { transform: translateX(7px); }
}
.auth-input-shake { animation: authInputShake 0.4s ease; }

/* Login step — subtitle success color */
#loginSubtitle { transition: color 0.4s ease; }

/* ═══════════════════════════════════════════════════════════════
   CODESPACE HERO BUTTON  (Cursor-style, Rebel AI themed)
   — sits next to "Access Rebel Ai" in the hero-buttons row
════════════════════════════════════════════════════════════════ */
.btn-codespace {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(138, 43, 226, 0.55);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 18px rgba(138, 43, 226, 0.18);
  transition: background 0.25s ease, border-color 0.25s ease,
              color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.btn-codespace i {
  background: var(--gradient-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: filter 0.25s ease;
}

/* Shimmer sweep on hover — Cursor.com style */
.codespace-btn-shimmer {
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(138, 43, 226, 0.22) 50%,
    transparent 65%
  );
  background-size: 200% 100%;
  background-position: 200% 0;
  transition: background-position 0.55s ease;
  pointer-events: none;
}

.btn-codespace:hover .codespace-btn-shimmer {
  background-position: -200% 0;
}

.btn-codespace:hover {
  background: rgba(138, 43, 226, 0.14);
  border-color: rgba(138, 43, 226, 0.85);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(138, 43, 226, 0.42), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-codespace:hover i {
  filter: drop-shadow(0 0 7px rgba(138, 43, 226, 0.75));
}

.btn-codespace::after {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   CODESPACE — CURSOR-STYLE IDE (full interface)
════════════════════════════════════════════════════════════════ */

/* Shell wrapper */
.ide-shell {
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: 'Roboto Mono', 'Fira Code', 'Courier New', monospace;
  overflow: hidden;
  padding: 0 !important;
}

/* ── Title Bar ── */
.ide-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  background: #252526;
  padding: 0 12px;
  flex-shrink: 0;
  user-select: none;
  border-bottom: 1px solid #000;
}

.ide-titlebar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ide-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}
.ide-dot.red    { background: #ff5f57; }
.ide-dot.yellow { background: #febc2e; }
.ide-dot.green  { background: #28c840; cursor: pointer; }

.ide-titlebar-center {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  font-family: 'Roboto', sans-serif;
}

.ide-title-icon { color: var(--accent-purple); font-size: 0.72rem; }
.ide-title-badge {
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--gradient-bg);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.ide-titlebar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ide-topbtn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 0.72rem;
  transition: background 0.18s, color 0.18s;
}
.ide-topbtn:hover { background: rgba(255,255,255,0.08); color: #fff; }

.ide-close-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 5px;
  transition: background 0.18s, color 0.18s;
}
.ide-close-btn:hover { background: #e81123; color: #fff; }

/* ── Menu Bar ── */
.ide-menubar {
  display: flex;
  align-items: center;
  height: 28px;
  background: #252526;
  padding: 0 8px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
  gap: 2px;
}

.ide-menu-item {
  font-family: 'Roboto', sans-serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.ide-menu-item:hover { background: rgba(255,255,255,0.08); }

.ide-menu-spacer { flex: 1; }

.ide-menu-status {
  font-family: 'Roboto', sans-serif;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  gap: 5px;
}

.ide-status-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 5px #2ecc71;
  animation: ideBlink 2s ease-in-out infinite;
}
@keyframes ideBlink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── IDE Body ── */
.ide-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ── Activity Bar ── */
.ide-activitybar {
  width: 48px;
  background: #333333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
  gap: 2px;
  flex-shrink: 0;
  border-right: 1px solid #252526;
}

.ide-act-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s, background 0.18s;
  position: relative;
}
.ide-act-btn.active,
.ide-act-btn:hover { color: #fff; }
.ide-act-btn.active::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 22px;
  background: var(--accent-purple);
  border-radius: 1px;
}

.ide-act-spacer { flex: 1; }

/* ── Sidebar — File Explorer ── */
.ide-sidebar {
  width: 200px;
  background: #252526;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid #1a1a1a;
  font-family: 'Roboto', sans-serif;
}

.ide-sidebar-title {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  letter-spacing: 1.2px;
  padding: 12px 14px 6px;
  text-transform: uppercase;
}

.ide-tree { padding: 4px 0; }

.ide-tree-folder {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.77rem;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: background 0.15s;
}
.ide-tree-folder:hover { background: rgba(255,255,255,0.06); }

.ide-chevron { font-size: 0.55rem; color: rgba(255,255,255,0.35); }
.ide-folder-icon { color: #e8a835; font-size: 0.78rem; }

.ide-tree-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 28px;
  font-size: 0.77rem;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
}
.ide-tree-file:hover { background: rgba(255,255,255,0.06); color: #fff; }
.ide-tree-file.active { background: rgba(138,43,226,0.18); color: #fff; }

.ide-file-icon { font-size: 0.72rem; }
.ide-file-icon.js   { color: #f0db4f; }
.ide-file-icon.html { color: #e44d26; }
.ide-file-icon.css  { color: #264de4; }
.ide-file-icon.md   { color: #83a598; }

/* ── Editor Area ── */
.ide-editor-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* Tab bar */
.ide-tabbar {
  display: flex;
  background: #252526;
  height: 35px;
  flex-shrink: 0;
  overflow-x: auto;
  border-bottom: 1px solid #1a1a1a;
}
.ide-tabbar::-webkit-scrollbar { height: 2px; }
.ide-tabbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

.ide-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  border-right: 1px solid #1a1a1a;
  min-width: max-content;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.ide-tab:hover { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.8); }
.ide-tab.active {
  background: #1e1e1e;
  color: #fff;
  border-top: 1px solid var(--accent-purple);
}
.ide-tab-close {
  margin-left: 4px;
  opacity: 0;
  font-size: 0.75rem;
  transition: opacity 0.15s;
  line-height: 1;
}
.ide-tab:hover .ide-tab-close { opacity: 0.6; }

/* Code editor */
.ide-editor {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #1e1e1e;
  font-size: 0.83rem;
  line-height: 1.6;
}
.ide-editor::-webkit-scrollbar { width: 8px; height: 8px; }
.ide-editor::-webkit-scrollbar-track { background: #1e1e1e; }
.ide-editor::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.ide-gutter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 12px 10px 12px 0;
  min-width: 40px;
  color: rgba(255,255,255,0.18);
  font-size: 0.75rem;
  line-height: 1.6;
  user-select: none;
  flex-shrink: 0;
  background: #1e1e1e;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.ide-gutter span { display: block; padding: 0 6px; }

.ide-code {
  flex: 1;
  padding: 12px 16px;
  outline: none;
  white-space: pre;
  overflow-x: auto;
  caret-color: var(--accent-teal);
  font-family: 'Roboto Mono', 'Fira Code', monospace;
}

/* Syntax token colours */
.tok-comment { color: #6a9955; }
.tok-kw      { color: #569cd6; }
.tok-fn      { color: #dcdcaa; }
.tok-str     { color: #ce9178; }
.tok-num     { color: #b5cea8; }
.tok-var     { color: #9cdcfe; }

/* ── Terminal Panel ── */
.ide-terminal-panel {
  height: 180px;
  background: #0d0d0d;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-top: 1px solid #000;
}

.ide-terminal-tabs {
  display: flex;
  align-items: center;
  background: #252526;
  height: 30px;
  padding: 0 8px;
  gap: 2px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}

.ide-term-tab {
  font-family: 'Roboto', sans-serif;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, color 0.15s;
}
.ide-term-tab:first-child { color: #fff; background: rgba(255,255,255,0.06); }
.ide-term-tab:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }

.ide-term-close-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.ide-term-close-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }

.ide-terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px;
  font-size: 0.78rem;
  line-height: 1.7;
}
.ide-terminal-body::-webkit-scrollbar { width: 5px; }
.ide-terminal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.ide-tline { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.ide-tprompt { color: var(--accent-teal); font-weight: 700; flex-shrink: 0; }
.ide-tcmd { color: #d4d4d4; }
.ide-tout { color: #2ecc71; padding-left: 0; }
.ide-terr { color: #e74c3c; }

@keyframes termBlink { 0%,100%{opacity:1} 50%{opacity:0} }
.ide-tcursor { color: var(--accent-teal); animation: termBlink 1s step-start infinite; }

.ide-terminal-input-row {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
  gap: 8px;
  flex-shrink: 0;
}
.ide-tprompt-inline { color: var(--accent-teal); font-weight: 700; font-size: 0.82rem; }
.ide-terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #d4d4d4;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.78rem;
  caret-color: var(--accent-teal);
}

/* ── AI Panel (right side) ── */
.ide-ai-panel {
  width: 320px;
  background: #252526;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #1a1a1a;
  flex-shrink: 0;
  font-family: 'Roboto', sans-serif;
}

.ide-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.ide-ai-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.ide-ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-bg);
  box-shadow: 0 0 6px rgba(138,43,226,0.7);
  animation: ideBlink 2s ease-in-out infinite;
}

.ide-ai-model-badge {
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(138,43,226,0.18);
  border: 1px solid rgba(138,43,226,0.4);
  color: rgba(255,255,255,0.7);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Messages */
.ide-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.ide-ai-messages::-webkit-scrollbar { width: 4px; }
.ide-ai-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.ide-ai-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.ide-ai-avatar {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(138,43,226,0.2);
  border: 1px solid rgba(138,43,226,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: var(--accent-purple);
  flex-shrink: 0;
}

.ide-ai-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(0,206,209,0.15);
  border: 1px solid rgba(0,206,209,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: var(--accent-teal);
  flex-shrink: 0;
}

.ide-ai-bubble {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px 8px 8px 2px;
  padding: 9px 12px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.55;
  flex: 1;
  word-break: break-word;
}

.ide-ai-msg.user .ide-ai-bubble {
  background: rgba(138,43,226,0.12);
  border-color: rgba(138,43,226,0.25);
  border-radius: 8px 8px 2px 8px;
  color: rgba(255,255,255,0.9);
}

.ide-ai-msg.user { flex-direction: row-reverse; }

/* Typing indicator */
.ide-ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
}
.ide-ai-typing span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-purple);
  animation: aiDot 1.2s ease-in-out infinite;
  display: inline-block;
}
.ide-ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ide-ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiDot { 0%,80%,100%{transform:scale(0.8);opacity:0.4} 40%{transform:scale(1.2);opacity:1} }

/* Input area */
.ide-ai-input-area {
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.ide-ai-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(138,43,226,0.3);
  border-radius: 10px;
  padding: 8px 10px;
  transition: border-color 0.2s;
}
.ide-ai-input-wrap:focus-within { border-color: rgba(138,43,226,0.7); }

.ide-ai-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #d4d4d4;
  font-family: 'Roboto', sans-serif;
  font-size: 0.78rem;
  resize: none;
  line-height: 1.5;
  max-height: 100px;
  overflow-y: auto;
  caret-color: var(--accent-teal);
}
.ide-ai-textarea::placeholder { color: rgba(255,255,255,0.25); }

.ide-ai-send-btn {
  background: var(--gradient-bg);
  border: none;
  border-radius: 7px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.68rem;
  color: #fff;
  flex-shrink: 0;
  transition: filter 0.2s, transform 0.2s;
}
.ide-ai-send-btn:hover { filter: brightness(1.15); transform: scale(1.08); }
.ide-ai-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.ide-ai-hint {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.2);
  margin-top: 6px;
  text-align: center;
}

/* ── Status Bar ── */
.ide-statusbar {
  display: flex;
  align-items: center;
  height: 24px;
  background: var(--accent-purple);
  padding: 0 10px;
  flex-shrink: 0;
  font-family: 'Roboto', sans-serif;
  font-size: 0.68rem;
  gap: 0;
}

.ide-sb-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  color: rgba(255,255,255,0.85);
  cursor: default;
  height: 100%;
  transition: background 0.15s;
  white-space: nowrap;
}
.ide-sb-item:hover { background: rgba(0,0,0,0.15); }

.ide-sb-spacer { flex: 1; }

.ide-sb-ai {
  background: rgba(0,0,0,0.2);
  color: #fff;
  font-weight: 600;
}

/* ── AI Writing animation on editor ── */
.ide-ai-writing {
  animation: ideWritePulse 0.6s ease-in-out infinite alternate;
}
@keyframes ideWritePulse {
  from { box-shadow: inset 0 0 0 1px rgba(138,43,226,0); }
  to   { box-shadow: inset 0 0 0 1px rgba(138,43,226,0.35); }
}

/* ── Code pill shown in AI chat bubble ── */
.ide-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(138,43,226,0.15);
  border: 1px solid rgba(138,43,226,0.4);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
  font-family: 'Roboto Mono', monospace;
  margin: 2px 0;
  white-space: nowrap;
}
.ide-code-pill i { color: var(--accent-teal); font-size: 0.65rem; }

/* ── Responsive: hide sidebar on small screens ── */
@media (max-width: 768px) {
  .ide-sidebar { display: none; }
  .ide-activitybar { display: none; }
  .ide-ai-panel { width: 260px; }
}

@media (max-width: 560px) {
  .ide-ai-panel { width: 100%; position: absolute; bottom: 24px; right: 0; height: 55%; z-index: 5; border-top: 1px solid #1a1a1a; }
  .ide-editor-area { flex: none; height: 45%; }
  .ide-body { flex-direction: column; }
}
