:root {
  --bg-dark: #1e1e1e;
  --text-dark: #f9f9f9;
  --accent: #6366f1;
  --accent-light: #8183f4; /* New accent variant */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 2rem;
  --space-l: 3rem;
  --radius: 0.6rem;
  --shadow-dark: rgba(0, 0, 0, 0.8);
  --card-bg: rgba(255, 255, 255, 0.05); /* Consistent card background */
}

/* Added smooth transitions for interactive elements */
* {
  box-sizing: border-box;
  transition: 
    background-color 0.2s ease,
    transform 0.2s ease;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-l) var(--space-m);
  flex: 1;
  width: 100%;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-l);
  padding-bottom: var(--space-s);
  border-bottom: 1px solid rgba(255,255,255,0.1); /* Subtle separation */
}

h1 {
  font-size: 2rem;
  font-weight: 700; /* Slightly bolder */
  margin: 0;
  letter-spacing: -0.5px; /* Tighter letter spacing */
}

#toggle-mode {
  background: none;
  border: 1px solid var(--text-dark);
  color: var(--text-dark);
  border-radius: var(--radius);
  padding: var(--space-xs) var(--space-s);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease; /* Smooth transition */
}

#toggle-mode:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px); /* Subtle lift effect */
}

main {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-l);
}

section {
  background-color: var(--card-bg);
  padding: var(--space-m);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--shadow-dark);
  transition: transform 0.3s ease; /* Smooth hover transition */
}

section:hover {
  transform: translateY(-3px); /* Gentle lift on hover */
}

h2 {
  font-size: 1.3rem;
  margin: 0 0 var(--space-s) 0;
  font-weight: 600;
  position: relative;
  display: inline-block;
  padding-bottom: 4px; /* Space for underline */
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

h2:hover::after {
  transform: scaleX(1);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  margin-bottom: var(--space-xs);
  padding-left: var(--space-s);
  position: relative;
  transition: transform 0.2s ease; /* Smooth hover transition */
}

li:hover {
  transform: translateX(4px); /* Slight movement on hover */
}

li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

a {
  color: var(--accent);
  text-decoration: none;
  position: relative;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-light);
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
}

footer {
  padding: var(--space-s);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background-color: var(--bg-dark);
  color: var(--text-dark);
  text-align: center;
}

/* Stats panel refinements */
#stats-panel {
  position: absolute;
  top: var(--space-l);
  right: var(--space-m);
  width: 250px;
  background-color: rgba(255,255,255,0.05);
  padding: var(--space-m);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--shadow-dark);
  backdrop-filter: blur(4px); /* Subtle blur effect */
}

#live-clock {
  text-align: center;
  margin-bottom: var(--space-s);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 1px; /* Better readability */
}

#stats-list {
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.8; /* Better spacing */
}

#stats-toggle {
  font-size: 1.1rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 4px 8px;
  border-radius: 4px;
}

#stats-toggle:hover {
  background: rgba(255,255,255,0.1);
}