@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #020617 100%);
  --card-bg: rgba(30, 41, 59, 0.45);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(99, 102, 241, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #38bdf8;
  --input-bg: rgba(15, 23, 42, 0.6);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus: rgba(99, 102, 241, 0.5);
  --danger: #ef4444;
  --success: #10b981;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  padding: 40px 24px;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.card {
  max-width: 980px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.6s ease-out;
  position: relative;
}

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

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 50%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: #fff;
  letter-spacing: -0.01em;
}

.menu {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 32px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.menu a, .menu button {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--card-border) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--text-muted) !important;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s ease;
  width: auto !important;
  margin-top: 0 !important;
  display: inline-flex;
}

.menu a:hover, .menu button:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.menu a.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

.box {
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  padding: 28px;
  margin: 24px 0;
}

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #e2e8f0;
}

input, textarea, select {
  width: 100%;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: all 0.2s ease;
  margin-top: 6px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--input-focus);
  background: rgba(15, 23, 42, 0.8);
}

/* File inputs styling */
input[type="file"] {
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  cursor: pointer;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
  margin-top: 14px;
}

button.primary, button:not([class]), button:not(.secondary):not(.ghost):not(.bad):not(.ok) {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  border: none;
}

button.primary:hover, button:not([class]):hover, button:not(.secondary):not(.ghost):not(.bad):not(.ok):hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

button.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

button.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

button.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

button.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 18px;
}

th, td {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

th {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

tr:last-child td {
  border-bottom: none;
}

.ok {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
  padding: 12px 16px;
  border-radius: 12px;
  display: block;
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  animation: slideIn 0.3s ease;
}

.bad {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 12px;
  display: block;
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  animation: slideIn 0.3s ease;
}

.ok:empty, .bad:empty {
  display: none;
}

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

/* Button click feedback */
button:active {
  transform: scale(0.98) !important;
  opacity: 0.9;
}

/* Flex Row */
.row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.row > * {
  flex: 1;
  min-width: 200px;
}

/* Hide developer debug log to simplify UI and show only necessary details */
pre, #debug {
  display: none !important;
}

hr {
  margin: 28px 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
