@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Pacifico&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow: hidden;
  height: 100vh;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #000000;
  color: #FFFFFF;
  overflow: hidden; /* Prevent page scrolling */
  position: relative;
  height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at top, rgba(59, 130, 246, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(96, 165, 250, 0.04) 0%, transparent 50%),
    #000000;
  z-index: 0;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 3rem;
  color: #FFFFFF;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.roblox-studio {
  font-family: 'Pacifico', cursive;
  font-weight: 400;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  letter-spacing: 0.03em;
  filter: drop-shadow(0 2px 8px rgba(96, 165, 250, 0.3));
}

.cta-button {
  background: #FFFFFF;
  color: #000000;
  border: none;
  padding: 1.4rem 4rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 60px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15);
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 255, 132, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
  width: 300px;
  height: 300px;
}

.cta-button:hover {
  background: #FFFFFF;
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 16px 48px rgba(255, 255, 255, 0.25);
}

.cta-button:active {
  transform: translateY(-3px) scale(1.01);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .cta-button {
    padding: 1rem 2.5rem;
    font-size: 1rem;
  }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 3rem;
  z-index: 100;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

.nav-user {
  display: flex;
  align-items: center;
  position: relative;
}

.nav-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(96, 165, 250, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(96, 165, 250, 0.2) 100%);
  font-family: 'Pacifico', cursive;
}

.nav-avatar:hover {
  border-color: #60a5fa;
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(96, 165, 250, 0.3);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 1rem);
  right: 0;
  background: rgba(18, 18, 18, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.75rem;
  min-width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-username {
  padding: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #60a5fa;
  border-bottom: 1px solid rgba(96, 165, 250, 0.15);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.dropdown-btn {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.25s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-align: left;
}

.dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  transform: translateX(2px);
}

.logout-btn {
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  transform: translateX(2px);
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.login-box {
  background: transparent;
  border: none;
  padding: 3rem;
  max-width: 450px;
  width: 100%;
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #FFFFFF;
}

.login-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2.5rem;
}

.beta-input-group {
  margin-bottom: 2rem;
}

.beta-label {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.beta-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border-radius: 12px;
  font-family: 'Courier New', monospace;
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.beta-input:focus {
  outline: none;
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.08);
}

.beta-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: normal;
  text-transform: none;
}

.beta-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

.beta-error.show {
  display: block;
}

.login-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.github-btn {
  background: #FFFFFF;
  color: #000000;
}

.github-btn:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.discord-btn {
  background: #5865F2;
  color: #FFFFFF;
}

.discord-btn:hover {
  background: #4752C4;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.3);
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem 1.5rem;
  }
  
  .logo {
    font-size: 1.25rem;
  }
  
  .login-box {
    padding: 2rem;
  }
  
  .login-title {
    font-size: 1.5rem;
  }
}

/* Fun Fact */
.fun-fact {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.fun-fact span {
  color: #60a5fa;
  font-weight: 700;
}

/* Dashboard */
.dashboard-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.dashboard-content {
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
}

.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 2rem;
  border: 3px solid rgba(96, 165, 250, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(96, 165, 250, 0.1) 100%);
  font-family: 'Pacifico', cursive;
  text-shadow: 0 2px 10px rgba(96, 165, 250, 0.5);
}

.generated-avatar {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(96, 165, 250, 0.2) 100%);
}

.dashboard-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #FFFFFF;
}

.dashboard-title span {
  color: #60a5fa;
}

.user-number {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.user-number span {
  color: #60a5fa;
  font-weight: 700;
}

@media (max-width: 768px) {
  .profile-avatar {
    width: 120px;
    height: 120px;
    font-size: 3rem;
  }
  
  .dashboard-title {
    font-size: 1.8rem;
  }
  
  .user-number {
    font-size: 1rem;
  }
}

/* Dashboard Layout */
.dashboard-body {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  width: 280px;
  min-height: 100vh;
  background: rgba(10, 10, 15, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex !important;
  flex-direction: column;
  padding: 1.5rem;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  overflow: visible;
}

.sidebar-header {
  margin-bottom: 2rem;
}

.sidebar-header .logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: #FFFFFF;
}





.projects-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
}

