:root {
  --bg-dark: #0a0a0c;
  --panel-bg: rgba(18, 20, 26, 0.78);
  --gold: #d4af37;
  --gold-light: #f3e5ab;
  --gold-dark: #aa8529;
  --text-main: #f0f0f0;
  --text-muted: #a0a0a0;
  --danger: #e74c3c;
  --success: #2ecc71;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at top, rgba(212,175,55,.15), transparent 35%), linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.75)), url('https://offertabs.s3.amazonaws.com/offer/gs6ard/site/media/6a16d3ef804022.85829845.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
}
.hidden { display: none !important; }
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  border-radius: 16px;
}
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.navbar { padding: 1rem 2rem; border-radius: 0 0 16px 16px; border-top: none; position: sticky; top: 0; z-index: 100; }
.nav-content { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.logo { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; color: var(--gold-light); letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.nav-links { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.nav-tab { background: transparent; border: none; color: var(--text-muted); font: 700 1rem var(--font-body); cursor: pointer; padding: .6rem .9rem; border-radius: 10px; transition: all .25s ease; }
.nav-tab:hover { color: var(--text-main); background: rgba(255,255,255,.06); }
.nav-tab.active { color: var(--gold); background: rgba(212,175,55,.12); }
.content-container { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; display: flex; flex-direction: column; gap: 2rem; }
.hero { padding: 4rem 2rem; text-align: center; }
.badge { display: inline-block; padding: 6px 16px; border-radius: 999px; background: rgba(212,175,55,.15); border: 1px solid rgba(212,175,55,.3); color: var(--gold-light); font-size: .85rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 1.4rem; }
h1,h2,h3,h4 { font-family: var(--font-heading); font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); color: #fff; }
.text-gradient { background: linear-gradient(135deg, #f3e5ab 0%, #d4af37 50%, #aa8529 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-desc { font-size: 1.1rem; color: var(--text-muted); max-width: 650px; margin: 0 auto 1.2rem; }
.dates { color: var(--gold); font-weight: 700; }
.tab-content { display: none; animation: fadeIn .3s ease forwards; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.form-wrapper { padding: 2rem; }
.rules-box { background: rgba(212,175,55,.06); border-left: 4px solid var(--gold); padding: 1.3rem; border-radius: 0 10px 10px 0; margin-bottom: 1.5rem; }
.rules-box h4 { color: var(--gold); margin-bottom: .5rem; }
.rules-box ul { margin-left: 1.3rem; color: var(--text-muted); }
.notice-box, .alert { padding: 1rem; border-radius: 10px; margin-bottom: 1.5rem; }
.notice-box { background: rgba(52,152,219,.12); border: 1px solid rgba(52,152,219,.25); color: #d9edff; }
.alert-warning { background: rgba(243,156,18,.15); border: 1px solid rgba(243,156,18,.3); color: #f1c40f; }
.tally-frame-wrapper iframe { width: 100%; min-height: 720px; border: 0; border-radius: 12px; background: #fff; }
.toolbar { padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.toolbar p, .status-line { color: var(--text-muted); }
.status-line { margin: 1rem 0; }
.btn-primary, .btn-secondary { font-family: var(--font-body); font-weight: 800; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; border-radius: 10px; }
.btn-primary { width: 100%; padding: 1rem; color: #111; background: linear-gradient(135deg, #f3e5ab 0%, #d4af37 100%); border: none; }
.btn-secondary { padding: .9rem 1.2rem; color: var(--gold); background: rgba(212,175,55,.1); border: 1px solid rgba(212,175,55,.3); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-2px); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.gallery-card { background: var(--panel-bg); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .25s, box-shadow .25s, border-color .25s; display: flex; flex-direction: column; }
.gallery-card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(0,0,0,.55); border-color: rgba(212,175,55,.5); }
.card-img { width: 100%; height: 220px; object-fit: cover; background: #000; }
.card-info { padding: 1.2rem; flex: 1; }
.card-title { font-size: 1.1rem; color: var(--gold-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .3rem; }
.card-ign { color: var(--text-muted); font-size: .95rem; }
.judge-score-btn { border: 0; border-top: 1px solid rgba(212,175,55,.25); background: rgba(212,175,55,.12); color: var(--gold-light); padding: .85rem; font-weight: 800; cursor: pointer; }
.empty-state { grid-column: 1/-1; text-align: center; padding: 4rem 2rem; border: 1px dashed rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.03); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-content { position: relative; width: 100%; max-width: 700px; max-height: 92vh; overflow-y: auto; padding: 2rem; }
.large-modal { max-width: 1100px; }
.close-btn { position: absolute; top: 14px; right: 18px; border: 0; background: transparent; color: var(--text-muted); font-size: 2rem; cursor: pointer; }
.close-btn:hover { color: #fff; }
.modal-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 2rem; align-items: start; }
.modal-img { width: 100%; max-height: 62vh; object-fit: contain; background: #000; border-radius: 12px; margin-bottom: 1rem; }
.modal-thumbs { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.modal-thumbs img { width: 74px; height: 74px; object-fit: cover; border-radius: 8px; border: 2px solid rgba(212,175,55,.25); cursor: pointer; }
.modal-title { color: var(--gold-light); }
.modal-meta { color: var(--text-muted); margin-bottom: .5rem; }
.modal-summary { white-space: pre-wrap; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08); padding: 1rem; border-radius: 10px; margin-top: 1rem; }
.judge-form-card { background: rgba(0,0,0,.25); border: 1px solid rgba(212,175,55,.18); padding: 1.4rem; border-radius: 14px; }
.input-group { margin-bottom: 1rem; }
label { display: block; font-weight: 700; margin-bottom: .4rem; }
input, textarea, select { width: 100%; padding: .9rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.45); color: #fff; font: 1rem var(--font-body); }
select option { background: #1a1a1a; }
.scoring-grid { display: grid; gap: .8rem; margin: 1rem 0; }
.score-total { padding: 1rem; background: rgba(212,175,55,.1); border-radius: 10px; text-align: right; color: var(--gold-light); font-weight: 800; margin-bottom: 1rem; }
.results-table-wrap { padding: 1rem; overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; }
.results-table th, .results-table td { text-align: left; padding: 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.results-table th { color: var(--gold-light); }
footer { text-align: center; padding: 2rem; color: var(--text-muted); margin-top: auto; }
.judge-link { color: rgba(255,255,255,.25); text-decoration: none; font-size: .9rem; display: inline-block; margin-top: .7rem; }
.judge-link:hover { color: var(--gold); }
@media (max-width: 820px) {
  .nav-content, .toolbar { flex-direction: column; align-items: flex-start; }
  .modal-layout { grid-template-columns: 1fr; }
  .form-wrapper, .hero, .modal-content { padding: 1.4rem; }
  .tally-frame-wrapper iframe { min-height: 820px; }
}
