/* Root variables */
:root {
  --bg: #2e4060;
  --bg-alt: #0f1535;
  --fg: #e4e6eb;
  --fg-dim: #a8adb8;
  --accent: #00f0ff;
  --accent-secondary: #ff006e;
  --accent-tertiary: #8338ec;
  --border: #1a1f3a;
  --border-light: #2d3561;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: "Fira Code", "JetBrains Mono", "SF Mono", Menlo, monospace;
  --font-display: "Inter", "Helvetica Neue", sans-serif;
  
  --transition: 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 6px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.65;
  font-size: 16px;
  letter-spacing: 0.3px;
}

/* Minimal subtle background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(0, 240, 255, 0.01) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 0, 110, 0.008) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 0.6em;
  margin-top: 1.4em;
  line-height: 1.2;
}

h1 {
  font-size: 3.5rem;
  color: var(--accent);
  letter-spacing: -1.5px;
  margin-bottom: 0.8em;
}

h2 {
  font-size: 2.2rem;
  color: var(--fg);
  position: relative;
  padding-bottom: 1em;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

h3 {
  font-size: 1.6rem;
  color: var(--fg);
}

h4 {
  font-size: 1.3rem;
  color: var(--fg);
}

h5, h6 {
  font-size: 1rem;
  color: var(--fg-dim);
  font-weight: 600;
}

p {
  margin-bottom: 1.2em;
  color: var(--fg);
}

a {
  color: var(--accent);
  text-decoration: none;
  position: relative;
  font-weight: 500;
  transition: all var(--transition);
}

a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-smooth);
}

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

a:hover::after {
  width: 100%;
  background: var(--accent-secondary);
}

/* Code and monospace */
code {
  font-family: var(--font-mono);
  background: rgba(0, 240, 255, 0.08);
  padding: 0.3em 0.6em;
  border-radius: var(--radius);
  font-size: 0.9em;
  color: var(--accent);
  border: 1px solid rgba(0, 240, 255, 0.15);
  letter-spacing: 0.5px;
}

pre {
  background: rgba(15, 21, 53, 0.5);
  padding: 1.8em;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 1.8em 0;
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent);
  position: relative;
}

pre::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), transparent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

pre code {
  background-color: transparent;
  padding: 0;
  color: var(--fg);
  border: none;
}

/* Buttons */
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9em 1.8em;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  gap: 0.5em;
}

button::before,
.button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(0, 240, 255, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover,
.button:hover {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.25);
}

button:hover::before,
.button:hover::before {
  width: 300px;
  height: 300px;
}

button:active,
.button:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(0, 240, 255, 0.15);
}

button:disabled,
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Button variants */
.button.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.button.primary:hover {
  box-shadow: 0 15px 40px rgba(0, 240, 255, 0.3);
  transform: translateY(-3px);
}

.button.secondary {
  border-color: var(--border-light);
  color: var(--fg-dim);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 240, 255, 0.05);
}

.button.danger {
  border-color: #ff006e;
  color: #ff006e;
}

.button.danger:hover {
  background: #ff006e;
  color: var(--bg);
  border-color: #ff006e;
  box-shadow: 0 10px 30px rgba(255, 0, 110, 0.25);
}

.button.ghost {
  border-color: transparent;
  color: var(--fg-dim);
}

.button.ghost:hover {
  color: var(--accent);
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.3);
}

/* Lists */
ul, ol {
  margin-left: 2.2em;
  margin-bottom: 1.2em;
}

li {
  margin-bottom: 0.6em;
  color: var(--fg);
}

ul > li::marker {
  color: var(--accent);
}

ol > li::marker {
  color: var(--accent-secondary);
  font-weight: 600;
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--accent-secondary);
  padding-left: 1.8em;
  margin: 2em 0;
  color: var(--fg-dim);
  font-style: italic;
  font-size: 1.05em;
  position: relative;
  background: rgba(255, 0, 110, 0.03);
  padding: 1.5em;
  padding-left: 1.8em;
  border-radius: var(--radius);
}

blockquote::before {
  content: '"';
  position: absolute;
  left: 0.3em;
  top: -0.3em;
  font-size: 3em;
  color: var(--accent-secondary);
  opacity: 0.15;
  font-family: var(--font-display);
}

/* Horizontal rule */
hr {
  border: none;
  height: 1px;
  background: var(--border-light);
  margin: 2.5em 0;
}

/* Form elements */
input,
textarea,
select {
  background: rgba(15, 21, 53, 0.4);
  color: var(--fg);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.85em 1.1em;
  font-family: var(--font-sans);
  font-size: 1em;
  transition: all var(--transition-smooth);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(15, 21, 53, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

textarea {
  resize: vertical;
  font-family: var(--font-mono);
}

input::placeholder,
textarea::placeholder {
  color: var(--fg-dim);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

th, td {
  padding: 1em 1.3em;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: rgba(0, 240, 255, 0.08);
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--border-light);
}

tr:hover {
  background: rgba(0, 240, 255, 0.04);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  display: block;
  border: 1px solid var(--border-light);
  transition: all var(--transition-smooth);
}

img:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.15);
}

/* Cards */
.card {
  background: rgba(15, 21, 53, 0.3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2em;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 40px rgba(0, 240, 255, 0.1);
  transform: translateY(-4px);
}

/* Utility classes */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem;
}

.grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.flex {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.flex-col {
  flex-direction: column;
  align-items: flex-start;
}

.flex-between {
  justify-content: space-between;
}

.flex-center {
  justify-content: center;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--fg-dim);
}

.text-mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  letter-spacing: 0.5px;
}

.highlight {
  background: rgba(0, 240, 255, 0.12);
  padding: 0.3em 0.6em;
  border-radius: var(--radius);
  color: var(--accent);
}

.divider {
  width: 40px;
  height: 2px;
  background-color: var(--accent);
  margin: 1.5em 0;
}

.badge {
  display: inline-block;
  padding: 0.4em 0.8em;
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.badge.secondary {
  background: rgba(255, 0, 110, 0.1);
  color: var(--accent-secondary);
  border-color: rgba(255, 0, 110, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .container {
    padding: 1.5rem;
  }
  
  .grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Print styles */
@media print {
  body {
    background-color: white;
    color: black;
  }
  
  a {
    color: #0066cc;
  }
  
  button,
  .button {
    border: 1px solid black;
  }
}

