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

:root {
  --crystal-blue: #00a8ff;
  --deep-blue: #0066cc;
  --midnight: #001a33;
  --soft-white: #f8f9fa;
  --shadow: 0 8px 32px rgba(0, 168, 255, 0.15);
  --glow: 0 0 20px rgba(0, 168, 255, 0.3);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--midnight) 0%, #001a4d 100%);
  color: var(--soft-white);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: rgba(0, 26, 51, 0.9);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(0, 168, 255, 0.2);
  padding: 2rem 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.logo {
  padding: 0 1.5rem 2rem;
  border-bottom: 1px solid rgba(0, 168, 255, 0.2);
  margin-bottom: 2rem;
}

.logo h1 {
  font-size: 1.5rem;
  color: var(--crystal-blue);
  font-weight: 700;
}

.logo p {
  font-size: 0.875rem;
  color: rgba(248, 249, 250, 0.6);
  margin-top: 0.25rem;
}

.nav-links {
  list-style: none;
  padding: 0 1rem;
}

.nav-link {
  display: block;
  padding: 0.875rem 1rem;
  color: var(--soft-white);
  text-decoration: none;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.nav-link:hover {
  background: rgba(0, 168, 255, 0.1);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.nav-link.active {
  background: rgba(0, 168, 255, 0.2);
  box-shadow: var(--shadow);
  font-weight: 600;
}

.main-content {
  margin-left: 280px;
  flex: 1;
  padding: 2rem;
  width: calc(100% - 280px);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: rgba(0, 26, 51, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 2rem;
  box-shadow: var(--shadow);
}

.header h1 {
  font-size: 2.5rem;
  color: var(--crystal-blue);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.health-badge {
  font-size: 1.5rem;
  cursor: help;
}

.content-section {
  background: rgba(0, 26, 51, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 2rem;
  padding: 3rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.hero {
  text-align: center;
  padding: 4rem 2rem;
}

.hero h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--crystal-blue) 0%, #66d9ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: rgba(248, 249, 250, 0.8);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

.mb-float-button {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--crystal-blue) 0%, var(--deep-blue) 100%);
  border: none;
  border-radius: 2rem;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow), var(--glow);
  transition: all 0.3s ease;
  z-index: 200;
}

.mb-float-button:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 48px rgba(0, 168, 255, 0.3), var(--glow);
}

.mb-panel {
  position: fixed;
  top: 0;
  right: -500px;
  width: 450px;
  height: 100vh;
  background: rgba(0, 26, 51, 0.98);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(0, 168, 255, 0.3);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
  transition: right 0.4s ease;
  z-index: 300;
  display: flex;
  flex-direction: column;
}

.mb-panel.open {
  right: 0;
}

.mb-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(0, 168, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mb-header h2 {
  font-size: 1.5rem;
  color: var(--crystal-blue);
}

.close-btn {
  background: none;
  border: none;
  color: var(--soft-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(0, 168, 255, 0.1);
}

.mb-body {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.config-section {
  background: rgba(0, 168, 255, 0.05);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(0, 168, 255, 0.2);
}

.config-section h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--crystal-blue);
}

.config-section input {
  width: 100%;
  padding: 0.75rem;
  background: rgba(0, 26, 51, 0.5);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: 0.75rem;
  color: var(--soft-white);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.config-section input:focus {
  outline: none;
  border-color: var(--crystal-blue);
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.1);
}

.btn {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--crystal-blue) 0%, var(--deep-blue) 100%);
  border: none;
  border-radius: 0.75rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: rgba(0, 168, 255, 0.2);
}

.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-section h3 {
  font-size: 1rem;
  color: var(--crystal-blue);
}

.chat-section textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  background: rgba(0, 26, 51, 0.5);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: 1rem;
  color: var(--soft-white);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.chat-section textarea:focus {
  outline: none;
  border-color: var(--crystal-blue);
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.1);
}

.chat-output {
  background: rgba(0, 26, 51, 0.8);
  border: 1px solid rgba(0, 168, 255, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  min-height: 150px;
  color: var(--soft-white);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-y: auto;
}

.button-group {
  display: flex;
  gap: 1rem;
}

.button-group .btn {
  flex: 1;
}

.toast {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  background: rgba(0, 26, 51, 0.98);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 400;
  max-width: 350px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-error {
  border-color: #ff4757;
  background: rgba(255, 71, 87, 0.1);
}

.toast-success {
  border-color: #2ed573;
  background: rgba(46, 213, 115, 0.1);
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .mb-panel {
    width: 100%;
    right: -100%;
  }

  .header h1 {
    font-size: 1.75rem;
  }

  .hero h2 {
    font-size: 2.5rem;
  }
}
