/* Realmfall Tactics - Medieval Theme
 * Orta çağ teması için düzenlenmiş CSS
 * qmt.css yerine kullanılabilir veya qmt.css içeriğinin en altına eklenebilir.
 */

:root
{
	--bg-dark: #120b06;
	--bg-brown: #24150c;
	--wood-dark: #2b190d;
	--wood: #3b2513;
	--wood-light: #5c3a1f;
	--gold: #d8aa4f;
	--gold-light: #f2d487;
	--parchment: #ead7ac;
	--parchment-dark: #caa86a;
	--ink: #261409;
	--red-dark: #5a1510;
	--red: #8c2f21;
	--green: #2f5328;
	--blue-steel: #35495f;
	--border: #9b743d;
	--text: #f3e4c1;
	--muted: #c8a86e;
}

/* Sayfa iskeleti */
html
{
	color: var(--text);
	background:
		radial-gradient(circle at 25% 0%, rgba(216, 170, 79, 0.15), transparent 32%),
		radial-gradient(circle at 90% 10%, rgba(140, 47, 33, 0.18), transparent 30%),
		linear-gradient(135deg, rgba(255,255,255,0.025) 25%, transparent 25%) 0 0 / 18px 18px,
		linear-gradient(45deg, #24150c, #120b06 65%, #090604);
	font-size: medium;
	margin-left: 0;
	margin-right: 0;
	margin-top: 0;
	margin-bottom: 0;
	min-height: 100%;
}

body
{
	margin: 0;
	color: var(--text);
	font-family: Georgia, "Times New Roman", serif;
	line-height: 1.45;
}

/* Ana içerik - eski sol menü genişliği korunuyor */
#content
{
	margin-left: 164px;
	padding: 14px 18px;
	min-height: 100vh;
	box-sizing: border-box;
}

/* Sol menü */
#sidebar
{
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 164px;
	overflow: auto;
	background:
		linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.35)),
		linear-gradient(180deg, #442914, #1b1009);
	border-right: 3px solid var(--border);
	box-shadow: 8px 0 24px rgba(0,0,0,0.45);
	box-sizing: border-box;
}

body > #sidebar
{
	position: fixed;
}

/* Bağlantılar */
a
{
	text-decoration: none;
	color: var(--gold-light);
	font-weight: bold;
}

a:hover
{
	color: #fff5c5;
	text-decoration: none;
	background: rgba(216, 170, 79, 0.18);
	text-shadow: 0 0 8px rgba(216, 170, 79, 0.45);
}

/* Genel tablo davranışı */
table, caption
{
	margin-left: auto;
	margin-right: auto;
}

table
{
	border-collapse: separate;
	border-spacing: 0;
	color: var(--text);
}

td
{
	text-align: left;
	font-size: medium;
}

th
{
	text-align: center;
	font-size: medium;
}

