:root {
  /* Color Palette - Hacker Theme */
  --bg-color: #0f172a;
  --bg-surface: rgba(30, 41, 59, 0.6);
  --neon-green: #22c55e;
  --neon-cyan: #0ff;
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --error-color: #ef4444;
  --border-color: rgba(34, 197, 94, 0.3);
  --glass-border: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(15, 23, 42, 0.8);

  /* Fonts */
  --font-mono: 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Background Grid Effect */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, rgba(34, 197, 94, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 197, 94, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
}
.bg-grid::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 80%);
}

.container {
  width: 100%;
  max-width: 600px;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 1rem;
}

.logo-text {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text-main);
}

.neon-text {
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.5), 0 0 20px rgba(34, 197, 94, 0.3);
}

.cursor {
  display: inline-block;
  width: 15px;
  color: var(--neon-cyan);
  animation: blink 1s step-end infinite;
}

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

.subtitle {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Glass Card */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  box-shadow: 0 12px 40px rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
}

/* Form Styles */
.form-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-cyan);
  display: block;
  margin-bottom: 0.5rem;
}

.required {
  color: var(--neon-green);
}

.optional {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.prefixIcon {
  position: absolute;
  left: 1rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.input-wrapper input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  outline: none;
  transition: all 0.3s ease;
}

.input-wrapper input:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.input-wrapper input::placeholder {
  color: var(--text-dim);
  opacity: 0.5;
}

/* Buttons */
.btn-primary, .btn-secondary {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: transparent;
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.2) inset;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.1);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4) inset, 0 0 10px rgba(34, 197, 94, 0.4);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  border-color: var(--text-dim);
  color: var(--text-dim);
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  margin-top: 1rem;
  width: 100%;
}

.btn-secondary:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3) inset;
}

/* Output Section */
.output-section {
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.output-title {
  font-family: var(--font-mono);
  color: var(--neon-green);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed rgba(34, 197, 94, 0.3);
  padding-bottom: 0.5rem;
}

.output-group {
  margin-bottom: 1.2rem;
}

.output-group label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
  display: block;
}

.output-wrapper {
  display: flex;
  gap: 0.5rem;
}

.output-wrapper input {
  flex-grow: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--neon-cyan);
  padding: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.btn-copy {
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: 6px;
  width: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--neon-green);
  color: var(--neon-green);
}

/* Loader Activity */
.loader {
  width: 20px;
  height: 20px;
  border: 2px solid var(--neon-green);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  min-width: 250px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  border-left: 4px solid var(--neon-green);
  color: var(--text-main);
  padding: 1rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast.error {
  border-left-color: var(--error-color);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(50px); }
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-nav a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: var(--neon-cyan);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  .logo-text { font-size: 2.5rem; }
  .glass-card { padding: 1.5rem; }
  .output-wrapper { flex-direction: column; }
  .btn-copy { width: 100%; padding: 0.8rem; }
}

/* Page specific content */
.content-wrapper {
  color: var(--text-dim);
  line-height: 1.6;
}
.content-wrapper h1, .content-wrapper h2, .content-wrapper h3 {
  color: var(--neon-green);
  font-family: var(--font-mono);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}
.content-wrapper p {
  margin-bottom: 1rem;
}
.content-wrapper a {
  color: var(--neon-cyan);
  text-decoration: none;
}
.content-wrapper a:hover {
  text-decoration: underline;
}
