/* Ethique MSP2 Tool - Clean, Professional Design */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  background: #181c23;
  color: #e5e7eb;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: linear-gradient(135deg, #3a3153 0%, #1a1a1a 100%);
  border-bottom: 2px solid #ff8c00;
  padding: 30px 0;
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 2.2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Auth Section */
.auth {
  display: flex;
  align-items: center;
  gap: 15px;
}

.auth-form {
  display: flex;
  gap: 8px;
}

.auth-form input {
  padding: 10px 16px;
  background: #23283b;
  border: 1px solid #3a4154;
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 0.95rem;
}

.auth-form button,
.secondary {
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-form button:hover,
.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.auth-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #b3b8c5;
}

.status {
  font-size: 0.85rem;
  padding: 6px 12px;
  background: #1a1f2e;
  border-radius: 6px;
  border: 1px solid #3a4154;
}

.status.ok { color: #43b581; border-color: #43b581; }
.status.error { color: #f04747; border-color: #f04747; }

/* Profile Card */
.profile-section {
  text-align: center;
  margin-bottom: 40px;
}

.profile-card {
  background: linear-gradient(135deg, #2a2f42 0%, #23283b 100%);
  border: 1px solid #3a4154;
  border-radius: 16px;
  padding: 30px;
  max-width: 500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.profile-info h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-item {
  background: #1a1f2e;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #3a4154;
}

.stat-icon {
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

/* XP bar */
.xp { margin-top: 12px; }
.xp-label { color: #d1d5db; font-size: 0.9rem; margin-bottom: 6px; }
.xp-bar {
  position: relative;
  height: 10px;
  background: #2b2f3f;
  border-radius: 999px;
  border: 1px solid #3a4154;
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #a855f7 0%, #7c3aed 100%);
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #667eea;
}

/* Menu Grid */
.menu-section {
  margin-bottom: 40px;
}

.menu-section h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: #fff;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .container { max-width: 960px; padding: 0 15px; }
  .header { padding: 20px 0; }
  .profile-card { grid-template-columns: 1fr; text-align: center; max-width: 400px; }
  .avatar { margin: 0 auto 20px auto; }
}

@media (max-width: 768px) {
  .header { flex-direction: column; align-items: flex-start; padding: 15px; }
  .header h1 { margin-bottom: 15px; font-size: 1.8rem; }
  .header-right { flex-direction: column; align-items: flex-start; width: 100%; gap: 10px; }
  .auth-form { width: 100%; flex-direction: column; gap: 10px; }
  .auth-form input, .auth-form button, .secondary { width: 100%; }
  .auth-panel { margin-top: 10px; width: 100%; justify-content: space-between; }
  .container { margin: 20px auto; padding: 0 10px; }
  .profile-card { padding: 20px; }
  .profile-info h2 { font-size: 1.3rem; }
  .profile-stats { grid-template-columns: 1fr; }
  .menu-section h2 { font-size: 1.5rem; margin-bottom: 20px; }
  .menu-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
  .menu-item { padding: 10px; }
  .menu-item i { font-size: 1.5rem; }
  .menu-item span { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .header { padding: 10px; }
  .header h1 { font-size: 1.5rem; }
  .container { padding: 0 5px; }
  .profile-card { padding: 15px; }
  .avatar { width: 80px; height: 80px; font-size: 2rem; margin-bottom: 15px; }
  .profile-info h2 { font-size: 1.2rem; }
  .profile-stats { gap: 8px; }
  .stat-item { padding: 8px; }
  .stat-value { font-size: 1rem; }
  .stat-label { font-size: 0.7rem; }
  .menu-section h2 { font-size: 1.3rem; }
  .menu-grid { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }
  .menu-item { padding: 8px; }
  .menu-item i { font-size: 1.2rem; }
  .menu-item span { font-size: 0.7rem; }
}

/* Modal */
.modal { position: fixed; inset: 0; display: none; }
.modal.show { display: block; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
}
.modal-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(520px, 92vw);
  background: linear-gradient(135deg, #2a2f42 0%, #23283b 100%);
  border: 1px solid #3a4154;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #3a4154;
}
.modal-header h3 { margin: 0; color: #fff; font-size: 1.2rem; }
.modal-close { background: transparent; border: none; color: #b3b8c5; cursor: pointer; }
.modal-body { padding: 18px 20px; color: #b3b8c5; }
.modal-desc { margin-bottom: 12px; }
.modal-controls { display: flex; gap: 12px; align-items: center; }
.modal-footer {
  display: flex; gap: 12px; align-items: center; justify-content: flex-end;
  padding: 14px 20px; border-top: 1px solid #3a4154;
}

/* Control Panel */
.control-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .control-section { grid-template-columns: 1fr; }
  .profile-card { grid-template-columns: 1fr; text-align: center; }
  .header { flex-direction: column; gap: 20px; }
}

.card {
  background: linear-gradient(135deg, #2a2f42 0%, #23283b 100%);
  border: 1px solid #3a4154;
  border-radius: 12px;
  padding: 20px;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #fff;
}

/* Inline control redesign */
.control-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-label {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.label-title { color: #e5e7eb; font-weight: 600; }
.label-sub { color: #9ca3af; font-size: 0.8rem; }

.input-pill {
  width: 100px;
  padding: 8px 12px;
  background: #1a1f2e;
  border: 1px solid #3a4154;
  border-radius: 999px;
  color: #e5e7eb;
  text-align: center;
}

.segmented {
  display: inline-flex;
  border: 1px solid #3a4154;
  border-radius: 999px;
  overflow: hidden;
  background: #1a1f2e;
}

.seg-btn {
  padding: 8px 14px;
  color: #e5e7eb;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
}

.seg-btn + .seg-btn { border-left: 1px solid #3a4154; }
.seg-btn i { margin-right: 6px; }
.seg-btn.start.active { background: linear-gradient(135deg, #43b581 0%, #3d9970 100%); color: #fff; }
.seg-btn.stop.active { background: linear-gradient(135deg, #f04747 0%, #d63639 100%); color: #fff; }

.chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid #3a4154;
}

.status-running { background: rgba(67, 181, 129, 0.15); color: #8be3b1; }
.status-stopped { background: rgba(240, 71, 71, 0.15); color: #ff9ca0; }

.control-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b3b8c5;
  font-size: 0.9rem;
}

.control-row input[type="number"] {
  width: 80px;
  padding: 8px 12px;
  background: #1a1f2e;
  border: 1px solid #3a4154;
  border-radius: 8px;
  color: #e5e7eb;
}

.btn-start {
  padding: 8px 16px;
  background: linear-gradient(135deg, #43b581 0%, #3d9970 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 181, 129, 0.4);
}

.btn-stop {
  padding: 8px 16px;
  background: linear-gradient(135deg, #f04747 0%, #d63639 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-stop:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(240, 71, 71, 0.4);
}

/* Feed */
.feed-list {
  list-style: none;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-list p {
  padding: 12px 16px;
  background: #1a1f2e;
  border-left: 3px solid #667eea;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #b3b8c5;
  word-break: break-word;
}

.feed-list p:hover {
  background: #22283f;
  border-left-color: #764ba2;
}

/* Hide chat section */
.chat-controls,
.chat-messages,
.chat-form {
  display: none !important;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  color: #6b7280;
  font-size: 0.9rem;
  border-top: 1px solid #3a4154;
  margin-top: 60px;
}

/* Responsive */
@media (max-width: 768px) {
  .control-section {
    grid-template-columns: 1fr !important;
  }

  .menu-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  .profile-card {
    flex-direction: column;
    text-align: center;
  }

  .profile-stats {
    flex-direction: row;
  }
}


