/* TedRO dark-orange theme (original). Black + orange, mobile-first. */
* { box-sizing: border-box; }
body {
	margin: 0;
	background: #0d0d0f;
	color: #e8e4dc;
	font-family: "Microsoft JhengHei", "Noto Sans TC", "PingFang TC", sans-serif;
	font-size: 14px;
	line-height: 1.6;
}
a { color: #ff9a2e; text-decoration: none; }
a:hover { color: #ffc06a; text-decoration: underline; }

/* top bar：淨 logo */
.tedro-topbar { background: #141416; border-bottom: 2px solid #ff7a00; }
.tedro-topbar-inner { max-width: 1080px; margin: 0 auto; padding: 10px 16px; text-align: center; }
.tedro-brand { font-size: 22px; font-weight: 900; letter-spacing: 2px; color: #ff7a00; }
.tedro-brand:hover { color: #ffa733; text-decoration: none; }

/* hero */
.tedro-play:hover { filter: brightness(1.08); text-decoration: none; }
.tedro-play-alt { background: linear-gradient(#3a3a42, #23232a); color: #ff9a2e !important; box-shadow: none; border: 1px solid #ff7a00; }

/* menubar：綠線位置恆常橫排（手機都唔摺疊） */
.tedro-menubar { background: #101014; border-top: 1px solid #ffffff; border-bottom: 1px solid #ffffff; }
.tedro-nav { max-width: 1080px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.tedro-burger { display: none !important; }
.tedro-tab { display: inline-block; padding: 10px 18px; color: #e8e4dc; white-space: nowrap; border-left: 1px solid #1e1e22; }
.tedro-tab:first-child { border-left: 0; }
.tedro-tab:hover { background: #1c1c20; color: #ff9a2e; text-decoration: none; }
.tedro-drop { position: relative; }
.tedro-drop-btn { display: inline-block; padding: 10px 14px; color: #e8e4dc; cursor: pointer; white-space: nowrap; border-left: 1px solid #1e1e22; }
.tedro-drop:first-child .tedro-drop-btn { border-left: 0; }
.tedro-drop:hover .tedro-drop-btn, .tedro-drop.open .tedro-drop-btn { background: #1c1c20; color: #ff9a2e; }
.tedro-drop-list { display: none; position: absolute; top: 100%; left: 0; min-width: 190px; background: #1a1a1e; border: 1px solid #ff7a00; border-radius: 0 0 8px 8px; overflow: hidden; z-index: 60; }
.tedro-drop:hover .tedro-drop-list, .tedro-drop.open .tedro-drop-list { display: block; }
.tedro-drop-list a { display: block; padding: 9px 14px; color: #e8e4dc; }
.tedro-drop-list a:hover { background: #ff7a00; color: #141416; text-decoration: none; }

/* guest 首頁 */
.tedro-guest { text-align: center; padding: 24px 8px 8px; }
.tedro-guest h2 { font-size: 26px; color: #fff; margin: 0 0 10px; }
.tedro-guest p { color: #b9b2a6; margin: 0 0 16px; }
.tedro-guest-btns { margin: 22px 0 10px !important; }
.tedro-guest-hint { font-size: 12px; color: #7d766b !important; }

/* content */
.tedro-wrap { max-width: 1080px; margin: 0 auto; padding: 18px 16px 40px; }
.tedro-loginbox { background: #1a1a1e; border: 1px solid #2e2e33; border-left: 3px solid #ff7a00; border-radius: 6px; padding: 8px 12px; margin-bottom: 14px; }
.notice, .message, .error { border-radius: 6px; padding: 10px 14px; }
.notice { background: #2a2103; border: 1px solid #8a6d00; color: #ffd75e; }
.message { background: #0f2f16; border: 1px solid #2f8c3c; color: #9fe6a8; }
.error { background: #3a1111; border: 1px solid #a33; color: #ffb3b3; }

/* generic flux tables/forms on dark bg */
table { border-collapse: collapse; }
table.general-table, table.vertical-table, table.horizontal-table { background: #16161a; border: 1px solid #2e2e33; width: 100%; }
table.general-table th, table.vertical-table th { background: #232326; color: #ff9a2e; padding: 6px 8px; text-align: left; }
table.general-table td, table.vertical-table td, table.horizontal-table td { padding: 5px 8px; border-top: 1px solid #26262b; }
/* TedRO: 物品/怪物資料庫表格字細格細 */
table.horizontal-table th, table.horizontal-table td { font-size: 11px !important; padding: 2px 4px !important; }
input[type=text], input[type=password], input[type=file], select, textarea {
	background: #101013; color: #e8e4dc; border: 1px solid #3a3a40; border-radius: 6px; padding: 8px 10px; max-width: 100%;
}
input[type=submit], input[type=button], button.btn, .button {
	background: linear-gradient(#ffa733, #ff7a00); color: #141416; border: 0; border-radius: 6px; padding: 9px 22px; font-weight: bold; cursor: pointer;
}
input[type=submit]:hover { filter: brightness(1.08); }

/* footer */
.tedro-footer { border-top: 2px solid #ff7a00; background: #141416; padding: 14px 16px; text-align: center; color: #8d877c; font-size: 12px; }
.tedro-footer-inner { max-width: 1080px; margin: 0 auto; }
.tedro-sep { margin: 0 8px; color: #3a3a40; }
.tedro-footer select { padding: 2px 6px; font-size: 12px; }

/* mobile：一樣橫排，細字多行 */
@media (max-width: 720px) {
	.tedro-nav { padding: 0 6px; }
	.tedro-drop-btn, .tedro-tab { padding: 9px 10px; font-size: 13px; border-left: 0; }
			table { display: block; overflow-x: auto; }
}
/* ---- database search form ---- */
.search-form p { margin: 0 0 10px; }
.search-form p::after { content: ""; display: block; clear: both; }
.db-field { float: left; width: 33%; padding: 6px 10px 6px 0; }
.db-field label { display: block; font-weight: bold; color: #ff9a2e; margin-bottom: 4px; }
.db-field input[type=text], .db-field select { width: 100%; }
.db-actions { clear: both; padding: 10px 0 4px; display: flex; gap: 10px; }
.db-actions input[type=submit], .db-actions input[type=button] { flex: 1; }

/* ---- mobile: search form one-field-per-row, result table keeps original style (horizontal scroll) ---- */
@media (max-width: 720px) {
	.db-field { float: none; width: auto; padding: 4px 0; }
	.db-actions input[type=submit], .db-actions input[type=button] { width: 48%; margin-right: 2%; }
}
/* hero banner：貼齊網站闊度，唔超出 */
.tedro-hero { padding: 0; border-bottom: 1px solid #2a2a2e; background: radial-gradient(ellipse at 50% 0%, #2b1503 0%, #0d0d0f 70%); }
.tedro-hero-inner { max-width: 1080px; margin: 0 auto; text-align: center; }
.tedro-banner { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; }
.tedro-tagline { margin: 0; padding: 10px 16px 12px; color: #b9b2a6; }
.tedro-play { margin: 0 4px 16px; }

/* ---- 手機版：唔好畀內容撐爆版面 ---- */
html, body { max-width: 100%; }
body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* 任何寬表：手機變可橫向滑動嘅區塊，唔會撐闊成頁 */
@media (max-width: 720px) {
	.tedro-wrap { max-width: 100%; overflow-x: hidden; }
	.tedro-wrap table,
	table.general-table,
	table.horizontal-table,
	table.vertical-table {
		display: block;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	table td, table th { word-break: break-word; }
	pre, code { overflow-x: auto; max-width: 100%; }
	.tedro-footer-inner { line-height: 2; }
}
/* 進入遊戲 圖片按鈕 */

@media (max-width: 720px) {
	}

/* 進入遊戲 純文字按鈕 */
.tedro-play-text { display: inline-block; margin: 0 auto 16px; padding: 10px 34px; font-size: 20px; font-weight: bold; color: #141416 !important; background: linear-gradient(#ffa733, #ff7a00); border-radius: 10px; box-shadow: 0 4px 18px rgba(255,122,0,.45); }
.tedro-play-text:hover { filter: brightness(1.08); text-decoration: none; color: #141416 !important; }

@media (max-width: 720px) {
	.tedro-play-text { font-size: 17px; padding: 9px 26px; }
}


/* ---- 註冊表單：手機版欄位名稱保持一行，唔好換行 ---- */
@media (max-width: 720px) {
	table.generic-form-table {
		display: block;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	table.generic-form-table th,
	table.generic-form-table th label {
		white-space: nowrap;
		word-break: keep-all;
		overflow-wrap: normal;
	}
	table.generic-form-table td {
		word-break: normal;
		overflow-wrap: normal;
	}
}

/* register-form field hints */
.generic-form-table .hint { margin-top: 6px; font-size: 12px; color: #9a938a; }
