﻿/* ===== Forum about sausage production: theme "Smokehouse" ===== */
/* Palette: brick red, wine, cream, amber, dark chocolate */

:root {
  --primary: #9e2a1f;          /* brick red */
  --primary-hover: #7a1f16;    /* dark brick on hover */
  --primary-light: #fbefd9;    /* cream */
  --accent: #e8a54b;           /* amber */
  --accent-hover: #f2b968;     /* light amber */
  --link-hover: #b8741a;       /* readable amber for text hover */
  --danger: #c62828;
  --warning: #e8a54b;
  --wine: #6e1f17;             /* deep wine red */

  --text: #3a2218;
  --text-light: #7a5a4a;
  --text-dark: #2a1510;
  --border: #e2cdb0;
  --border-dark: #b79a78;

  --bg-dark: #2a1510;
  --bg-light: #f4ebdd;
  --bg-card: #fffaf1;
  --white: #ffffff;

  --shadow: rgba(60, 20, 10, 0.18);
  --code-font: 'Courier New', Consolas, monospace;
  --head-font: Georgia, 'Times New Roman', serif;
}

/* Base */
body {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  background-color: #f4ebdd;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Crect width='220' height='220' fill='%23f4ebdd'/%3E%3Cg fill='%239e2a1f' fill-opacity='.07'%3E%3Cpath d='M20 60q0-18 20-18h70q20 0 20 18t-20 18H40q-20 0-20-18z' transform='rotate(-12 75 60)'/%3E%3Cpath d='M120 170q0-14 16-14h56q16 0 16 14t-16 14h-56q-16 0-16-14z' transform='rotate(10 164 170)'/%3E%3C/g%3E%3Cg fill='%23e8a54b' fill-opacity='.30'%3E%3Crect x='16' y='56' width='7' height='11' rx='3' transform='rotate(-12 75 60)'/%3E%3Crect x='127' y='55' width='7' height='11' rx='3' transform='rotate(-12 75 60)'/%3E%3Crect x='116' y='165' width='6' height='10' rx='3' transform='rotate(10 164 170)'/%3E%3Crect x='204' y='165' width='6' height='10' rx='3' transform='rotate(10 164 170)'/%3E%3C/g%3E%3Cg fill='none' stroke='%236e1f17' stroke-opacity='.10' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M170 70q8-12 0-24q-8-12 0-24'/%3E%3Cpath d='M40 190q6-10 0-20q-6-10 0-20'/%3E%3C/g%3E%3Cg fill='%23e8a54b' fill-opacity='.40'%3E%3Ccircle cx='110' cy='110' r='2.5'/%3E%3Ccircle cx='0' cy='0' r='2.5'/%3E%3Ccircle cx='220' cy='0' r='2.5'/%3E%3Ccircle cx='0' cy='220' r='2.5'/%3E%3Ccircle cx='220' cy='220' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  padding: 0;
  font-family: 'Segoe UI', Verdana, Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.5;
}

/* Typography */
font, th, td, p {
  font-family: inherit;
  font-size: 15px;
}

h1, h2, .maintitle {
  font-weight: 700;
  font-size: 27px;
  font-family: var(--head-font);
  color: var(--primary);
  line-height: 1.2;
  margin: 0.8em 0;
  position: relative;
}

h1::after, h2::after, .maintitle::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 70px;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--primary) 0, var(--primary) 10px, var(--accent) 10px, var(--accent) 20px);
  border-radius: 2px;
}

/* Links */
a {
  text-decoration: none;
  color: var(--primary);
  transition: color 0.2s ease;
  font-weight: 500;
}

a:visited {
  color: #8a3a2c;
}

a:hover, a:active {
  text-decoration: underline;
  color: var(--link-hover);
}

/* Horizontal line */
hr {
  height: 0;
  border: none;
  border-top: 2px solid var(--accent);
  opacity: .7;
  margin: 20px 0;
}

/* Images */
img {
  border: 0;
  max-width: 100%;
  height: auto;
}

/* Forms */
form {
  display: inline;
}

/* Tables */
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

table.forumline {
  background-color: var(--bg-card);
  border-radius: 8px;
  box-shadow: 0 4px 10px var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
  border: 2px solid var(--wine);
  font-family: inherit;
}

table.forumline:hover {
  box-shadow: 0 8px 18px var(--shadow);
}

/* Table rows */
.row, .row1, .row2 {
  background-color: var(--bg-card);
  transition: background-color 0.2s ease;
}

.row:hover, .row1:hover, .row2:hover {
  background-color: #f8e3c0;
}

.row3 {
  background-color: var(--primary-light);
}

