/* ============================================================
   Dravos – 2005-2006 RuneScape.com Faithful Recreation
   3-Column Layout: Left Sidebar | Main Content | Right Sidebar
   ============================================================ */

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

body {
  font: 11px/1.5 Verdana, Geneva, Tahoma, sans-serif;
  color: #c6b895;
  background: #000;
  min-height: 100vh;
}

body.vote-page {
  background:
    radial-gradient(circle at top center, rgba(120, 72, 14, .35), transparent 34%),
    radial-gradient(circle at left 18%, rgba(78, 44, 7, .22), transparent 28%),
    radial-gradient(circle at right 16%, rgba(78, 44, 7, .22), transparent 28%),
    linear-gradient(180deg, #050200 0%, #120700 22%, #0b0500 100%);
}

a { color: #f1c660; text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }

img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* ---------- SITE HEADER ---------- */
#site-header {
  background: #000;
  text-align: center;
  padding: 0;
  border-bottom: 3px solid #5c3a0e;
}

#header-banner {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  min-height: 120px;
  background: linear-gradient(180deg, #1a0f00, #0d0800);
  display: flex;
  align-items: center;
  justify-content: center;
}

#header-banner img {
  max-height: 110px;
}

/* fallback text logo when no image set */
.text-logo {
  font: bold 48px 'Times New Roman', Times, serif;
  color: #ffd966;
  text-shadow: 2px 2px 0 #000, 0 0 14px rgba(255,170,0,.5);
  letter-spacing: 4px;
  text-transform: uppercase;
}
.text-logo-sub {
  font-size: 10px;
  color: #a89060;
  letter-spacing: 6px;
  text-transform: uppercase;
}

/* ---------- NAVIGATION BAR ---------- */
#nav-bar {
  background: linear-gradient(180deg, #5c3a0e, #3b2207 50%, #1f1200);
  border-top: 1px solid #7d5b22;
  border-bottom: 2px solid #7d5b22;
  text-align: center;
}

.main-nav {
  display: inline-flex;
  list-style: none;
}

.main-nav li { position: relative; }

.main-nav li + li::before {
  content: '|';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #7d5b22;
  font-size: 10px;
}

.main-nav a {
  display: block;
  padding: 5px 14px;
  color: #f5d89a;
  font: bold 10px Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
}

.main-nav a:hover, .main-nav a.active {
  color: #fff;
  background: rgba(255,200,80,.15);
  text-decoration: none;
}

/* ---------- 3-COLUMN LAYOUT ---------- */
#page-body {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 160px 1fr 180px;
  gap: 0;
  min-height: 500px;
  background: #0d0800;
  border-left: 2px solid #3b2207;
  border-right: 2px solid #3b2207;
}

body.vote-page #page-body {
  background:
    linear-gradient(180deg, rgba(31, 17, 2, .98), rgba(18, 10, 1, .98)),
    repeating-linear-gradient(90deg, rgba(255, 207, 92, .02) 0 1px, transparent 1px 24px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

#left-sidebar {
  background: linear-gradient(180deg, #1c1002, #120b01);
  border-right: 1px solid #3b2207;
  padding: 10px 8px;
}

#main-content {
  background: #130d03;
  padding: 12px 14px;
  border-right: 1px solid #3b2207;
}

#right-sidebar {
  background: linear-gradient(180deg, #1c1002, #120b01);
  padding: 10px 8px;
}

/* ---------- SIDEBAR BOXES ---------- */
.side-box {
  margin-bottom: 10px;
}

