/* Base resets and variables */
:root {
	--bg: #1A120D;
	--surface: #2B1E17;
	--panel: #3B2A21;
	--panel-2: #4A3328;

	--gold-300: #E3C06A;
	--gold-200: #DDB45A;
	--gold-400: #C9A24E;
	--gold-600: #9C7B3B;

	--text: #D8C9A6;
	--text-2: #B6A78A;
	--link: #DDB45A;
	--link-hover: #EBCB7B;
	--link-active: #B6883A;

	--divider: #241811;
	--overlay: rgba(26,18,13,0.9);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
	line-height: 1.6;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
a:active { color: var(--link-active); }

.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

/* Header and mobile menu */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: linear-gradient(#3B2A21, #2B1E17);
	border-bottom: 1px solid var(--gold-600);
}
.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}
.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 700;
	color: var(--gold-300);
}
.brand img { width: 32px; height: 32px; }

.nav-links {
	display: flex;
	gap: 20px;
}
.nav-links a {
	padding: 8px 10px;
	border-bottom: 2px solid transparent;
}
.nav-links a:hover {
	border-color: var(--gold-400);
}

.hamburger {
	display: none;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid var(--gold-600);
	border-radius: 6px;
	color: var(--gold-300);
	cursor: pointer;
	transition: transform .2s ease;
}
.hamburger:focus { outline: 2px solid var(--gold-300); outline-offset: 2px; }
.hamburger .lines {
	position: relative;
	width: 20px;
	height: 2px;
	background: currentColor;
}
.hamburger .lines::before,
.hamburger .lines::after {
	content: "";
	position: absolute;
	left: 0;
	width: 20px;
	height: 2px;
	background: currentColor;
	transition: transform .25s ease, top .25s ease, bottom .25s ease, opacity .2s ease;
}
.hamburger .lines::before { top: -6px; }
.hamburger .lines::after { bottom: -6px; }
.hamburger.is-active .lines { background: transparent; }
.hamburger.is-active .lines::before { top: 0; transform: rotate(45deg); }
.hamburger.is-active .lines::after { bottom: 0; transform: rotate(-45deg); }