.welcome-screen {
  display: none;
}

.project-view {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Connection Notice */
.connection-notice {
  background: rgba(96, 165, 250, 0.1);
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.install-btn-small {
  background: #60a5fa;
  color: #FFFFFF;
  border: none;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.install-btn-small:hover {
  background: #3b82f6;
  transform: translateY(-1px);
}

/* Chat Container */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 20, 25, 1) 0%, rgba(15, 15, 20, 1) 100%);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  background: transparent;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

.chat-messages:has(.welcome-message:only-child) {
  justify-content: center;
}

.welcome-message {
  text-align: center;
  padding: 3rem 2rem;
  width: 100%;
}

.error-emoji {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #60a5fa;
}

.welcome-message p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.welcome-user {
  font-size: 1.3rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-top: 1.5rem;
}

.welcome-user span {
  color: #60a5fa;
}

/* Prompt Bar */
.prompt-bar {
  padding: 1.5rem;
  background: rgba(10, 10, 15, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 1rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.prompt-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border-radius: 50px;
  font-family: inherit;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.prompt-input:focus {
  outline: none;
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(96, 165, 250, 0.2);
}

.prompt-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.send-btn {
  background: #60a5fa;
  color: #FFFFFF;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(96, 165, 250, 0.3);
}

.send-btn:hover {
  background: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(96, 165, 250, 0.4);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(18, 18, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #FFFFFF;
}

.modal-content p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}

.project-name-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border-radius: 12px;
  font-family: inherit;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.project-name-input:focus {
  outline: none;
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.08);
}

.project-name-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.modal-btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.create-btn {
  background: #60a5fa;
  color: #FFFFFF;
}

.create-btn:hover {
  background: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

/* Loading Spinner */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(96, 165, 250, 0.2);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    max-width: 280px;
    position: fixed;
    left: -280px;
    z-index: 100;
    transition: left 0.3s ease;
  }
  
  .prompt-bar {
    padding: 1rem;
  }
  
  .modal-content {
    padding: 2rem;
  }
}

/* Explorer Sidebar */
.explorer-sidebar {
  width: 300px;
  background: rgba(15, 15, 20, 0.9);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.explorer-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
  padding: 1rem 0;
}

.explorer-tree {
  padding: 0.5rem;
}

.explorer-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 32px 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease;
  user-select: none;
  font-size: 0.9rem;
  position: relative;
}

.explorer-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.explorer-item .arrow {
  width: 12px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.explorer-item .icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.explorer-item .name {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explorer-children {
  display: none;
}

.explorer-children .explorer-item {
  padding-left: 2.5rem;
}

.explorer-children .explorer-children .explorer-item {
  padding-left: 4rem;
}

.explorer-children .explorer-children .explorer-children .explorer-item {
  padding-left: 5.5rem;
}

.explorer-children .explorer-children .explorer-children .explorer-children .explorer-item {
  padding-left: 7rem;
}

.explorer-children .explorer-children .explorer-children .explorer-children .explorer-children .explorer-item {
  padding-left: 8.5rem;
}

.explorer-children .explorer-children .explorer-children .explorer-children .explorer-children .explorer-item {
  padding-left: 8.5rem;
}

/* Loading Screen */
.loading-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.loading-screen h2 {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

@media (max-width: 1024px) {
  .explorer-sidebar {
    display: none;
  }
}



.dashboard-body {
  padding-top: 0;
}

/* Token Section */
.token-section {
  padding: 0;
  margin-bottom: 0.75rem;
}

.token-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.token-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.token-value {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: rgba(96, 165, 250, 0.6);
  word-break: break-all;
  user-select: all;
  letter-spacing: 0.05em;
}

.token-value.revealed {
  color: rgba(255, 255, 255, 0.9);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0.375rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  transform: rotate(90deg);
}

.reveal-btn {
  width: 100%;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.25);
  color: #60a5fa;
  padding: 0.625rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.reveal-btn:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-1px);
}

/* 404 Error Page */
.error-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.error-content {
  text-align: center;
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 1;
}

.error-code {
  font-size: 8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.error-title {
  font-size: 2rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
  max-width: 500px;
}

@media (max-width: 768px) {
  .error-code {
    font-size: 5rem;
  }
  
  .error-title {
    font-size: 1.5rem;
  }
  
  .error-message {
    font-size: 1rem;
  }
}

/* Fixed Profile Picture - Aligned with Top Bar */
.fixed-profile {
  position: fixed;
  top: 0;
  right: 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  z-index: 200;
}

/* Dashboard Home */
.dashboard-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 2rem;
  animation: fadeInUp 0.8s ease-out;
}

.create-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 2.5rem;
  text-align: center;
  line-height: 1.2;
}