/* Table headers */
th, td.th {
  color: #fbefd9;
  font-size: 13px;
  font-weight: 600;
  background-color: var(--wine);
  background-image: linear-gradient(to bottom, #a63a28, var(--wine) 60%, #4a120d);
  padding: 12px 16px;
  text-align: left;
  border: none;
  border-bottom: 3px solid var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Categories */
td.cat, td.catHead, td.catLeft, td.rowpic, td.catSides, td.catRight, td.catBottom {
  color: var(--wine);
  font-size: 14px;
  font-weight: bold;
  background-color: #efdcba;
  background-image: linear-gradient(to bottom, #f8ecd2, #e8d0a2);
  padding: 10px 16px;
  border-bottom: 2px solid var(--primary);
}

/* Text sizes */
.gen {
  font-size: 15px;
}

.genmed {
  font-size: 14px;
}

.gensmall {
  font-size: 13px;
}

/* Navigation */
.nav {
  font-weight: 600;
  font-size: 15px;
  color: var(--wine);
}

.nav a, .nav a:visited {
  text-decoration: none;
  color: var(--primary);
}

.nav a:hover, .nav a:active {
  color: var(--link-hover);
  text-decoration: underline;
}

table.nav {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-left: 6px solid var(--accent);
  border-radius: 6px;
  padding: 12px;
  margin: 15px 0;
  box-shadow: 0 2px 8px var(--shadow);
}

table.nav:hover {
  border-color: var(--primary);
  border-left-color: var(--accent);
}

/* Forum links */
.forumlink {
  font-weight: 600;
  font-size: 16px;
  font-family: var(--head-font);
}

a.forumlink, a.forumlink:visited {
  text-decoration: none;
  color: var(--wine);
}

a.forumlink:hover, a.forumlink:active {
  text-decoration: underline;
  color: var(--link-hover);
}

/* Inputs */
input, textarea, select {
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 4px;
  outline: none;
  transition: all 0.2s ease;
}

input.post, textarea.post, select {
  background-color: #fffdf8;
  border: 1px solid var(--border-dark);
  border-bottom: 2px solid var(--primary);
  width: 100%;
  box-sizing: border-box;
}

input.post:focus, textarea.post:focus, select:focus {
  border-color: var(--primary);
  background-color: #fff8e4;
  box-shadow: 0 0 0 3px rgba(232, 165, 75, 0.45);
}

textarea.post {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  line-height: 1.5;
}

/* Buttons */
input.button, input.mainoption, input.liteoption, .fakebut {
  background-color: var(--bg-card);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

input.button:hover, input.mainoption:hover, input.liteoption:hover, .fakebut:hover {
  background-color: var(--accent);
  color: var(--text-dark);
  border-color: var(--wine);
}

input.mainoption {
  background-color: var(--primary);
  color: #fbefd9;
  font-weight: 600;
}

input.mainoption:hover {
  background-color: var(--primary-hover);
  color: #fbefd9;
}

/* Select */
select {
  padding: 8px 12px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239e2a1f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

select optgroup {
  background-color: #efdcba;
  color: var(--text-light);
}

select option, select optgroup option {
  background-color: var(--bg-card);
  color: var(--text);
}

/* Code and quotes */
.code, .quote {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 15px;
  margin: 10px 0;
}

.code {
  font-family: var(--code-font);
  font-size: 14px;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.5;
  color: #f6e1b8;
  background-color: var(--bg-dark);
  border-left: 5px solid var(--accent);
  font-weight: 500;
  tab-size: 4;
}

/* Code highlighting classes */
.code .keyword {
  color: #e8a54b;
}
.code .string {
  color: #f0c27a;
}
.code .comment {
  color: #a9bf8a;
  font-style: italic;
}
.code .number {
  color: #e07a5f;
}
.code .function {
  color: #f6e9d2;
}

.quote {
  font-family: var(--head-font);
  font-size: 15px;
  font-style: italic;
  color: #4a2c20;
  line-height: 1.5;
  position: relative;
  padding-left: 22px;
  background-color: var(--primary-light);
  border: 1px solid #e0c79c;
}

.quote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 6px;
  background-color: var(--primary);
  border-radius: 2px;
}

/* Post body */
.postbody {
  font-size: 15px;
  color: var(--text-dark);
  line-height: 1.6;
}

/* Name and post details */
.name {
  font-weight: 600;
  font-size: 16px;
  color: var(--wine);
}

.postdetails {
  color: var(--text-light);
  font-size: 13px;
  font-family: inherit;
}

/* Row spacer */
td.spacerow {
  background-color: var(--border);
  background-image: linear-gradient(to right, var(--primary), var(--accent), var(--primary));
  height: 3px;
  padding: 0;
}

/* Category title */
.cattitle {
  font-weight: 600;
  font-size: 18px;
  font-family: var(--head-font);
  color: var(--wine);
}

a.cattitle {
  text-decoration: none;
}

a.cattitle:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Page buttons */
.pgbutt a {
  font-family: inherit;
  padding: 6px 12px;
  text-decoration: none;
  border: 1px solid var(--primary);
  background: var(--bg-card);
  margin: 5px 3px 0 0;
  border-radius: 14px;
  color: var(--primary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.pgbutt a:hover {
  border-color: var(--wine);
  background-color: var(--accent);
  color: var(--text-dark);
}

/* QR-Code */
#qr img {
  width: 40px;
  height: 40px;
  position: fixed;
  right: 15px;
  top: 15px;
  border: 2px solid var(--accent);
  padding: 4px;
  background-color: var(--bg-card);
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow);
  transition: all 0.2s ease;
}

#qr img:hover {
  width: 200px;
  height: 200px;
  z-index: 100;
  padding: 8px;
}

/* Guest avatar */
.guestavatar {
  width: 120px;
  height: 120px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 55%, var(--accent) 55%);
  color: #fbefd9;
  font-size: 50px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20%;
  box-shadow: 0 4px 10px var(--shadow);
  text-shadow: 0 2px 4px rgba(0, 0, 0, .5);
  font-family: var(--head-font);
}

/* Admin menu */
#nav8, #nav8 ul, #nav8 li {
  margin: 0;
  padding: 0;
  border: 0;
}

#nav8, #nav8 ul {
  background: var(--bg-dark);
}