/* Rehber sayfaları */
.guide
{
	text-align: left;
	margin-left: 8%;
	margin-right: 8%;
	color: var(--ink);
	background:
		linear-gradient(135deg, rgba(255,255,255,0.20), transparent 35%),
		linear-gradient(180deg, var(--parchment), #d4b673);
	border: 2px solid #8b6533;
	border-radius: 12px;
	padding: 16px 20px;
	box-shadow:
		0 0 0 1px rgba(0,0,0,0.45) inset,
		0 8px 24px rgba(0,0,0,0.42);
}

.guide dt
{
	font-weight: bold;
	color: var(--red-dark);
	margin-top: 8px;
}

/* Rehber içindekiler tablosu */
.guidetoc td
{
	color: var(--text);
	text-align: center;
	background-color: rgba(61, 37, 19, 0.85);
	border-bottom: 1px solid rgba(216,170,79,0.25);
}

.guidetoc th
{
	color: #fff0bd;
	background:
		linear-gradient(#7d542b, #3c2312);
	border-top: 1px solid #c69b55;
	border-bottom: 1px solid #160b05;
	text-shadow: 0 1px 1px #000;
}

/* Menü */
.menu ul
{
	margin: 0;
	padding: 0;
	list-style: none;
}

.menu li
{
	color: #fff0bd;
	text-align: center;
	background:
		linear-gradient(#75502b, #3a2312 58%, #211109);
	font-weight: bold;
	border-bottom: 1px solid rgba(0,0,0,0.65);
	border-top: 1px solid rgba(255,255,255,0.08);
	padding: 4px 3px;
	text-shadow: 0 1px 1px #000;
}

.menu li li
{
	color: var(--text);
	text-align: center;
	background:
		linear-gradient(#342112, #21150c);
	font-weight: normal;
	padding: 3px 2px;
}

.menu li li:hover
{
	background:
		linear-gradient(#5a381e, #2a190d);
}

/* Menü içindeki linkler */
.menu a
{
	display: block;
	color: var(--gold-light);
	padding: 4px 3px;
	border-radius: 4px;
}

.menu a:hover
{
	color: #fff9d8;
	background: rgba(216, 170, 79, 0.16);
}

/* Giriş / işlem tabloları */
.inputtable
{
	background:
		linear-gradient(180deg, rgba(255,255,255,0.045), rgba(0,0,0,0.16)),
		linear-gradient(135deg, var(--wood), var(--wood-dark));
	border: 2px solid var(--border);
	box-shadow:
		0 0 0 1px rgba(0,0,0,0.65) inset,
		0 8px 20px rgba(0,0,0,0.45);
}

.inputtable td
{
	font-size: medium;
	color: var(--text);
	background-color: rgba(234, 215, 172, 0.045);
	padding: 7px 9px;
	border-bottom: 1px solid rgba(216,170,79,0.15);
}

.inputtable th
{
	font-size: medium;
	color: #fff0bd;
	background:
		linear-gradient(#7d542b, #3c2312);
	padding: 8px 10px;
	border-top: 1px solid #c69b55;
	border-bottom: 1px solid #150c06;
	text-shadow: 0 1px 1px #000;
}

/* Skor tabloları */
.scorestable
{
	background:
		linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.12)),
		linear-gradient(135deg, #321f11, #1d1109);
	border: 2px solid var(--border);
	box-shadow:
		0 0 0 1px rgba(0,0,0,0.65) inset,
		0 8px 20px rgba(0,0,0,0.45);
}

.scorestable th
{
	color: #fff0bd;
	font-size: medium;
	padding: 0.25em 0.65em;
	background:
		linear-gradient(#77502a, #3a2312);
	border-bottom: 1px solid rgba(0,0,0,0.7);
	text-shadow: 0 1px 1px #000;
}

.scorestable td
{
	color: var(--text);
	font-size: small;
	padding: 0.18em 0.65em;
	border-bottom: 1px solid rgba(216,170,79,0.12);
}

.scorestable tr:nth-child(even) td
{
	background-color: rgba(234,215,172,0.045);
}

.scorestable tr:nth-child(odd) td
{
	background-color: rgba(0,0,0,0.08);
}

/* İmparatorluk durumu */
.empstatus th
{
	text-align: left;
	color: #fff0bd;
}

.empstatus td
{
	text-align: right;
	color: var(--gold-light);
}

/* Oyuncu / diplomasi renkleri */
.mnormal { color: var(--text); }
.mdisabled { color: #d6c75c; }
.mself { color: #8fd8ff; }
.mclan { color: #b4d0ef; }
.mally { color: #8fb4ff; }
.mwar { color: #ff9c3d; }
.mprotected { color: #a8e6a1; }
.mdead { color: #ff6d5d; }
.madmin { color: #ff9fff; }

/* Durum renkleri */
.cgood { color: #90e06f; }
.cwarn { color: #f3d35b; }
.cbad { color: #ff6d5d; }
.cneutral { color: var(--text); }

/* Çağ başlıkları */
.era1
{
	color: #fff0bd;
	background:
		linear-gradient(#4f6984, #273749);
	font-size: large;
	font-weight: bold;
	text-shadow: 0 1px 1px #000;
}

.era2
{
	color: #fff0bd;
	background:
		linear-gradient(#874134, #461712);
	font-size: large;
	font-weight: bold;
	text-shadow: 0 1px 1px #000;
}

.era3
{
	color: #fff0bd;
	background:
		linear-gradient(#50713c, #20361b);
	font-size: large;
	font-weight: bold;
	text-shadow: 0 1px 1px #000;
}

.era0
{
	color: #fff0bd;
	background:
		linear-gradient(#7a522c, #3c2312);
	font-size: large;
	font-weight: bold;
	text-shadow: 0 1px 1px #000;
}

/* Hizalama yardımcıları */
.al { text-align: left; }
.ac { text-align: center; }
.ar { text-align: right; }

/* Form alanları */
input,
select,
textarea
{
	color: var(--ink);
	background:
		linear-gradient(#f2e0b8, #d1b16e);
	border: 1px solid #7d5529;
	border-radius: 6px;
	padding: 4px 6px;
	font-family: Georgia, "Times New Roman", serif;
	box-shadow:
		0 1px 0 rgba(255,255,255,0.45) inset,
		0 2px 6px rgba(0,0,0,0.25);
}

input:focus,
select:focus,
textarea:focus
{
	outline: 2px solid rgba(216, 170, 79, 0.55);
	box-shadow:
		0 0 0 3px rgba(216,170,79,0.18),
		0 2px 8px rgba(0,0,0,0.32);
}

/* Butonlar */
input[type="submit"],
input[type="button"],
input[type="reset"],
button
{
	cursor: pointer;
	color: #fff2bd;
	font-weight: bold;
	background:
		linear-gradient(#9c6830, #5a3318 55%, #30180c);
	border: 1px solid #d1a45b;
	border-bottom-color: #1c0e07;
	border-radius: 7px;
	padding: 5px 11px;
	text-shadow: 0 1px 1px #000;
	box-shadow:
		0 1px 0 rgba(255,255,255,0.25) inset,
		0 3px 0 #1d1008,
		0 5px 10px rgba(0,0,0,0.35);
}

input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
button:hover
{
	color: #fff8d4;
	background:
		linear-gradient(#bd8540, #6d3d1d 55%, #3a1e10);
}

/* Genel uyarı gibi kullanılan metinler için */
.error,
.warning,
.alert
{
	color: #ffe3d0;
	background:
		linear-gradient(#8a2d21, #49120e);
	border: 1px solid #cf8569;
	border-radius: 8px;
	padding: 8px 10px;
}

.success,
.ok
{
	color: #e8ffd7;
	background:
		linear-gradient(#486d36, #263d1f);
	border: 1px solid #91ba73;
	border-radius: 8px;
	padding: 8px 10px;
}

/* Ayırıcı */
hr
{
	border: 0;
	height: 2px;
	background:
		linear-gradient(90deg, transparent, rgba(216,170,79,0.75), transparent);
	margin: 16px 0;
}

/* Küçük ekran düzeltmesi */
@media (max-width: 760px)
{
	#sidebar
	{
		position: relative;
		width: 100%;
		height: auto;
		border-right: 0;
		border-bottom: 3px solid var(--border);
	}

	body > #sidebar
	{
		position: relative;
	}

	#content
	{
		margin-left: 0;
		padding: 10px;
	}

	.guide
	{
		margin-left: 2%;
		margin-right: 2%;
	}

	table
	{
		max-width: 100%;
	}
}

.warcenter-page {
	position: relative;
	background: url('../images/warcenter_bg.png') center center / cover no-repeat;
	border: 2px solid #9b743d;
	border-radius: 10px;
	padding: 16px;
	overflow: hidden;
	box-shadow: 0 8px 22px rgba(0,0,0,0.35);
	min-height: 520px;
}

.warcenter-page::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(22, 14, 8, 0.42);
}

.warcenter-page > * {
	position: relative;
	z-index: 1;
}

/* İçerik kutularını biraz daha okunaklı yapar */
.warcenter-page table,
.warcenter-page .inputtable,
.warcenter-page .scorestable,
.warcenter-page .guide {
	background-color: rgba(35, 22, 12, 0.72);
	backdrop-filter: blur(1px);
}

/* Başlık biraz daha belirgin olsun */
.warcenter-page h2,
.warcenter-page h3 {
	text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* ============================================================
   Realmfall Tactics - Page Background Panels + Readability Fix
   Add this to the end of css/qmt.css
   ============================================================ */

.doctrine-page,
.market-page,
.construction-page,
.agriculture-page,
.alliance-page,
.bank-page {
	position: relative;
	border: 2px solid #9b743d;
	border-radius: 10px;
	padding: 16px;
	overflow: hidden;
	box-shadow: 0 8px 22px rgba(0,0,0,0.35);
	min-height: 520px;
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	color: #f3ddb0;
	text-shadow: 0 1px 3px rgba(0,0,0,0.75);
}

.doctrine-page {
	background-image: url('../images/doctrine_bg.png');
}

.market-page {
	background-image: url('../images/market_bg.png');
}

.construction-page {
	background-image: url('../images/construction_bg.png');
}

.agriculture-page {
	background-image: url('../images/agriculture_bg.png');
}

.alliance-page {
	background-image: url('../images/alliance_bg.png');
}

.bank-page {
	background-image: url('../images/bank_bg.png');
}

.doctrine-page::before,
.market-page::before,
.construction-page::before,
.agriculture-page::before,
.alliance-page::before,
.bank-page::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(22, 14, 8, 0.40);
}

/* Slightly stronger overlay for bright images */
.construction-page::before,
.agriculture-page::before,
.bank-page::before,
.alliance-page::before {
	background: rgba(22, 14, 8, 0.44);
}

.doctrine-page > *,
.market-page > *,
.construction-page > *,
.agriculture-page > *,
.alliance-page > *,
.bank-page > * {
	position: relative;
	z-index: 1;
}

.doctrine-page table,
.market-page table,
.construction-page table,
.agriculture-page table,
.alliance-page table,
.bank-page table,
.doctrine-page .inputtable,
.market-page .inputtable,
.construction-page .inputtable,
.agriculture-page .inputtable,
.alliance-page .inputtable,
.bank-page .inputtable,
.doctrine-page .scorestable,
.market-page .scorestable,
.construction-page .scorestable,
.agriculture-page .scorestable,
.alliance-page .scorestable,
.bank-page .scorestable {
	background-color: rgba(35, 22, 12, 0.78);
	backdrop-filter: blur(1px);
}

.doctrine-page h2,
.doctrine-page h3,
.market-page h2,
.market-page h3,
.construction-page h2,
.construction-page h3,
.agriculture-page h2,
.agriculture-page h3,
.alliance-page h2,
.alliance-page h3,
.bank-page h2,
.bank-page h3 {
	text-shadow: 0 2px 4px rgba(0,0,0,0.75);
}

/* Readability panel for page intro/explanation text */
.page-intro {
	display: block;
	width: fit-content;
	max-width: 92%;
	margin: 0 auto 16px auto;
	padding: 10px 16px;
	background: rgba(25, 14, 8, 0.70);
	border: 1px solid rgba(180, 130, 60, 0.72);
	border-radius: 8px;
	color: #f4ddb0;
	font-weight: bold;
	line-height: 1.5;
	text-align: center;
	text-shadow: 0 2px 4px rgba(0,0,0,0.95);
	box-shadow: 0 4px 12px rgba(0,0,0,0.40);
	position: relative;
	z-index: 2;
}

/* Make small hint text readable over image backgrounds */
.doctrine-page p,
.market-page p,
.construction-page p,
.agriculture-page p,
.alliance-page p,
.bank-page p {
	text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

/* ============================================================
   Realmfall Tactics - Dominion Status / Player Stats background
   Add this to the end of css/qmt.css
   ============================================================ */

.status-page {
	position: relative;
	border: 2px solid #9b743d;
	border-radius: 10px;
	padding: 16px;
	overflow: hidden;
	box-shadow: 0 8px 22px rgba(0,0,0,0.35);
	min-height: 520px;
	background: url('../images/status_bg.png') center center / cover no-repeat;
	color: #f3ddb0;
	text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.status-page::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(22, 14, 8, 0.46);
}

.status-page > * {
	position: relative;
	z-index: 1;
}

.status-page p,
.status-page h3 {
	text-shadow: 0 2px 4px rgba(0,0,0,0.95);
}

.status-page .scorestable,
.status-page table.scorestable {
	background-color: rgba(35, 22, 12, 0.80);
	backdrop-filter: blur(1px);
}

.status-page .madmin,
.status-page .mdisabled,
.status-page .mdead,
.status-page .cneutral,
.status-page .cwarn {
	background: rgba(25, 14, 8, 0.70);
	border: 1px solid rgba(180, 130, 60, 0.72);
	border-radius: 8px;
	padding: 10px 14px;
	margin: 10px auto;
	max-width: 92%;
	text-align: center;
	box-shadow: 0 4px 12px rgba(0,0,0,0.40);
}

/* ============================================================
   Realmfall Tactics - Account Settings Layout
   ============================================================ */

.account-settings-page {
	max-width: 1180px;
	margin: 0 auto 28px auto;
	padding: 0 18px;
	box-sizing: border-box;
}

.account-settings-page h2 {
	text-align: center;
	margin: 18px 0 24px 0;
	color: #fff0bd;
	text-shadow: 0 2px 5px rgba(0,0,0,0.75);
}

.account-settings-grid {
	display: grid;
	grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
	gap: 34px;
	align-items: start;
}

.account-settings-column {
	display: flex;
	flex-direction: column;
	gap: 20px;
	align-items: stretch;
}

.account-card-form {
	margin: 0;
	padding: 0;
}

.account-card {
	width: 100%;
	margin: 0;
	border-radius: 8px;
	overflow: hidden;
}

.account-card th {
	padding: 9px 12px;
}

.account-card td {
	padding: 9px 12px;
	vertical-align: middle;
}

.account-card td:first-child {
	white-space: nowrap;
	font-weight: bold;
}

.account-card input[type="text"],
.account-card input[type="password"],
.account-card select {
	min-width: 170px;
	box-sizing: border-box;
}

.account-card input[type="submit"] {
	min-width: 160px;
}

.account-card-note {
	white-space: normal !important;
	text-align: center;
	font-size: small;
	line-height: 1.45;
	color: #f3ddb0;
}

@media (max-width: 980px) {
	.account-settings-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.account-settings-page {
		padding: 0 10px;
	}

	.account-card td:first-child {
		white-space: normal;
	}
}

/* ============================================================
   Realmfall Guide readability patch
   Rehber sayfalarında çeviri + okunabilirlik iyileştirmesi
   ============================================================ */

.guide {
    max-width: 1380px;
    margin: 10px auto 18px auto;
    color: #241308;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08) 32%, transparent 55%),
        linear-gradient(180deg, #ead9ad 0%, #dec795 100%);
    border: 2px solid #8d6a34;
    box-shadow:
        0 0 0 1px rgba(75,44,20,0.35) inset,
        0 10px 28px rgba(0,0,0,0.42);
}

.guide p,
.guide li,
.guide dd,
.guide td {
    color: #241308;
    line-height: 1.6;
}

.guide h2,
.guide h3 {
    color: #3c1207;
    text-shadow: none;
}

.guide a,
.guidetoc a,
.guide a:visited {
    color: #7a3a08;
    font-weight: bold;
    text-decoration: none;
}

.guide a:hover,
.guidetoc a:hover {
    color: #5a2200;
    text-decoration: underline;
}

.guide dt {
    color: #5a1908;
    font-weight: bold;
}

.guidetoc {
    margin-top: 10px;
}

.guidetoc td {
    background-color: rgba(74, 42, 19, 0.92);
}

.guidetoc td a,
.guidetoc td a:visited {
    color: #ffe6ad;
}

.guidetoc caption {
    color: #3d1706;
    font-weight: bold;
    padding-bottom: 8px;
}

/* ============================================================
   Realmfall Tactics - Graveyard Page Background
   ============================================================ */

.graveyard-page {
	position: relative;
	border: 2px solid #6e4a20;
	border-radius: 10px;
	padding: 18px;
	overflow: hidden;
	box-shadow: 0 8px 22px rgba(0,0,0,0.40);
	min-height: 520px;
	margin-top: 8px;
	margin-bottom: 10px;
	background: url('../images/graveyard_bg.png') center center / cover no-repeat;
	color: #f3ddb0;
	text-shadow: 0 1px 3px rgba(0,0,0,0.85);
}

/* Mezarlık sayfası diğer sayfalardan biraz daha ağır ve sisli görünür */
.graveyard-page::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to bottom,
			rgba(12, 9, 7, 0.45) 0%,
			rgba(20, 14, 10, 0.50) 38%,
			rgba(12, 8, 6, 0.62) 100%
		);
	pointer-events: none;
	z-index: 0;
}

.graveyard-page > * {
	position: relative;
	z-index: 1;
}

/* Üst açıklama metni arka plandan ayrılır */
.graveyard-page .page-intro {
	display: block;
	width: fit-content;
	max-width: 92%;
	margin: 0 auto 16px auto;
	padding: 10px 16px;
	background: rgba(22, 14, 9, 0.76);
	border: 1px solid rgba(145, 104, 50, 0.80);
	border-radius: 8px;
	color: #f4ddb0;
	font-weight: bold;
	line-height: 1.5;
	text-align: center;
	text-shadow: 0 2px 4px rgba(0,0,0,0.95);
	box-shadow: 0 4px 12px rgba(0,0,0,0.45);
}

/* Mezarlık tablosu okunabilir kalır */
.graveyard-page .scorestable,
.graveyard-page table.scorestable,
.graveyard-page .graveyard-table {
	background-color: rgba(28, 18, 12, 0.82);
	backdrop-filter: blur(1px);
	border-color: rgba(150, 106, 45, 0.85);
}

.graveyard-page .scorestable th,
.graveyard-page table.scorestable th {
	background: linear-gradient(#6d4820, #3b2311);
	color: #fff0bd;
	text-shadow: 0 1px 2px rgba(0,0,0,0.95);
	border-color: rgba(150, 106, 45, 0.85);
}

.graveyard-page .scorestable td,
.graveyard-page table.scorestable td {
	background-color: rgba(32, 22, 15, 0.64);
	color: #f1dfbd;
	text-shadow: 0 1px 2px rgba(0,0,0,0.95);
	border-color: rgba(125, 89, 42, 0.55);
}

/* Ölü hâkimiyet satırları fazla parlak görünmesin ama okunabilir kalsın */
.graveyard-page tr.mdead td {
	background-color: rgba(38, 27, 20, 0.70);
}

.graveyard-page a,
.graveyard-page a:visited {
	color: #ffe3a0;
	font-weight: bold;
}

.graveyard-page a:hover {
	color: #fff1c8;
}
