:root {
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #020617;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --accent-color: #8b5cf6;
  --accent-hover: #a78bfa;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
}

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.glass-container {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem 4rem;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center;
}

header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(to right, #c4b5fd, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.input-wrapper {
  display: flex;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.5rem;
  border-radius: 99px;
  border: 1px solid var(--glass-border);
  transition: border-color 0.3s ease;
}

.input-wrapper:focus-within {
  border-color: var(--accent-color);
}

input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  color: var(--text-primary);
  outline: none;
}

input::placeholder {
  color: #475569;
}

button {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0 2rem;
  border-radius: 99px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Loader */
.loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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

.hidden {
  display: none !important;
}

#status-container {
  margin-top: 1.5rem;
  color: var(--accent-hover);
  font-size: 0.95rem;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Dialog Modal */
dialog {
  background: #0f172a;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  color: var(--text-primary);
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  text-align: center;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

dialog h2 {
  margin-top: 0;
  color: #10b981; /* Success green */
}

dialog p {
  color: var(--text-secondary);
  line-height: 1.5;
}

dialog strong {
  color: var(--text-primary);
}

dialog code {
  background: rgba(255,255,255,0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.modal-btn {
  margin-top: 1.5rem;
  width: 100%;
  padding: 1rem;
  background: #10b981;
}

.modal-btn:hover:not(:disabled) {
  background: #34d399;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