#nav8 {
  border-spacing: 0;
  position: relative;
  z-index: 50;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--wine);
}

#nav8 ul {
  position: absolute;
  display: none;
  background: var(--bg-dark);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px var(--shadow);
  border: 1px solid var(--wine);
  border-top: 2px solid var(--accent);
  overflow: hidden;
}

#nav8 td:hover ul {
  display: block;
}

#nav8 ul li {
  list-style: none;
}

#nav8 .right {
  direction: rtl;
}

#nav8 .right ul {
  right: 0;
}

#nav8 .right li {
  direction: ltr;
}

#nav8 a {
  display: block;
  padding: 12px 16px;
  text-align: center;
  text-decoration: none;
  color: #fbefd9;
  transition: all 0.2s ease;
  font-weight: 500;
  font-family: inherit;
  font-size: 14px;
}

#nav8 ul a {
  padding: 10px 15px;
  text-align: left;
}

#nav8 td:hover, #nav8 li:hover {
  background: var(--primary);
}

#nav8 td:hover a, #nav8 li:hover a {
  color: var(--accent);
  text-decoration: none;
}

#nav8 td {
  text-align: center;
}

/* Highlight block */
.terminal-style {
  background-color: var(--bg-dark);
  color: var(--accent);
  font-family: var(--code-font);
  padding: 15px;
  border-radius: 6px;
  border-left: 5px solid var(--primary);
  box-shadow: 0 4px 8px var(--shadow);
  position: relative;
}

.terminal-style::before {
  content: '\2022 ';
  color: var(--accent);
}

/* Loading bar */
#cssbar-wrapper {
  width: 300px;
  height: 6px;
  position: absolute;
  left: 50%;
}

#cssbar-border {
  height: 100%;
  width: 100%;
  position: relative;
  left: -50%;
  top: -50%;
  background-color: var(--wine);
  border-radius: 3px;
  overflow: hidden;
}

#cssbar-whitespace {
  overflow: hidden;
  height: 100%;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

#cssbar-line {
  background-color: var(--accent);
  position: absolute;
  height: 100%;
  width: 40%;
  border-radius: 3px;
  animation: cssbar-slide 1.5s ease-in-out infinite;
  -o-animation: cssbar-slide 1.5s ease-in-out infinite;
  -ms-animation: cssbar-slide 1.5s ease-in-out infinite;
  -webkit-animation: cssbar-slide 1.5s ease-in-out infinite;
  -moz-animation: cssbar-slide 1.5s ease-in-out infinite;
}

@keyframes cssbar-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

@-o-keyframes cssbar-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

@-ms-keyframes cssbar-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

@-webkit-keyframes cssbar-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

@-moz-keyframes cssbar-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* Preformatted blocks */
pre {
  background-color: var(--bg-dark);
  color: #f6e1b8;
  font-family: var(--code-font);
  padding: 15px;
  border-radius: 6px;
  border-left: 5px solid var(--accent);
  overflow-x: auto;
  margin: 15px 0;
  box-shadow: 0 4px 8px var(--shadow);
}

/* Mobile */
@media (max-width: 768px) {
  body {
    width: 95%;
  }

  th, td.th, td.cat, td.catHead, td.catLeft, td.rowpic, td.catSides, td.catRight, td.catBottom {
    padding: 10px;
  }

  .maintitle, h1, h2 {
    font-size: 22px;
  }

  #qr img {
    right: 10px;
    top: 10px;
  }

  .code {
    font-size: 13px;
  }
}