@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --primary: #00f3ff;
  --secondary: #bd00ff;
  --bg-color: #050510;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #ffffff;
  --text-muted: #a0a0b0;
  --success: #00ff9d;
  --error: #ff4d4d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(189, 0, 255, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 243, 255, 0.15) 0%, transparent 40%);
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
}

/* --- Login Overlay --- */
.login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 16, 0.95);
  backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease-in-out, visibility 0.5s;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  width: 320px;
  padding: 2.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.login-card h1 {
  font-weight: 700;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
}

input:focus {
  border-color: var(--primary);
}

button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 12px;
  color: #000;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

button:hover {
  opacity: 0.9;
}

button:active {
  transform: scale(0.98);
}

/* --- Main Dashboard --- */
.dashboard {
  max-width: 1000px;
  margin: 0 auto;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.header h2 {
  font-size: 1.5rem;
  font-weight: 500;
}

.status-indicator {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--glass-bg);
  color: var(--success);
  border: 1px solid var(--glass-border);
}

.request-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.method-select {
  width: 100px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  color: #fff;
  outline: none;
}

.url-input {
  flex: 1;
  margin-bottom: 0; /* Override generic margin */
}

.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.tab {
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}

.tab.active {
  color: var(--primary);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.tab-content {
  display: none;
  min-height: 150px;
}

.tab-content.active {
  display: block;
}

textarea {
  width: 100%;
  height: 150px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-main);
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  resize: none;
  outline: none;
}

.response-card {
  flex: 1;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 1.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.response-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.status-badge {
  color: #fff;
  font-weight: bold;
}

.status-badge.success { color: var(--success); }
.status-badge.error { color: var(--error); }

.response-body {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 1rem;
  overflow: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  color: #d4d4d4;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.blur-text {
    filter: blur(4px);
    transition: filter 0.3s;
}
.blur-text:hover {
    filter: blur(0);
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(20, 20, 30, 0.9);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: #fff;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  z-index: 200;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.key-value-input {
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
}
.key-value-input input {
  margin-bottom: 0;
}
.add-header-btn {
  background: transparent;
  border: 1px dashed var(--glass-border);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 4px;
  width: auto;
  display: inline-block;
}
.add-header-btn:hover {
  opacity: 1;
  border-color: var(--primary);
  color: var(--text-main);
}
