@layer base, components, utilities;

@layer base {
  :root {
    --bg-color: oklch(0.98 0.01 252);
    --text-color: oklch(0.15 0.01 252);
    --accent-color: oklch(0.6 0.2 252);
    --surface-color: oklch(1 0 0);
    --border-color: oklch(0.9 0.01 252);
    --shadow: 0 4px 6px -1px oklch(0 0 0 / 0.1), 0 2px 4px -2px oklch(0 0 0 / 0.1);
  }

  [data-theme='dark'] {
    --bg-color: oklch(0.15 0.01 252);
    --text-color: oklch(0.95 0.01 252);
    --accent-color: oklch(0.7 0.15 252);
    --surface-color: oklch(0.2 0.01 252);
    --border-color: oklch(0.3 0.01 252);
    --shadow: 0 4px 6px -1px oklch(0 0 0 / 0.5), 0 2px 4px -2px oklch(0 0 0 / 0.5);
  }

  body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    margin: 0;
    padding: 2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: grid;
    place-content: center;
    min-height: 100vh;
  }
}

@layer components {
  .card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 400px;
    width: 100%;
  }

  .theme-toggle {
    cursor: pointer;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s active, opacity 0.2s;
    box-shadow: 0 0 15px var(--accent-color / 0.3);
    margin-top: 1rem;
  }

  .theme-toggle:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }

  .theme-toggle:active {
    transform: translateY(0);
  }
}
