/* Legend Lab - Global Styles */
:root {
  --bg-dark: #0f1419;
  --bg-darker: #0a0d11;
  --text-primary: #ffffff;
  --text-secondary: #b0b8c1;
  --accent-gold: #d4af37;
  --accent-gold-hover: #e8c547;
  --border-color: #1a1f2e;
  --input-bg: #1a1f2e;
  --input-border: #2a3140;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  background: linear-gradient(135deg, #0a0d11 0%, #0f1419 50%, #0a0d11 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 24px 20px;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.5px;
}

h1 {
  margin: 0 0 32px;
  font-size: 3rem;
  text-align: center;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(212, 175, 55, 0.15);
}

h2 {
  margin: 32px 0 16px;
  font-size: 1.75rem;
  color: var(--text-primary);
}

h3 {
  margin: 20px 0 12px;
  font-size: 1.25rem;
  color: var(--text-secondary);
}

p {
  color: var(--text-secondary);
  margin: 0 0 16px;
}

/* Input & Form Elements */
input[type="text"],
input[type="search"],
input[type="number"],
input[type="password"],
textarea,
select {
  padding: 12px 16px;
  background-color: var(--input-bg);
  color: var(--text-primary);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
}

input[type="text"]::placeholder,
input[type="search"]::placeholder,
input[type="number"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-gold);
  background-color: rgba(212, 175, 55, 0.05);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Buttons */
button {
  padding: 12px 24px;
  background: linear-gradient(135deg, #1a1f2e 0%, #232a3a 100%);
  color: var(--text-primary);
  border: 1.5px solid var(--accent-gold);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

button:hover::before {
  left: 100%;
}

button:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
  border-color: var(--accent-gold-hover);
  color: var(--accent-gold-hover);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2), var(--shadow-md);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

button.primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #e8c547 100%);
  color: var(--bg-dark);
  border-color: var(--accent-gold);
  font-weight: 700;
}

button.primary:hover {
  background: linear-gradient(135deg, #e8c547 0%, #f0d858 100%);
  border-color: #f0d858;
  color: var(--bg-dark);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), var(--shadow-md);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Pre-formatted text */
pre {
  background: linear-gradient(135deg, #0a0d11 0%, #141922 100%);
  color: var(--text-secondary);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow-x: auto;
  margin: 24px 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

pre::-webkit-scrollbar {
  height: 6px;
}

pre::-webkit-scrollbar-track {
  background: transparent;
}

pre::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

/* Links */
a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

a:hover {
  color: var(--accent-gold-hover);
}

/* Main content container */
main,
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Utility classes */
.section {
  background: linear-gradient(135deg, #0a0d11 0%, #141922 100%);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.section:hover {
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: var(--shadow-md);
}

.muted {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.95rem;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* Footer */
footer {
  margin-top: 48px;
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  letter-spacing: 0.5px;
}

footer a {
  color: var(--accent-gold);
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--accent-gold-hover);
}

.footer-version {
  display: inline-block;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
  font-weight: 500;
  color: var(--accent-gold);
}
