:root {
  --bg: #f0f4f8;
  --card: rgba(255, 255, 255, 0.9);
  --accent: #2c3e50;
  --accent-2: #3498db;
  --text: #2c3e50;
  --muted: #7f8c8d;
  --border: #d6e0e6;
  --shadow: 0 15px 40px rgba(44, 62, 80, 0.15);
  --snow: rgba(255, 255, 255, 0.95);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #f4f7fa 0%, #e8eef5 100%);
  background-attachment: scroll;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text);
}

@media (max-width: 768px) {
  body {
    background-image: image-set(
      url('/static/assets/winter_bg_mobile.webp') type('image/webp'),
      url('/static/assets/winter_bg_mobile.jpg') type('image/jpeg')
    );
    background-position: center top;
  }
}

@media (min-width: 769px) {
  body {
    background-image: image-set(
      url('/static/assets/winter_bg.webp') type('image/webp'),
      url('/static/assets/winter_bg.jpg') type('image/jpeg')
    );
    background-position: center center;
  }
}

.page {
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 20px 20px 60px;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(236, 240, 241, 0.9) 0%, rgba(189, 195, 199, 0.9) 100%);
  border-radius: 24px;
  padding: 32px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero__content {
  position: relative;
}

.hero__art {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  position: relative;
}

.snow-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.snowflake {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.8;
  pointer-events: none;
  animation: fall linear infinite;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes fall {
  0% {
    transform: translateY(-10px) rotate(0deg);
  }
  100% {
    transform: translateY(300px) rotate(360deg);
  }
}

.hero__content h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.hero__content .lede {
  margin: 0 0 20px;
  color: var(--text);
  max-width: 520px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  margin-bottom: 8px;
}

.share-btn {
  display: none;
}

@media (max-width: 768px) {
  .share-btn {
    display: inline-flex;
  }
}

.lang-toggle {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 20;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.unit-toggle {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  margin-left: 8px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.1s ease;
  font-size: 12px;
  vertical-align: middle;
}

.unit-toggle:hover {
  transform: translateY(-1px);
}

.lang-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  font-weight: 600;
  font-size: 12px;
  margin: 0 0 6px;
}

.home-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, text-decoration 0.2s ease;
  text-transform: none;
  letter-spacing: normal;
  display: inline-block;
  margin-right: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.3);
}

.home-link:hover {
  color: var(--accent-2);
  background: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.hint {
  color: var(--muted);
  margin-top: 4px;
}

.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.1s ease;
  box-shadow: 0 8px 20px rgba(44, 62, 80, 0.25);
  position: relative;
}
.btn--disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

/* Snow effect on buttons */
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 4px;
  background: var(--snow);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
  opacity: 0.9;
}

.btn-secondary {
  background: #ecf0f1;
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

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

main {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
}

.table-header, .gear-row, .table-footer {
  display: grid;
  grid-template-columns: 2.2fr 2fr 1fr 120px;
  gap: 12px;
  align-items: center;
}

.table-header {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.input-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 4px;
}

.mobile-label {
  display: none;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.gear-row {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
}

.gear-row input[type="text"],
.gear-row input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* Snow effect on inputs */
.gear-row input::placeholder {
  color: #bdc3c7;
}

.icon-btn {
  padding: 10px 12px;
  border-radius: 10px;
  background: #ecf0f1;
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  font-weight: 500;
}

.btn-auto {
  background: #fff;
  color: var(--accent-2);
  border-color: var(--accent-2);
  min-width: 80px;
}

.btn-auto:disabled {
  background: #f8f9fa;
  color: #bdc3c7;
  border-color: #eee;
  cursor: not-allowed;
}

.icon-btn:hover:not(:disabled) {
  background: #dfe6e9;
  transform: translateY(-1px);
}

.btn-auto:hover:not(:disabled) {
  background: var(--accent-2);
  color: #fff;
}

.icon-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--snow);
  border-radius: 0 0 3px 3px;
  opacity: 0.8;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.table-footer {
  margin-top: 6px;
}

.table-footer .sum {
  text-align: right;
  font-weight: 600;
  color: var(--accent-2);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.info ul {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
}

.status {
  min-height: 22px;
  font-size: 14px;
  color: var(--muted);
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef7ea;
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
}

.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.footer-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-legal {
  margin-top: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
  opacity: 0.8;
}

.footer-legal p {
  margin: 4px 0;
}

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

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

.footer-separator {
  color: var(--border);
  margin: 0 4px;
}

.footer-copyright {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  opacity: 0.8;
}

.footer-copyright a {
  color: inherit;
  text-decoration: none;
}

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

.e-link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

.e-link:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero__art {
    justify-content: flex-start;
  }
  .table-header, .gear-row, .table-footer {
    grid-template-columns: 1fr;
  }
  .row-actions {
    justify-content: flex-start;
  }
.table-header {
  display: none;
}
.mobile-label {
  display: block;
}
.weight-wrap {
  flex-direction: column;
  align-items: flex-start;
}

.weight-group {
  width: 100%;
}

.weight-wrap .icon-btn {
  align-self: flex-end;
}
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(44, 62, 80, 0.95);
  color: #ffffff;
  padding: 20px;
  z-index: 10000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
  min-width: 250px;
}

.cookie-banner-text a {
  color: #3498db;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.cookie-banner-text a:hover {
  color: #5dade2;
}

.cookie-banner-btn {
  background: #3498db;
  color: #ffffff;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.cookie-banner-btn:hover {
  background: #2980b9;
  transform: translateY(-1px);
}

.cookie-banner-btn:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .cookie-banner {
    padding: 16px;
  }
  
  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .cookie-banner-text {
    font-size: 13px;
    min-width: auto;
  }
  
  .cookie-banner-btn {
    width: 100%;
    padding: 14px 32px;
  }
}

/* Language Switcher */
.lang-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  background: rgba(44, 62, 80, 0.9);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
}

.lang-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-link:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lang-link.active {
  background: #3498db;
  color: #ffffff;
}

.lang-separator {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

@media (max-width: 768px) {
  .lang-switcher {
    top: 10px;
    right: 10px;
    padding: 6px 10px;
  }
  
  .lang-link {
    font-size: 13px;
    padding: 3px 6px;
  }
}




