@import 'cards.css';

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: var(--color-background-page) !important;
  line-height: 1.6;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--color-background-page);
}

.page {
  display: contents;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-lg);
  background-color: var(--color-background-header);
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 2px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--color-shadow);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  text-decoration: none;
  color: var(--color-text-header);
  font-family: var(--font-family-heading);
  font-size: 1.5rem;
  font-weight: bold;
  white-space: nowrap;
}

.header-brand .icon {
  width: 2.5rem;
  height: 2.5rem;
  fill: var(--color-accent);
  filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

.dark-mode-toggle {
  background: transparent;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  padding: var(--space-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  width: 44px;
  height: 44px;
}

.dark-mode-toggle:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--color-accent);
}

.dark-mode-toggle .icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--color-accent);
  stroke: var(--color-accent);
  margin: 0;
}

h1 {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-heading);
  color: var(--color-text);
  margin: 0 0 var(--space-sm) 0;
}

h2 {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-subheading);
  color: var(--color-text);
  margin: var(--space-lg) 0 var(--space-md) 0;
}

p {
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: var(--space-sm) 0;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

ul {
  line-height: 1.8;
  margin: var(--space-md) 0;
}

svg.icon {
  display: inline-block;
  height: 1.5em;
  width: 1.5em;
  vertical-align: middle;
  fill: currentColor;
  stroke: currentColor;
  margin-right: var(--space-xs);
}

.next-to {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.next-to .icon {
  flex-shrink: 0;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl) var(--space-lg);
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  min-height: calc(100vh - 200px);
}

.page-header {
  width: 100%;
  max-width: 1200px;
  margin-bottom: var(--space-lg);
  text-align: center;
}

.page-header .next-to {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  margin-bottom: var(--space-md);
}

.page-header .next-to .icon {
  width: 3rem;
  height: 3rem;
  fill: var(--color-accent);
  stroke: var(--color-accent);
}

.page-header h1 {
  font-size: 2.5rem;
}

.page-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
}

.content-section {
  width: 100%;
  max-width: 1200px;
  margin-bottom: var(--space-lg);
}

.content-section h2 {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.relationships {
  width: 100%;
  max-width: 1200px;
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-xl);
  margin-top: var(--space-xl);
  box-shadow: 0 4px 6px -1px var(--color-shadow);
  position: relative;
  overflow: hidden;
}

.relationships::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
}

.relationships h2 {
  margin-top: 0;
  text-align: center;
  margin-bottom: var(--space-lg);
  font-size: 2rem;
  color: var(--color-accent);
}

.relationships ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap-md);
}

.relationships li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-sm);
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(96, 165, 250, 0.05) 100%);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
}

.relationships li:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px var(--color-shadow);
  border-color: var(--color-accent);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(96, 165, 250, 0.1) 100%);
}

.relationships .entity {
  font-weight: bold;
  color: var(--color-accent-light);
  font-size: 1.1rem;
}

.relationships .relationship-type {
  color: var(--color-accent);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  padding: var(--space-xs) var(--space-sm);
  background: rgba(59, 130, 246, 0.2);
  border-radius: 4px;
}

.relationships a {
  color: var(--color-link);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.relationships a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* Auth page styles */
main.auth-page {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 100px);
  padding: var(--space-lg);
  grid-template-columns: none !important;
  max-width: none !important;
}

.auth-container {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-md);
}

.auth-header .icon-large {
  width: 4rem;
  height: 4rem;
  fill: var(--color-accent);
  stroke: var(--color-accent);
  margin-bottom: var(--space-md);
}

.auth-header h1 {
  font-family: var(--font-family-heading);
  font-size: 2rem;
  color: var(--color-text);
  margin: 0 0 var(--space-sm) 0;
}

.auth-subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin: 0;
}

.auth-card {
  width: 100%;
  padding: var(--space-xl);
  background-color: var(--color-card-background);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-footer {
  text-align: center;
  color: var(--color-text-muted);
  margin: var(--space-md) 0 0 0;
  font-size: 0.95rem;
}

.auth-footer a {
  color: var(--color-link);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

@media (max-width: 1024px) {
  :root {
    --grid-columns: 8;
  }
}

@media (max-width: 768px) {
  :root {
    --grid-columns: 4;
    --grid-gap: var(--gap-sm);
  }
  
  main {
    padding: var(--space-md);
  }
  
  main.auth-page {
    padding: var(--space-md);
    min-height: calc(100vh - 80px);
  }
  
  .auth-container {
    max-width: 100%;
  }
  
  .auth-header h1 {
    font-size: 1.75rem;
  }
  
  .auth-header .icon-large {
    width: 3rem;
    height: 3rem;
  }
  
  .auth-card {
    padding: var(--space-lg);
  }
}

@media (min-width: 1440px) {
  :root {
    --grid-columns: 16;
  }
}

