/* MICHRON PHYSICS - Shared Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0b0f14;
  color: #e8ecef;
  min-height: 100vh;
}

/* Navigation */
.nav {
  background: linear-gradient(135deg, #1a1f2e 0%, #0f1620 100%);
  border-bottom: 2px solid #22303d;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-brand {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: #e8ecef;
  background: rgba(96, 165, 250, 0.1);
  border-color: #22303d;
}

.nav-links a.active {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.15);
  border-color: #60a5fa;
}

/* Panel Components */
.panel {
  background: #1a1f2e;
  border: 1px solid #22303d;
  border-radius: 8px;
  padding: 16px;
}

.panel h3 {
  color: #60a5fa;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Info Box */
.info-box {
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 6px;
  padding: 12px;
  font-size: 11px;
  line-height: 1.6;
  color: #9ca3af;
}

.info-box strong {
  color: #60a5fa;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: 1px solid #22303d;
  border-radius: 6px;
  color: #e8ecef;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: linear-gradient(135deg, #1e3a5f 0%, #1a1f2e 100%);
}

.btn:hover {
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  border-color: #60a5fa;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: #ef4444;
}

/* Text Input */
input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 10px 12px;
  background: #0b0f14;
  border: 1px solid #22303d;
  border-radius: 6px;
  color: #e8ecef;
  font-size: 14px;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: #60a5fa;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Chat Container */
.chat-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.chat-messages {
  background: #1a1f2e;
  border: 1px solid #22303d;
  border-radius: 8px;
  padding: 16px;
  min-height: 400px;
  max-height: 60vh;
  overflow-y: auto;
  margin-bottom: 16px;
}

.message {
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 8px;
}

.message:last-child {
  margin-bottom: 0;
}

.message.user {
  background: rgba(96, 165, 250, 0.15);
  border-left: 3px solid #60a5fa;
}

.message.assistant {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid #10b981;
}

.message .role {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  color: #9ca3af;
}

.message.user .role {
  color: #60a5fa;
}

.message.assistant .role {
  color: #10b981;
}

.message .content {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.chat-input-area {
  display: flex;
  gap: 12px;
}

.chat-input-area textarea {
  flex: 1;
}

.chat-input-area button {
  align-self: flex-end;
}

/* Loading Indicator */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #22303d;
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Settings Panel */
.settings-panel {
  background: #1a1f2e;
  border: 1px solid #22303d;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.settings-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.settings-row:last-child {
  margin-bottom: 0;
}

.settings-row label {
  font-size: 12px;
  color: #9ca3af;
  min-width: 80px;
}

.settings-row input {
  flex: 1;
}

/* Status Indicator */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

.status-dot.connected {
  background: #10b981;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .nav {
    padding: 12px 16px;
  }
  
  .nav-brand {
    font-size: 16px;
  }
  
  .nav-links a {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .chat-container {
    padding: 12px;
  }
  
  .chat-input-area {
    flex-direction: column;
  }
  
  .chat-input-area button {
    width: 100%;
  }
}
