/* Games portal ferienreif.net – modelled on the 2009 original, but responsive. */
:root {
  --green: #3f6a18;
  --green-bright: #69b326;
  --blue: #12a8d4;
  --blue-box: #0fa6d3;
  --magenta: #d93ad0;
  --grey: #989898;
  --grey-light: #efefef;
  --grey-bar: #d4d8db;
  --text: #333;
  --bg: #fff;
  --radius: 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.45; }
a { color: var(--green); text-decoration: none; font-weight: bold; }
a:hover, a:focus-visible { color: var(--blue); }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; z-index: 10; }

.page { max-width: 1040px; margin: 0 auto; padding: 8px 16px 24px; }

/* header */
.site-header .logo { display: block; width: fit-content; max-width: 100%; }
.site-header .logo img { display: block; width: 658px; max-width: 100%; height: auto; }
/* grey bar below the logo, as in the original, but spanning the full page width */
.header-bar { height: 12px; margin-top: 4px; background: var(--grey-bar); }
.main-nav {
  display: flex; flex-wrap: wrap; gap: 2px; margin: 8px 0 10px;
  border-top: 6px solid var(--grey-light); border-bottom: 6px solid var(--grey-light); padding: 4px 0;
}
.main-nav a {
  flex: 1 1 auto; text-align: center; padding: 9px 14px 9px 28px; position: relative;
  text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; color: #666;
  background: linear-gradient(#fafafa, #dcdcdc); border-radius: var(--radius);
}
.main-nav a::before {
  content: ""; position: absolute; left: 10px; top: 50%; translate: 0 -50%;
  border: 6px solid transparent; border-left: 8px solid var(--magenta);
}
.main-nav a:hover, .main-nav a[aria-current] { color: #fff; background: linear-gradient(#e46be0, #b52aae); }
.main-nav a:hover::before, .main-nav a[aria-current]::before { border-left-color: #fff; }

/* left/right border as in the original (purple gradient) */
.layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 10px; align-items: start;
  padding: 0 22px; background: url(/assets/img/rand.png) left top / 20px 100% no-repeat,
                               url(/assets/img/rand.png) right top / 20px 100% no-repeat;
  min-height: 420px;
}
.box { border: 1px solid var(--grey); background: #fff; }
.box-title, .content-title {
  margin: 0; font-size: .95rem; background: var(--grey-light); border-bottom: 1px solid var(--grey); padding: 3px 6px;
}
.content-title { text-align: center; }
.content { min-width: 0; padding-bottom: 16px; }
.content > :not(.content-title) { margin-left: 12px; margin-right: 12px; }
.content > .stats { width: calc(100% - 24px); }

.newest { list-style: none; margin: 0; padding: 8px 4px; background: url(/assets/img/boxhg.gif) repeat-y; }
.newest li { padding: 3px 0 3px 30px; background: url(/assets/img/icon1.gif) 4px center no-repeat; }

.intro { margin-top: 12px; }

/* home page */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); max-width: 640px; margin-inline: auto !important; gap: 16px; margin-top: 12px; }
.category-box { border: 1px solid var(--grey); position: relative; padding-bottom: 10px; }
.category-box h2 { margin: 0; font-size: .95rem; text-align: center; padding: 3px; }
.category-box h2 a { color: #fff; display: block; }
.cat-1 h2, .cat-4 h2 { background: var(--blue-box); }
.cat-2 h2, .cat-3 h2 { background: var(--green-bright); }
.category-box > img { display: block; width: 100%; }
.category-box ul { margin: 8px 50px 0 6px; padding-left: 18px; }
.category-box .more { position: absolute; right: 8px; bottom: 10px; }

.play-button {
  display: inline-block; width: 36px; height: 36px; border-radius: 6px; flex: none;
  background: linear-gradient(#f59af0, #d93ad0);
}
.play-button::after { content: ""; display: block; margin: 9px 0 0 14px; border: 9px solid transparent; border-left: 12px solid #fff; border-right: 0; }
.play-button:hover { filter: brightness(1.1); }

.badge { font-size: .7rem; font-weight: normal; background: #f6e4a9; color: #6b5300; padding: 1px 6px; border-radius: 8px; white-space: nowrap; }

/* category page */
.game-list { list-style: none; padding: 0; }
.game-item { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--grey-light); }
.game-item .thumb { flex: 0 0 110px; }
.game-item .thumb img { display: block; max-height: 80px; width: auto; }
.game-info { flex: 1; min-width: 0; }
.game-info h2 { font-size: 1rem; margin: 0 0 2px; }
.game-info p { margin: 2px 0; }
.game-info .meta { font-size: .85rem; color: #555; }
.is-pending .thumb img { filter: grayscale(.8); opacity: .7; }

/* stars: 5 stars = very good */
.stars { display: inline-block; position: relative; vertical-align: -2px; width: 80px; height: 16px;
  background: repeating-linear-gradient(90deg, #ddd 0 14px, transparent 14px 16px);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 16'%3E%3Cg id='s'%3E%3Cpath d='M8 0l2.4 5 5.6.6-4.2 3.8 1.2 5.6L8 12.2 3 15l1.2-5.6L0 5.6 5.6 5z'/%3E%3C/g%3E%3Cuse href='%23s' x='16'/%3E%3Cuse href='%23s' x='32'/%3E%3Cuse href='%23s' x='48'/%3E%3Cuse href='%23s' x='64'/%3E%3C/svg%3E") 0 0 / 80px 16px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 16'%3E%3Cg id='s'%3E%3Cpath d='M8 0l2.4 5 5.6.6-4.2 3.8 1.2 5.6L8 12.2 3 15l1.2-5.6L0 5.6 5.6 5z'/%3E%3C/g%3E%3Cuse href='%23s' x='16'/%3E%3Cuse href='%23s' x='32'/%3E%3Cuse href='%23s' x='48'/%3E%3Cuse href='%23s' x='64'/%3E%3C/svg%3E") 0 0 / 80px 16px;
  background-color: #ddd; }
.stars-fill { position: absolute; inset: 0 auto 0 0; background: #f2b01e; }

/* game page */
.breadcrumb { font-size: .85rem; margin-top: 8px; }
.player-frame {
  margin: 12px auto 0; width: 100%; max-width: min(960px, calc(var(--w) * 1.5px));
  aspect-ratio: var(--w) / var(--h); background: #000; border: 1px solid var(--grey);
}
.player, .player ruffle-player, .player ruffle-object, .player > * { display: block; width: 100%; height: 100%; }
.player-tools { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.hint { font-size: .8rem; color: #666; }
.button {
  font: inherit; font-size: .85rem; font-weight: bold; color: #fff; background: #609e28; border: 1px solid #57565b;
  padding: 4px 12px; cursor: pointer; border-radius: var(--radius);
}
.button:hover { background: var(--green); }
.notice { background: #fff8e1; border-left: 4px solid #f2b01e; padding: 6px 10px; }
.not-migrated { display: flex; gap: 16px; align-items: flex-start; margin-top: 16px; padding: 16px; background: var(--grey-light); border: 1px dashed var(--grey); }
.not-migrated img { flex: 0 0 auto; max-width: 140px; }
.not-migrated h2 { margin: 0 0 6px; font-size: 1.1rem; }
.description { border: 1px solid var(--grey); padding: 4px 12px; margin-top: 16px; }
.stats { width: calc(100% - 24px); table-layout: fixed; border-collapse: collapse; margin-top: 16px; text-align: center; border: 1px solid var(--grey); }
.stats th { background: var(--grey); color: #fff; font-size: .85rem; padding: 3px; }
.stats td { padding: 8px 4px; }
.vote { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border: 1px solid var(--grey); padding: 10px 12px; margin-top: 16px; }
.vote select { font: inherit; }
.vote-result { font-size: .9rem; }

/* footer */
.site-footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 8px 22px 0; padding: 3px 8px; background: var(--grey-bar); font-size: .75rem; color: var(--green);
}
.site-footer nav { display: flex; gap: 0; }
.site-footer nav a { font-weight: normal; text-transform: uppercase; padding: 0 10px; border-right: 1px solid var(--text); }

@media (max-width: 760px) {
  :root { font-size: 16px; }
  .page { padding: 8px 12px 16px; }
  .layout { grid-template-columns: 1fr; padding: 0; background: none; }
  .sidebar { order: 2; }
  .site-footer { margin: 8px 0 0; }
  .main-nav a { flex-basis: 45%; }
  .game-item .thumb { flex-basis: 72px; }
  .not-migrated { flex-direction: column; }
}
