
:root {
  --bg-color: #1a1a1a;
  --text-color: #f0f0f0;
  --accent-color: #a29bfe;
  --header-bg: #6c5ce7;
  --header-text: #fff;
  --row-even: #2d3436;
  --row-odd: #222;
  --hover-bg: #a29bfe;
  --hover-text: #1a1a1a;
  --shadow-color: rgba(0,0,0,0.5);
}

body.light-mode {
  --bg-color: #f5f6fa;
  --text-color: #2f3640;
  --accent-color: #6c5ce7;
  --header-bg: #4834d4;
  --header-text: #fff;
  --row-even: #dcdde1;
  --row-odd: #f5f6fa;
  --hover-bg: #6c5ce7;
  --hover-text: #fff;
  --shadow-color: rgba(0,0,0,0.1);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 1rem;
  transition: background-color 0.3s, color 0.3s;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

h1 {
    text-align: center;
    padding: 1rem 0;
    color: var(--accent-color);
    font-size: 2.5rem;
    text-shadow: 0 0 10px rgba(162, 155, 254, 0.2);
}

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--header-bg);
    color: var(--header-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.2s;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

age-table {
    display: block;
    margin: 0 auto;
    max-width: 500px;
}

/* Updated to use CSS variables and target parts if needed, 
   but for now we'll ensure main.js doesn't use shadow DOM for simplicity 
   or we use inherited variables */
age-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-color);
  background-color: var(--bg-color);
}

age-table th,
age-table td {
  padding: 1rem;
  text-align: center;
}

age-table thead {
  background-color: var(--header-bg);
  color: var(--header-text);
}

age-table th {
    font-weight: 600;
}

age-table tbody tr:nth-child(even) {
  background-color: var(--row-even);
}
age-table tbody tr:nth-child(odd) {
  background-color: var(--row-odd);
}

age-table tbody tr:hover {
    background-color: var(--hover-bg);
    color: var(--hover-text);
    cursor: pointer;
}


@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    age-table {
        max-width: 100%;
    }

    age-table th, age-table td {
        padding: 0.8rem;
    }
}


@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    age-table {
        max-width: 100%;
    }

    age-table th, age-table td {
        padding: 0.8rem;
    }
}
