:root {
  --bg-gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  --glass-bg: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.35);
  --text-primary: #ffffff;
  --text-secondary: #e6e6e6;
  --accent: #ff6b6b;
  --success: #4ade80;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  padding-bottom: 80px;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

/* Header */
.app-header {
  position: sticky; top: 0; z-index: 100;
  padding: 16px; text-align: center;
  display: flex; justify-content: space-between; align-items: center;
}
.app-header h1 { font-size: 1.4rem; }

.header-actions { display: flex; gap: 12px; align-items: center; }
.icon-btn { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 0;}

.status-badge {
  background: rgba(255,255,255,0.2); padding: 6px 12px; border-radius: 20px;
  font-size: 0.85rem; display: flex; align-items: center; gap: 6px;
}

/* Navigation */
.tab-nav {
  position: sticky; top: 70px; z-index: 99;
  display: flex; overflow-x: auto; padding: 12px; gap: 8px;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-nav button {
  background: rgba(255,255,255,0.1); border: none; color: var(--text-primary);
  padding: 10px 16px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  font-size: 0.95rem; transition: all 0.3s ease; min-width: fit-content;
}
.tab-nav button.active { background: rgba(255,255,255,0.3); transform: scale(1.05); }

/* Main Content */
.container { padding: 16px; max-width: 800px; margin: 0 auto; }

.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

h2, h3 { margin-bottom: 12px; font-weight: 600; letter-spacing: -0.5px; }
label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: var(--text-secondary); }

select, textarea, input[type="text"], input[type="password"] {
  width: 100%; padding: 14px; border-radius: 12px; border: none;
  background: rgba(0,0,0,0.25); color: white; font-size: 1rem; margin-bottom: 12px;
  resize: vertical; outline: none; transition: background 0.3s;
}
select:focus, textarea:focus, input:focus { background: rgba(0,0,0,0.4); }

.btn-primary, .btn-secondary {
  width: 100%; padding: 16px; border-radius: 12px; font-size: 1rem; cursor: pointer;
  transition: transform 0.2s, opacity 0.3s; margin-bottom: 8px;
}
.btn-primary { background: var(--accent); color: white; }
.btn-secondary { background: rgba(255,255,255,0.15); color: white; border: none; }
.btn-primary:active, .btn-secondary:active { transform: scale(0.98); opacity: 0.8; }

.output-area {
  background: rgba(0,0,0,0.2); padding: 14px; border-radius: 12px; min-height: 150px;
  margin-top: 12px; white-space: pre-wrap; line-height: 1.6; font-size: 0.95rem;
}
.output-area.scrollable { max-height: 400px; overflow-y: auto; }

.placeholder-text { color: var(--text-secondary); text-align: center; margin-top: 20px; }

.row { display: flex; gap: 8px; align-items: center; }
.vs-text { font-weight: bold; padding: 14px; background: rgba(255,255,255,0.1); border-radius: 12px; }

.log-entry {
  background: rgba(255,255,255,0.1); padding: 12px; margin-bottom: 8px; border-radius: 10px;
}
.log-models { font-size: 0.8rem; color: var(--success); margin-bottom: 4px; }

/* Settings Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
  z-index: 200; display: flex; justify-content: center; align-items: center;
}
.hidden { display: none; }

.settings-card {
  width: 90%; max-width: 400px; padding: 24px; border-radius: 20px;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-actions { display: flex; gap: 8px; margin-top: 20px; }

@media (min-width: 768px) {
  .tab-nav { justify-content: center; overflow-x: visible; }
  .container { padding: 24px; }
}