.mobile-drawer {
	position: fixed;
	top: 0;
	right: 0;
	width: 82%;
	max-width: 360px;
	height: 100vh;
	background: var(--surface);
	border-left: 1px solid var(--gold-600);
	transform: translateX(100%);
	transition: transform .3s ease;
	z-index: 1100;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.mobile-drawer a { padding: 10px 6px; border-bottom: 1px solid var(--divider); }
.mobile-drawer.open { transform: translateX(0%); }

.overlay {
	position: fixed;
	inset: 0;
	background: var(--overlay);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease;
	z-index: 1050;
}
.overlay.visible {
	opacity: 1;
	pointer-events: auto;
}
.no-scroll { overflow: hidden; }

/* Hero */
.hero {
	position: relative;
	padding: 72px 0 56px 0;
	border-bottom: 1px solid var(--gold-600);
	overflow: hidden;
}
.hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: url('../image/herofon.webp');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	filter: blur(8px);
	z-index: 0;
}
.hero .container {
	position: relative;
	z-index: 1;
}
.hero-content {
	background: rgba(35, 23, 16, 0.85);
	border: 1px solid var(--gold-600);
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.hero-content:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 36px rgba(156, 123, 59, 0.25);
	border-color: var(--gold-400);
	background: rgba(35, 23, 16, 0.9);
}
.hero h1 {
	margin: 0 0 12px 0;
	font-size: 40px;
	line-height: 1.2;
	color: var(--gold-300);
	text-shadow: 0 1px 0 #000;
}
.hero p {
	margin: 0 0 18px 0;
	font-size: 18px;
	color: var(--text);
}
.hero-layout {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 24px;
	align-items: center;
}
.hero-visual img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	border: 1px solid var(--gold-600);
	box-shadow: 0 8px 28px rgba(0,0,0,.35);
	transition: transform 0.4s ease, filter 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.hero-visual:hover img {
	transform: scale(1.03);
	filter: brightness(1.1);
	box-shadow: 0 12px 40px rgba(156, 123, 59, 0.3);
	border-color: var(--gold-400);
}
.btn {
	display: inline-block;
	padding: 12px 18px;
	background: #3B2A21;
	color: #EAD9B8;
	border: 1px solid var(--gold-600);
	border-radius: 8px;
	transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { background: #4A3328; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.btn:active { transform: translateY(1px); background: #2B1E17; }
.btn-primary { background: linear-gradient(#4A3328, #3B2A21); border-color: var(--gold-400); }
.btn-primary:hover { background: linear-gradient(#554031, #433024); }

.grid {
	display: grid;
	gap: 20px;
}
.features {
	padding: 36px 0;
}
.card {
	background: #231710;
	border: 1px solid var(--gold-600);
	border-radius: 12px;
	padding: 18px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(156, 123, 59, 0.3);
	border-color: var(--gold-400);
}
.card .card-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	border: 1px solid var(--gold-600);
	box-shadow: 0 6px 18px rgba(0,0,0,.35);
	margin-bottom: 12px;
	transition: transform 0.4s ease, filter 0.4s ease, box-shadow 0.4s ease;
}
.card:hover .card-image {
	transform: scale(1.05);
	filter: brightness(1.1);
	box-shadow: 0 8px 24px rgba(0,0,0,.5);
}

/* Map */
.map-container {
	border: 1px solid var(--gold-600);
	border-radius: 12px;
	overflow: hidden;
	background: #1E140F;
}
.map-container iframe {
	display: block;
	width: 100%;
	height: 450px;
	border: 0;
}

/* Footer */
.site-footer {
	margin-top: 40px;
	border-top: 1px solid var(--gold-600);
	background: linear-gradient(to bottom, #20150F, #1A120D);
	color: var(--text-2);
}
.site-footer .container { padding: 40px 16px 20px; }

.footer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 32px;
	margin-bottom: 32px;
}
.footer-col h3 {
	color: var(--gold-300);
	font-size: 1.1rem;
	margin: 0 0 16px;
	font-weight: 600;
}
.footer-col p {
	margin: 0;
	line-height: 1.6;
}
.footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.footer-col ul li {
	margin-bottom: 10px;
}
.footer-col ul li:last-child {
	margin-bottom: 0;
}
.footer-col a {
	color: var(--text-2);
	transition: color 0.2s ease;
}
.footer-col a:hover {
	color: var(--gold-200);
}
.footer-contact li {
	line-height: 1.6;
}
.footer-bottom {
	border-top: 1px solid var(--divider);
	padding-top: 20px;
	text-align: center;
}
.footer-bottom small {
	color: var(--text-2);
	font-size: 0.875rem;
}

/* Tournament Gallery */
.tourney-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}
.tourney-thumb {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	padding: 0;
	border: 1px solid var(--gold-600);
	border-radius: 12px;
	background: #20150F;
	overflow: hidden;
	cursor: pointer;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tourney-thumb img {
	display: block;
	width: 100%;
	height: auto;
	min-height: 200px;
	max-height: 300px;
	object-fit: contain;
	background: #1A120D;
}
.tourney-thumb .tourney-caption {
	display: block;
	padding: 10px 12px;
	color: var(--gold-300);
	font-weight: 600;
}
.tourney-thumb:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(0,0,0,.35);
	border-color: var(--gold-400);
}

/* Lightbox modal for gallery */
.gallery-dialog {
	max-width: 920px;
	width: 92%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 0;
}
.gallery-dialog h3 {
	margin: 0 0 16px 0;
	padding: 0 20px;
	flex-shrink: 0;
	color: var(--gold-300);
	font-size: 1.3rem;
}
.gallery-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #1E140F;
	border: 1px solid var(--gold-600);
	border-radius: 10px;
	padding: 20px;
	min-height: 300px;
	max-height: calc(90vh - 180px);
	flex: 1 1 auto;
	overflow: hidden;
}
.lightbox-image {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	display: block;
	border-radius: 8px;
	object-fit: contain;
}
.gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(59, 42, 33, 0.9);
	border: 1px solid var(--gold-600);
	color: var(--gold-300);
	padding: 12px 16px;
	border-radius: 8px;
	cursor: pointer;
	transition: background .2s ease, transform .08s ease;
	z-index: 10;
	font-size: 18px;
	line-height: 1;
}
.gallery-nav:hover { background: rgba(74, 51, 40, 0.95); }
.gallery-nav:active { transform: translateY(-50%) scale(0.98); }
.gallery-nav.prev { left: 20px; }
.gallery-nav.next { right: 20px; }
.gallery-caption {
	margin: 16px 0 0;
	color: var(--gold-300);
	font-weight: 600;
	font-size: 1.1rem;
	padding: 0 20px 20px;
	flex-shrink: 0;
}

@media (max-width: 768px) {
	.footer-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.site-footer .container {
		padding: 32px 16px 20px;
	}
	.tourney-thumb img {
		min-height: 150px;
		max-height: 220px;
	}
	.gallery-dialog {
		width: 95%;
		max-height: 85vh;
	}
	.gallery-stage {
		padding: 10px;
		max-height: calc(85vh - 160px);
	}
	.gallery-nav {
		padding: 10px 12px;
		font-size: 16px;
	}
	.gallery-nav.prev { left: 10px; }
	.gallery-nav.next { right: 10px; }
	.gallery-caption {
		padding: 12px 10px 16px;
		font-size: 1rem;
	}
}

/* Legal pages table styles */
table {
	width: 100%;
	border-collapse: collapse;
	margin: 16px 0;
}
table th {
	background: var(--panel);
	color: var(--gold-300);
	font-weight: 600;
	padding: 12px;
	text-align: left;
	border-bottom: 1px solid var(--gold-600);
}
table td {
	padding: 12px;
	border-bottom: 1px solid var(--divider);
	vertical-align: top;
	word-break: break-word;
	overflow-wrap: anywhere;
}
table tr:last-child td {
	border-bottom: none;
}
table code {
	background: var(--panel);
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 0.9em;
	color: var(--gold-200);
}

/* Mobile-friendly tables and spacing */
@media (max-width: 640px) {
	.card { padding: 14px; }
	.container { padding: 0 12px; }
	/* Make wide tables scrollable without breaking layout */
	.card table {
		display: block;
		width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.card table thead, 
	.card table tbody, 
	.card table tr, 
	.card table th, 
	.card table td {
		white-space: nowrap;
	}
}

/* Accordion styles */
.accordion {
	border: 1px solid var(--gold-600);
	border-radius: 8px;
	background: var(--panel);
	margin-bottom: 12px;
	overflow: hidden;
}
.accordion-header {
	width: 100%;
	padding: 16px 20px;
	background: transparent;
	border: none;
	color: var(--text);
	font-size: 1.1rem;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: background 0.2s ease;
}
.accordion-header:hover {
	background: var(--panel-2);
}
.accordion-header::after {
	content: '+';
	font-size: 1.5rem;
	color: var(--gold-300);
	transition: transform 0.3s ease;
}
.accordion-header.active::after {
	transform: rotate(45deg);
}
.accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease, padding 0.3s ease;
	padding: 0 20px;
}
.accordion-content.active {
	max-height: 1000px;
	padding: 0 20px 20px;
}
.accordion-content p,
.accordion-content ul,
.accordion-content ol {
	margin: 12px 0;
}

/* Quiz */
.quiz-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 10px 0 16px;
}
.quiz-fs {
	font-weight: 700;
	color: var(--gold-300);
	border: 1px solid var(--gold-600);
	border-radius: 8px;
	padding: 8px 12px;
	background: #1E140F;
}
.quiz-area {
	display: grid;
	gap: 12px;
}
.quiz-question {
	font-size: 1.05rem;
	margin: 0;
}
.quiz-options {
	display: grid;
	gap: 10px;
}
.quiz-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--gold-600);
	border-radius: 8px;
	background: #20150F;
	cursor: pointer;
}
.quiz-option input { accent-color: var(--gold-300); }
.quiz-option.correct { border-color: #49b04a; }
.quiz-option.wrong { border-color: #c04a3a; }
.quiz-actions { display: flex; gap: 10px; }
.quiz-progress { color: var(--text-2); margin: 4px 0 0; }
.quiz-result { margin-top: 8px; }

/* Modal (quiz loss) */
.modal[hidden] { display: none; }
.modal {
	position: fixed;
	inset: 0;
	z-index: 1300;
}
.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.6);
}
.modal-dialog {
	position: relative;
	max-width: 520px;
	margin: 10vh auto 0;
	background: #231710;
	border: 1px solid var(--gold-600);
	border-radius: 12px;
	padding: 18px;
	color: var(--text);
	box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal-actions { display: flex; gap: 10px; margin-top: 12px; }

/* Cookie banner */
.cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #2B1E17;
	border-top: 1px solid var(--gold-600);
	color: var(--text);
	z-index: 1200;
	transform: translateY(100%);
	transition: transform .3s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-content {
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
}
.cookie-buttons { display: flex; gap: 10px; }

/* Page animations */
.fade-in {
	opacity: 0;
	transform: translateY(8px);
	animation: fadeInUp .5s ease forwards;
}
@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) {
	.nav-links { display: none; }
	.hamburger { display: inline-flex; }
}
@media (max-width: 768px) {
	.cookie-content { flex-direction: column; align-items: flex-start; }
	.hero h1 { font-size: 32px; }
	.map-container iframe { height: 300px; }
	.hero-layout { grid-template-columns: 1fr; }
	.hero-visual { order: -1; }
	.hero-content { padding: 18px; }
}

/* Desktop enhancements for quiz */
@media (min-width: 1024px) {
	#olympus-quiz .card {
		padding: 24px;
	}
	#olympus-quiz .quiz-question {
		font-size: 1.25rem;
	}
	#olympus-quiz .quiz-option {
		padding: 14px 16px;
		font-size: 1.05rem;
	}
	#olympus-quiz .quiz-header .btn {
		padding: 14px 20px;
	}
	#olympus-quiz .quiz-fs {
		font-size: 1.05rem;
		padding: 10px 14px;
	}
}

/* Leaderboard full-width override */
#leaderboard .leaderboard-table { width: 100%; }
#leaderboard table { width: 100%; table-layout: auto; }
@media (max-width: 640px) {
	#leaderboard .card table {
		display: table;
		width: 100%;
		overflow-x: visible;
	}
	#leaderboard .card table thead,
	#leaderboard .card table tbody,
	#leaderboard .card table tr,
	#leaderboard .card table th,
	#leaderboard .card table td {
		white-space: normal;
	}
}