.create-project-btn {
  background: #FFFFFF;
  color: #000000;
  border: none;
  padding: 1.5rem 3rem;
  font-size: 1.3rem;
  font-weight: 600;
  border-radius: 60px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.create-project-btn:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 16px 48px rgba(255, 255, 255, 0.25);
}

.create-project-btn:active {
  transform: translateY(-3px) scale(1.01);
}

/* Sidebar Sections */
.sidebar-section {
  margin-top: 2rem;
}

.sidebar-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding: 0 0.75rem;
}

.projects-empty {
  padding: 1rem 0.75rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.875rem;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}

.project-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.project-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.project-name {
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .fixed-profile {
    top: 1rem;
    right: 1rem;
  }
  
  .dashboard-stats {
    padding: 2rem 1.5rem;
  }
  
  .stats-title {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(18, 18, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
}

/* Fix Modal z-index */
.modal {
  z-index: 9999;
}

/* Project Item with Delete */
.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}

.project-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.project-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  cursor: pointer;
}

.delete-project-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.project-item:hover .delete-project-btn {
  opacity: 1;
}

.delete-project-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Project Page Layout */
.project-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(10, 10, 15, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.logo-link {
  font-size: 1.5rem;
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo-link:hover {
  opacity: 0.8;
}

body:has(.project-topbar) {
  padding-top: 60px;
}

.project-view {
  display: flex;
  height: calc(100vh - 60px);
  overflow: hidden; /* Prevent page scrolling */
}

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #000000;
  overflow: hidden; /* Prevent container scrolling */
}

.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2rem;
  overflow-y: auto;
  overflow-x: hidden;
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, 0.5) rgba(255, 255, 255, 0.05);
}

/* Webkit scrollbar styling for chat */
.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, 0.5);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(96, 165, 250, 0.7);
}

.welcome-message {
  text-align: center;
  max-width: 600px;
}

.error-text {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.connect-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
}

.welcome-user {
  font-size: 2.5rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.welcome-user span {
  color: #60a5fa;
}

.prompt-bar-container {
  padding: 1.5rem 2rem;
  background: #000000;
}

.prompt-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.prompt-bar.disconnected {
  border: 2px solid #ef4444;
  border-radius: 16px;
  padding: 0.5rem;
}

.prompt-bar .prompt-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #FFFFFF;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
}

.prompt-bar .prompt-input:focus {
  outline: none;
}

.prompt-bar .prompt-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.prompt-bar .prompt-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.prompt-bar .send-btn {
  background: #60a5fa;
  color: #FFFFFF;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prompt-bar .send-btn:hover:not(:disabled) {
  background: #3b82f6;
}

