/* app/static/css/style.css */
:root {
  --bg-color: #faf7f2;
  --card-bg: #ffffff;
  --text-main: #3d352e;
  --text-muted: #7c7267;
  --primary: #c97b84;       /* Warmes Altrosa */
  --primary-hover: #b56b74;
  --secondary: #7a9a60;     /* Sanftes Salbeigrün */
  --secondary-hover: #688550;
  --accent: #e8b86d;        /* Honiggelb */
  --border-color: #eadecc;
  --shadow: 0 8px 24px rgba(74, 63, 53, 0.08);
  --shadow-sm: 0 2px 8px rgba(74, 63, 53, 0.05);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Navigation & Header --- */
.navbar {
  background: var(--card-bg);
  border-bottom: 2px solid var(--border-color);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  background-color: var(--primary);
  color: #ffffff;
}

/* --- Layout & Container --- */
.main-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.25rem;
  flex: 1;
  width: 100%;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* --- Cards & Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(74, 63, 53, 0.12);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: var(--secondary);
  color: white;
}
.btn-secondary:hover { background: var(--secondary-hover); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  border-radius: var(--radius);
}

/* --- Formulare & Inputs --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background-color: #fff;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
}

/* --- Häkelschrift SVGs & Badges --- */
.symbol-box {
  width: 90px;
  height: 90px;
  background: #fdfaf6;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
}

.symbol-svg {
  width: 60px;
  height: 60px;
  color: var(--primary);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  background: #f4ede4;
  color: var(--text-muted);
}

.badge-salbei {
  background: #e7efe2;
  color: var(--secondary);
}

.badge-altrosa {
  background: #f9e8ea;
  color: var(--primary);
}

/* --- Spezifisch: Maschen- & Reihenzähler --- */
.counter-hero {
  text-align: center;
  padding: 2.5rem 1rem;
}

.counter-value {
  font-size: 5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: 1rem 0;
  user-select: none;
}

.counter-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-counter {
  width: 75px;
  height: 75px;
  font-size: 2.2rem;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

/* --- Spezifisch: Raster-Designer --- */
.designer-grid-container {
  overflow: auto;
  padding: 1rem;
  background: #f3eee6;
  border-radius: var(--radius);
  border: 2px solid var(--border-color);
  display: flex;
  justify-content: center;
}

.pixel-grid {
  display: grid;
  gap: 1px;
  background-color: #d1c5b4;
  box-shadow: var(--shadow-sm);
}

.pixel-cell {
  width: 24px;
  height: 24px;
  background-color: #ffffff;
  cursor: pointer;
  user-select: none;
}

.pixel-cell:hover {
  filter: brightness(0.9);
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}