.side-box-head {
  background: linear-gradient(180deg, #5c3a0e, #3b2207);
  border: 1px solid #6b4f1d;
  border-bottom: none;
  padding: 4px 8px;
  color: #ffd966;
  font: bold 10px Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-shadow: 1px 1px 0 #000;
}

.side-box-body {
  background: rgba(20,12,2,.8);
  border: 1px solid #3b2207;
  padding: 8px;
  font-size: 10px;
  line-height: 1.6;
}

.side-box-body ul {
  list-style: none;
  padding: 0;
}

.side-box-body li {
  padding: 3px 0;
  border-bottom: 1px solid #1f1200;
}

.side-box-body li:last-child { border-bottom: none; }

.side-box-body a { color: #d4a93a; }
.side-box-body a:hover { color: #fff; }

/* ---------- MAIN CONTENT PANELS ---------- */
.panel {
  margin-bottom: 12px;
}

.panel-head {
  background: linear-gradient(180deg, #5c3a0e, #3b2207);
  border: 1px solid #6b4f1d;
  border-bottom: none;
  padding: 5px 10px;
  color: #ffd966;
  font: bold 11px Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
}

.panel-body {
  background: rgba(20,12,2,.6);
  border: 1px solid #3b2207;
  padding: 10px 12px;
}

/* ---------- NEWS ARTICLE LAYOUT ---------- */
.news-article {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #2b1a05;
}

.news-article:last-child { border-bottom: none; }

.news-thumb {
  flex: 0 0 90px;
  height: 65px;
  background: #1a0f00;
  border: 1px solid #3b2207;
  overflow: hidden;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-text { flex: 1; }

.news-date {
  color: #7a6530;
  font-size: 9px;
  display: block;
  margin-bottom: 2px;
}

.news-title {
  color: #ffd966;
  font-weight: bold;
  font-size: 11px;
}

.news-title:hover { color: #fff; }

.news-desc {
  color: #a89060;
  font-size: 10px;
  margin-top: 2px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid #6b4f1d;
  border-radius: 2px;
  background: linear-gradient(180deg, #5c3a0e, #3b2207);
  color: #ffd966;
  font: bold 10px Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  background: linear-gradient(180deg, #7d5b22, #5c3a0e);
  color: #fff;
  text-decoration: none;
}

.button-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 10px;
}

.btn-small {
  font-size: 9px;
  padding: 3px 8px;
}

.news-comment {
  border: 1px solid #2b1a05;
  background: #1a0e02;
  padding: 8px;
  margin-bottom: 8px;
}

.news-comment-meta {
  color: #9a8148;
  font-size: 9px;
  margin-bottom: 4px;
}

.news-comment-body {
  color: #d8caa4;
  white-space: pre-wrap;
  margin-bottom: 8px;
}

.news-comment-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- FORMS ---------- */
.form-row {
  margin-bottom: 8px;
}

.form-row label {
  display: block;
  color: #d4be8a;
  font: bold 9px Verdana, sans-serif;
  text-transform: uppercase;
  margin-bottom: 3px;
  letter-spacing: .5px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid #6b4f1d;
  background: #1a0f00;
  color: #e5d5a8;
  padding: 5px 7px;
  font: 11px Verdana, sans-serif;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #ffd966;
  box-shadow: 0 0 4px rgba(255,200,80,.3);
}

.status-msg {
  margin-top: 8px;
  font-size: 11px;
  color: #c9a84c;
  min-height: 14px;
}

.status-msg.error { color: #ff6b6b; }

/* ---------- TABLES ---------- */
table { width: 100%; border-collapse: collapse; }

th {
  background: linear-gradient(180deg, #5c3a0e, #3b2207);
  color: #ffd966;
  font: bold 9px Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: left;
  padding: 4px 7px;
  border: 1px solid #6b4f1d;
  text-shadow: 1px 1px 0 #000;
}

td {
  background: #1c1002;
  color: #c6b895;
  padding: 4px 7px;
  border: 1px solid #2b1a05;
  font-size: 10px;
}

tr:nth-child(even) td { background: #1a0e02; }
tr:hover td { background: #251608; }

/* ---------- FULL-WIDTH (for pages w/o sidebars) ---------- */
.full-width {
  grid-column: 1 / -1;
  padding: 12px 14px;
}

/* ---------- ADMIN ---------- */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-section {
  margin-bottom: 14px;
}

.admin-section h3 {
  color: #ffd966;
  font-size: 11px;
  margin-bottom: 6px;
  border-bottom: 1px solid #3b2207;
  padding-bottom: 4px;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.store-section {
  margin-bottom: 14px;
}

.store-section:last-child {
  margin-bottom: 0;
}

.store-section-title {
  color: #ffd966;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #3b2207;
  padding-bottom: 4px;
}

.store-card {
  border: 1px solid #3b2207;
  background: linear-gradient(180deg, rgba(30,18,4,.95), rgba(20,12,2,.95));
  padding: 10px;
}

.store-card h3 {
  color: #ffd966;
  font-size: 11px;
  margin-bottom: 6px;
}

.store-card p {
  color: #bba775;
  margin-bottom: 8px;
}

.store-card-price {
  color: #fff1b0;
  font: bold 14px Georgia, 'Times New Roman', serif;
  margin-bottom: 4px;
}

.store-card-meta {
  color: #8f7743;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}

.store-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.store-note {
  color: #8f7743;
  font-size: 9px;
}

.vote-hero-panel {
  margin-bottom: 14px;
}

.vote-hero-body {
  background:
    radial-gradient(circle at top right, rgba(255, 197, 84, .12), transparent 34%),
    linear-gradient(180deg, rgba(28, 16, 2, .96), rgba(17, 10, 1, .96));
}

.vote-kicker {
  color: #b99137;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 5px;
}

.vote-title {
  color: #ffe19a;
  font: bold 24px Georgia, 'Times New Roman', serif;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.vote-intro {
  color: #bca46e;
  margin-bottom: 12px;
}

.vote-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vote-stat-card {
  border: 1px solid #3b2207;
  background: linear-gradient(180deg, rgba(35, 19, 3, .94), rgba(20, 11, 1, .94));
  padding: 10px;
  min-height: 72px;
}

.vote-stat-label {
  display: block;
  color: #8f7743;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 6px;
}

.vote-stat-card strong {
  color: #ffe8af;
  font: bold 18px Georgia, 'Times New Roman', serif;
}

.vote-leaderboard-table td:first-child,
.vote-leaderboard-table th:first-child {
  width: 54px;
  text-align: center;
}

.vote-leaderboard-table td:last-child,
.vote-leaderboard-table th:last-child {
  width: 88px;
  text-align: right;
}

.vote-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #6e4a15, #3b2207);
  border: 1px solid #8e6a2d;
  color: #ffe19a;
  font: bold 10px Verdana, sans-serif;
}

.vote-rank-badge.top-three {
  background: linear-gradient(180deg, #b8861b, #6e4a15);
  border-color: #e4bf63;
}

.vote-leaderboard-name {
  color: #ffe19a;
  font-weight: bold;
}

.vote-leaderboard-sub {
  color: #8f7743;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.vote-empty-state {
  color: #8f7743;
  text-align: center;
  padding: 16px 0;
}

.img-preview {
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  background: #0d0800;
  border: 1px solid #3b2207;
  margin-top: 4px;
}

/* ---------- FOOTER ---------- */
#site-footer {
  max-width: 780px;
  margin: 0 auto;
  padding: 10px;
  text-align: center;
  color: #5a4a28;
  font-size: 9px;
  border-top: 2px solid #3b2207;
  background: #0a0600;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 780px) {
  #page-body {
    grid-template-columns: 1fr;
  }
  #left-sidebar, #right-sidebar {
    border: none;
    padding: 8px 14px;
  }
  .admin-grid { grid-template-columns: 1fr; }
  .vote-stat-strip { grid-template-columns: 1fr; }
}