.prompt-bar .send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Explorer on Right */
.explorer-sidebar {
  width: 300px;
  background: rgba(15, 15, 20, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  order: 2;
}

/* Project Page Styles */
.project-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(10, 10, 15, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo-link:hover {
  opacity: 0.7;
}

.separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.25rem;
}

.project-name {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.project-view {
  padding-top: 60px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Connection Banner */
.connection-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  margin-bottom: 1rem;
}

.connection-status-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ef4444;
  font-size: 0.9rem;
  font-weight: 500;
}

.loading-dots {
  display: flex;
  gap: 0.25rem;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  animation: dotPulse 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
  animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
    transform: scale(1);
  }
}

.install-plugin-btn {
  background: #ef4444;
  color: #FFFFFF;
  border: none;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.install-plugin-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Prompt Bar Container */
.prompt-bar-container {
  padding: 1.5rem 2rem;
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.prompt-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  max-width: 100%;
}

.prompt-input {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  padding: 1.125rem 1.5rem;
  font-size: 0.95rem;
  border-radius: 12px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.prompt-input:focus {
  outline: none;
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.02);
}

.prompt-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.prompt-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.send-btn {
  background: #60a5fa;
  color: #FFFFFF;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
  background: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Connection Status Corner (Bottom Right) */
.connection-status-corner {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  z-index: 100;
}

.connection-status-text {
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ef4444;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.5rem;
  backdrop-filter: blur(10px);
}

.connection-status-text.connected {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

.install-plugin-btn {
  padding: 0.75rem 1.5rem;
  background: #ef4444;
  color: #FFFFFF;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.install-plugin-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
}

/* Project Page - Smaller Profile Picture */
body:has(.project-topbar) .nav-avatar {
  width: 30px;
  height: 30px;
  font-size: 0.85rem;
}

/* Sidebar User Section at Bottom */
.sidebar-user {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease;
  border-radius: 8px;
  position: relative;
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(96, 165, 250, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(96, 165, 250, 0.2) 100%);
  font-family: 'Pacifico', cursive;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-arrow {
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.sidebar-user:hover .sidebar-user-arrow {
  color: #60a5fa;
  transform: translateY(-2px);
}

.sidebar-dropdown.show ~ .sidebar-user .sidebar-user-arrow {
  transform: rotate(180deg);
  color: #60a5fa;
}

/* Sidebar Dropdown (goes up) */
.sidebar-dropdown {
  position: fixed;
  bottom: 5.5rem;
  left: 1.5rem;
  width: calc(280px - 3rem);
  background: rgba(25, 25, 30, 0.98);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 16px;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(30px);
  z-index: 10000;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(96, 165, 250, 0.1);
  pointer-events: none;
}

.sidebar-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Project Page Profile (Bottom Left) */
.project-user-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 10000;
  background: rgba(10, 10, 15, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-top-right-radius: 16px;
  padding: 1rem 1.5rem;
  backdrop-filter: blur(20px);
}

.project-user-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease;
  border-radius: 8px;
  padding: 0.5rem;
  margin: -0.5rem;
  position: relative;
}

.project-user-section:hover {
  background: rgba(255, 255, 255, 0.05);
}

.project-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(96, 165, 250, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(96, 165, 250, 0.2) 100%);
  font-family: 'Pacifico', cursive;
  flex-shrink: 0;
}

.project-user-info {
  flex: 1;
  min-width: 0;
}

.project-user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-user-arrow {
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.project-user-section:hover .project-user-arrow {
  color: #60a5fa;
  transform: translateY(-2px);
}

.project-dropdown {
  position: fixed;
  bottom: 5.5rem;
  left: 1.5rem;
  width: 250px;
  background: rgba(25, 25, 30, 0.98);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 16px;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(30px);
  z-index: 10000;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(96, 165, 250, 0.1);
  pointer-events: none;
}

.project-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.project-dropdown.show ~ .project-user-section .project-user-arrow {
  transform: rotate(180deg);
  color: #60a5fa;
}

/* Prompt Bar with Border */
.prompt-bar-container {
  padding: 1.5rem 2rem;
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.prompt-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.5rem;
  transition: border-color 0.3s ease;
}

.prompt-bar:focus-within {
  border-color: rgba(96, 165, 250, 0.5);
}

.prompt-bar .prompt-input {
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
}

.prompt-bar .send-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

/* Projects Loading Spinner */
.projects-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.loading-spinner-small {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(96, 165, 250, 0.2);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Connection Status Indicator */
.connection-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  transition: all 0.3s ease;
}

.connection-status-badge.connected {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.connection-status-badge.connecting {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.connection-status-badge.connected .status-dot {
  animation: none;
  box-shadow: 0 0 8px currentColor;
}

/* Project Card Connection Indicator */
.project-connection-indicator {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

/* Notification System */
.notification {
  position: fixed;
  top: 80px;
  right: 2rem;
  background: rgba(25, 25, 30, 0.98);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(30px);
  z-index: 10001;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.notification-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.notification-icon.success {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.notification-icon.info {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
}

.notification-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #FFFFFF;
}

.notification-message {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

/* Context Files Bar */
.context-files-bar {
  background: rgba(25, 25, 30, 0.95);
  border-bottom: 1px solid rgba(96, 165, 250, 0.15);
  padding: 0.75rem 1.5rem;
  display: none;
  backdrop-filter: blur(20px);
}

.context-files-bar.has-files {
  display: block;
}

.context-files-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.context-files-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.context-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 8px;
  padding: 0.375rem 0.625rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
  max-width: 200px;
}

.context-file-chip:hover {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.35);
}

.context-file-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.context-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.context-file-remove {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.context-file-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.context-files-count {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  padding: 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

/* Explorer Item with Add Button */
.explorer-item:hover .explorer-add-btn {
  opacity: 1;
}

.explorer-add-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #60a5fa;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 10;
}

.explorer-add-btn:hover {
  background: rgba(96, 165, 250, 0.25);
  border-color: rgba(96, 165, 250, 0.5);
}

.explorer-add-btn.added {
  opacity: 1;
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

/* Chat Messages - Revamped */
.chat-message {
  display: block;
  margin-bottom: 1.5rem;
  animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  animation-fill-mode: forwards;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* User Message */
.user-message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.user-message .message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(96, 165, 250, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(96, 165, 250, 0.2) 100%);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-message .message-content {
  flex: 1;
  min-width: 0;
}

.user-message .message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.user-message .message-username {
  font-size: 0.9rem;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: -0.01em;
}

.user-message .message-text {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* AI Message - Simple text only */
.ai-message {
  display: block;
  background: rgba(25, 25, 30, 0.6);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border-left: 3px solid #60a5fa;
}

.ai-message .message-avatar {
  display: none;
}

.ai-message .message-content {
  display: block;
}

.ai-message .message-header {
  display: none;
}

.ai-message .message-text {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* Message Avatar */
.message-avatar {
  transition: all 0.3s ease;
}

.message-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

/* Message Content */
.message-content {
  flex: 1;
  min-width: 0;
}

/* Message Header */
.message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.message-username {
  font-size: 0.9rem;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: -0.01em;
}

.message-timestamp {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

/* Message Text */
.message-text {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.user-message .message-text {
  color: rgba(255, 255, 255, 0.9);
}

.ai-message .message-text {
  color: rgba(255, 255, 255, 0.95);
}

.welcome-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
}

/* Instance Icons (Roblox-style circles) */
.instance-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.explorer-item .icon {
  font-size: 1rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Explorer hidden state */
.explorer-sidebar {
  transition: opacity 0.3s ease;
}

.explorer-sidebar:not([style*="display: none"]) {
  display: flex !important;
}

/* Thinking Indicator */
.thinking-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #60a5fa;
  font-weight: 500;
}

.thinking-dot {
  width: 6px;
  height: 6px;
  background: #60a5fa;
  border-radius: 50%;
  animation: thinkingPulse 1.4s infinite ease-in-out;
}

.thinking-dot:nth-child(1) {
  animation-delay: 0s;
}

.thinking-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.thinking-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes thinkingPulse {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Command Pills */
.command-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0.25rem 0.25rem 0.25rem 0;
  transition: all 0.3s ease;
}

.command-pill-loading {
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #60a5fa;
}

.command-pill-pending {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.command-pill-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.command-pill-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.command-spinner {
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.command-icon {
  font-size: 1rem;
  line-height: 1;
}

.command-label {
  font-weight: 600;
}

.command-status {
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

/* File Content Display */
.file-content-display {
  margin: 0.75rem 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

.file-content-header {
  padding: 0.75rem 1rem;
  background: rgba(96, 165, 250, 0.1);
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
  color: #60a5fa;
  font-size: 0.9rem;
  font-weight: 600;
}

.file-content-code {
  padding: 1rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
}

/* Approval Buttons */
.approval-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.approval-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.approve-btn {
  background: #22c55e;
  color: white;
}

.approve-btn:hover {
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.decline-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.decline-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

/* Checkpoint Marker */
.checkpoint-marker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 0 1rem;
}

.checkpoint-label {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.checkpoint-revert {
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 4px;
  color: #60a5fa;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.checkpoint-revert:hover {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.4);
  color: #93c5fd;
}

/* Abort Button State */
.send-btn.aborting {
  background: #ef4444 !important;
}

.send-btn.aborting:hover {
  background: #dc2626 !important;
}

/* Revert Modal */
.revert-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.revert-modal-overlay.show {
  opacity: 1;
}

.revert-modal {
  background: rgba(25, 25, 30, 0.98);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.revert-modal-overlay.show .revert-modal {
  transform: scale(1) translateY(0);
}

.revert-modal h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1rem;
  text-align: center;
}

.revert-modal p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  text-align: center;
}

.revert-modal-info {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
}

.revert-modal-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

.revert-modal-value {
  font-size: 0.9rem;
  color: #60a5fa;
  font-weight: 600;
  text-align: right;
}

.revert-modal-warning {
  color: #fbbf24 !important;
  font-size: 0.9rem !important;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem !important;
}

.revert-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.revert-modal-btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  flex: 1;
  max-width: 150px;
}

.revert-modal-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.revert-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.revert-modal-confirm {
  background: #ef4444;
  color: #FFFFFF;
}

.revert-modal-confirm:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Clear Chat Button */
.clear-chat-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.clear-chat-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

.clear-chat-btn svg {
  flex-shrink: 0;
}

/* Message Stats Container */
.message-stats-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(96, 165, 250, 0.1);
}

.message-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Message Checkpoint */
.message-checkpoint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}



/* Thinking indicator updates */
.thinking-text {
  color: rgba(255, 255, 255, 0.6);
}

/* Simplified Project Page Styles */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: rgba(18, 18, 18, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.project-header-left h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #fff;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(25, 25, 30, 0.8);
    border-radius: 8px;
    font-size: 0.9rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.status-dot.disconnected {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.prompt-usage {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    color: #fbbf24;
    font-size: 0.9rem;
    font-weight: 600;
}

.prompt-icon {
    font-size: 1.2rem;
}

.project-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.connection-card {
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    margin-bottom: 3rem;
}

.connection-card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.connection-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.connection-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.connection-details {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

.connection-stat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.stat-value {
    color: #60a5fa;
    font-size: 1.2rem;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content {
    flex: 1;
}

.stat-card .stat-value {
    font-size: 2rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.instructions-card {
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
}

.instructions-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.instructions-card ol {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
}

.instructions-card li {
    counter-increment: step-counter;
    margin-bottom: 1.5rem;
    padding-left: 3rem;
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.instructions-card li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: #60a5fa;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.instructions-card strong {
    color: #60a5fa;
}
