/* Routify Website Styles - Organic Calm Theme */

:root {
  /* Light mode colors */
  --color-primary: #7C9A92;
  --color-secondary: #D4A373;
  --color-background: #FDFCF8;
  --color-surface: #F5F2EA;
  --color-text-primary: #2D2A26;
  --color-text-secondary: #5C5855;
  --color-outline: #D4D0C7;
  --color-error: #B93838;
  --color-error-bg: #FBECEC;
  --color-shadow: rgba(45, 42, 38, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #2D2A26;
    --color-surface: #3C3935;
    --color-text-primary: #FDFCF8;
    --color-text-secondary: #B8B4AF;
    --color-outline: #5C5855;
    --color-error: #FF9C9C;
    --color-error-bg: #5B2F2F;
    --color-shadow: rgba(0, 0, 0, 0.2);
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--color-background);
  color: var(--color-text-primary);
  line-height: 1.8;
}

/* Header */
.header {
  background: var(--color-primary);
  color: white;
  padding: 48px 20px;
  text-align: center;
}

.header h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.header p {
  opacity: 0.9;
  font-size: 14px;
}

.lang-switch {
  margin-top: 12px;
}

.lang-switch a {
  color: white;
  opacity: 0.8;
  text-decoration: none;
  font-size: 14px;
}

.lang-switch a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.content {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 16px var(--color-shadow);
}

/* Typography */
h2 {
  font-size: 20px;
  color: var(--color-text-primary);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary);
}

h2:first-child {
  margin-top: 0;
}

p {
  margin-bottom: 16px;
  color: var(--color-text-primary);
}

ul {
  margin: 16px 0;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
  color: var(--color-text-secondary);
}

strong {
  color: var(--color-text-primary);
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.footer a {
  color: var(--color-primary);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Index page specific */
.index-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.index-card {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 48px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px var(--color-shadow);
}

.badge {
  display: inline-block;
  background: var(--color-secondary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 16px;
}

.index-card h1 {
  font-size: 32px;
  color: var(--color-text-primary);
  margin-bottom: 16px;
}

.index-card p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.links a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.links a:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}

.panel {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--color-outline);
  border-radius: 12px;
  background: var(--color-surface);
}

.auth-form {
  display: grid;
  gap: 10px;
}

label {
  font-weight: 600;
  color: var(--color-text-primary);
}

input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(92, 88, 85, 0.35);
  border-radius: 10px;
  background: var(--color-background);
  color: var(--color-text-primary);
  caret-color: var(--color-text-primary);
  font: inherit;
}

input::placeholder {
  color: var(--color-text-secondary);
}

input:focus {
  outline: 2px solid rgba(124, 154, 146, 0.5);
  border-color: var(--color-primary);
}

.action-button {
  margin-top: 12px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  background: var(--color-primary);
  color: #ffffff;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.action-button:hover {
  transform: translateY(-1px);
}

.action-button:active {
  transform: translateY(0);
}

.action-button:focus-visible {
  outline: 2px solid rgba(124, 154, 146, 0.45);
  outline-offset: 2px;
}

.secondary-button {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-outline);
}

.danger-button {
  background: var(--color-error-bg);
  color: var(--color-error);
  border-color: var(--color-error);
}

.status-message {
  margin-top: 8px;
  margin-bottom: 8px;
  min-height: 24px;
}

.error-text {
  color: #b42318;
}

.success-text {
  color: #1d7a46;
}

.help-text {
  margin-top: 8px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

@media (max-width: 640px) {
  .content {
    padding: 24px;
  }

  .panel {
    padding: 16px;
  }
}
