/*
======================================================
  TDD Method Premium Minimalist Stylesheet
  Theme: Tech Minimal Cyber
  Aesthetics: Deep Dark Mode, Glassmorphism, HSL Neons
======================================================
*/

:root {
  --bg-dark: hsl(222, 47%, 6%);
  --bg-card: rgba(30, 41, 59, 0.45);
  --bg-card-hover: rgba(30, 41, 59, 0.65);
  --text-primary: hsl(210, 40%, 98%);
  --text-secondary: hsl(215, 20%, 75%);
  --text-muted: hsl(215, 15%, 50%);
  
  /* TDD Color Codes */
  --color-red: hsl(355, 85%, 55%);
  --color-green: hsl(142, 70%, 45%);
  --color-refactor: hsl(199, 89%, 48%);
  --color-accent: hsl(265, 90%, 65%);
  
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  
  --font-family: 'Outfit', 'Noto Sans TC', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Glowing Effects */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: var(--color-accent);
  top: -100px;
  right: -50px;
}

.blob-2 {
  width: 350px;
  height: 350px;
  background: var(--color-refactor);
  bottom: -100px;
  left: -50px;
}

/* Layout Header & Navigation */
header {
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.5px;
}

.logo i {
  color: var(--color-refactor);
}

nav {
  display: flex;
  gap: 16px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

nav a.active {
  color: var(--color-refactor);
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.2);
}

/* Main Container */
main {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
}

.hero {
  margin-bottom: 40px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

/* Glassmorphic Card */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 30px;
  transition: var(--transition-smooth);
}

.card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Grid Layout */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* Comparison Boxes */
.compare-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.compare-box {
  flex: 1;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.3);
}

.compare-box.bad {
  border-left: 4px solid var(--color-red);
}

.compare-box.good {
  border-left: 4px solid var(--color-green);
}

.compare-box h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compare-box li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* TDD Cycle Styles */
.cycle-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  margin-top: 20px;
}

.cycle-node {
  flex: 1;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cycle-node.red {
  border-top: 4px solid var(--color-red);
  background: rgba(239, 68, 68, 0.03);
}

.cycle-node.green {
  border-top: 4px solid var(--color-green);
  background: rgba(34, 197, 94, 0.03);
}

.cycle-node.refactor {
  border-top: 4px solid var(--color-refactor);
  background: rgba(14, 165, 233, 0.03);
}

.node-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.cycle-node.red .node-icon { color: var(--color-red); }
.cycle-node.green .node-icon { color: var(--color-green); }
.cycle-node.refactor .node-icon { color: var(--color-refactor); }

.node-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.node-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Footer */
footer {
  text-align: center;
  padding: 30px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .compare-container, .cycle-container {
    flex-direction: column;
  }
}

/* Premium Code & Table Styling for TDD Examples */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px 0;
  background: rgba(15, 23, 42, 0.2);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

th, td {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
}

th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-refactor);
  font-weight: 700;
  border-bottom: 1px solid var(--glass-border);
}

td {
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

tr:last-child td {
  border-bottom: none;
}

pre {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.8rem;
  color: hsl(210, 40%, 90%);
  margin: 12px 0 20px 0;
  line-height: 1.4;
}

code {
  font-family: 'Consolas', 'Courier New', monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: hsl(38, 95%, 65%);
  font-size: 0.85em;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge.success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-green);
}

.badge.info {
  background: rgba(14, 165, 233, 0.15);
  color: var(--color-refactor);
}

.badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: hsl(38, 95%, 65%);
}

.demo-box {
  background: rgba(14, 165, 233, 0.02);
  border: 1px dashed var(--color-refactor);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}

