﻿@CHARSET "UTF-8";

/* Allgemeines */

body {
	background-color: #FFFFFF;
	direction: ltr;
	font-size: 13px;
	line-height: 19px;
	margin: 0;
	text-align: left;
}

html {
	overflow-y: scroll;
}

html,
body {
   margin:0;
   padding:0;
   height:100%;
}


body, button, input, select, textarea {font-family: Arial, Verdana, Helvetica, sans-serif;}

a {font-size: 13px; text-decoration: none;}
a, a:visited {color: #71D000;}
a:active {color: #FF8000;}
a:hover {color: #00BC00; text-decoration: underline;}

#content a {font-weight: bold; }
#content a:hover {text-decoration: none;}

#content2 a {font-weight: bold; }
#content2 a:hover {text-decoration: none;}

img {border: 0;}
.clear {clear: both; display: block; font-size: 0; height: 0; line-height: 0; visibility: hidden;}

ul.menu, div.menu ul {list-style-type: none; margin: 0; padding: 0;}
.menu li {float: left;}

@media (min-width: 901px) {
  .wrapper {
    height: auto !important;
    height: 100%;
    min-height: 100%;
    min-width: 845px;
    position: relative;
    text-align: center;
  }

  body.contentPage #content2 .grit {
    width: 1300px;
    min-height: 400px;
    background: transparent url("images/content_background_extended.png") no-repeat top left;
  }

  body.contentPage #content .grit {
    width: 840px;
    min-height: 400px;
    background: transparent url("images/content_background.jpg") no-repeat top left;
  }
}

img.dynamic_btn, img.dynamic_img {background-position:top; background-repeat: no-repeat;}
img.over {background-position:bottom;}
img.clicked {background-position:center;}

/* Schriftgroesse */
.f16 {font-size:16pt;}
.f10 {font-size:10pt;}
.f9 {font-size:9pt; line-height: 140%; font-weight:normal;}
.f8 {font-size:8pt;}
.f7 {font-size:7pt;}
.f6 {font-size:6pt;}

/* e Schriftfarbe fuer Fehlermeldung Login/Anmeldung */
.e {color:#FF8000;}

/* Schriftfarbe fuer Inaktive Links */
.c {color:#C0C0C0;}
.c0 {color:#000000;}
.c1 {color:#71D000;}
.c2 {color:#FF8000;}
.c3 {color:#228B22;}
.c4 {color:#F2C700;}
.c5 {color:#FF0000;}

/* Dicke Schrift */
.b {font-weight:bold}

/* Dünne Schrift */
.t {font-weight:normal;}

h1, h2, h3, h4, h5, h6 {

}

h1 {margin:0;}

body.contentPage h1 {
	text-align: center;
	padding-top: 70px;
	margin-bottom: 40px;
	font-size: 26px;
}
body.contentPage #content .characteristics, body.contentPage #content p, body.contentPage #content table, body.contentPage form {
	margin: 15px 160px;
}

body.contentPage .rules {
	margin-left: 120px;
	margin-right: 160px;
}

body.contentPage ul {
	margin-top: 15px;
	margin-bottom: 15px;
}

body.contentPage .rules strong {
	color:#2A720B;
}

body.contentPage .rules ul strong {
	color:#3BAE18;
}

body.contentPage form table {
	margin: 0;
}

body.contentPage table.table_data {
	background-color: #C0C0C0;
	text-align: center;
}

body.contentPage table.table_data {
	width: 550px;
}

body.contentPage table.culture_points {
	margin: 15px 110px;
	width: 650px;
}


#tutorial_nav, body.contentPage table.tutorial_table {
	table-layout: fixed;
	background-color: #fff;
	width: 550px;
}

body.contentPage #content td li, body.contentPage #content td form {
	margin:0px;
}

body.contentPage #content td.beschreibung {
	text-align: left;
	padding-top: 50px;
}

body.contentPage table.tutorial_table td.visual {
	text-align: center;
	font-size: 11px;
	font-style: italic;
}

body.contentPage table.tutorial_table td.visual img {
	display:block;
	margin: auto;
}

#tutorial_nav td.nav_prev {
	text-align: left;
}

#tutorial_nav td.nav_next {
	text-align: right;
}


body.contentPage table.table_data th {
	background-color: #F5F5F5;
}

body.contentPage table.table_data td  {
	background-color: #fff;
}

body.contentPage table.middle {
	table-layout: fixed;
	width: 520px;
}

body.contentPage table.middle input {
	width: 80px;
}

table.middle td.yes {
	text-align: right;
}

table.middle td.no {
	text-align: left;
}

td.text, th.text {
	padding-left: 7px;
	text-align: left;
}

body.contentPage #content h2 {
	font-size: 16px;color: #71d000;line-height: 20px;
	margin: 50px 160px 10px;
}

body.contentPage #content h3 {
	margin: 15px 160px 5px;
	font-size: 14px; line-height: 18px;
}

body.contentPage #content table h3 {
	margin: 3px;
}


body.contentPage #content ul {
	margin-top: 5px;
}


#content .question {
	padding-top: 30px;
	font-style: italic;
	color: #333;
}

#content .answer {
	
}


/* Layout */

body.indexPage {background: #fff url("images/main_background_front.jpg") repeat-x top;}
body.contentPage {background: #fff url("images/main_background_content.jpg") repeat-x top;}

#header {position: absolute; margin: 0 auto;right: 0; left: 0; width: 100%;}
#header {top: 0px; z-index: 10;}



body.indexPage #header {height: 389px; 	overflow: auto; background: transparent url("images/artwork.jpg") no-repeat top center;}
body.contentPage #header {height: 200px; background: transparent none;}

#header h1 {display: none;}

#country_select {position: absolute;top: 0;left: 0;width: 100%;height: 30px;z-index: 500;}
#country_select {background: #fff url("images/country_background.jpg") repeat-x top;}

#navigation {position: absolute;top:52px;left: 50%;margin-left: -437px;width: 830px;height: 114px;z-index: 80;}
.contentPage #navigation {background: url("images/logo_background.jpg") no-repeat top left;}
#navigation .menu {}
#navigation table.menu {position: absolute; right: 25px;top: 30px;width: 500px;}
#navigation .menu td {text-align: center;}
#navigation .menu a {text-decoration: none; font-size: 14px;line-height: 20px;color: #333; text-shadow: 1px 1px 1px #fff;}
#navigation .menu a.mark {color: #a20327;}
#navigation a.home {
	width: 250px;
	height: 85px;
	position: absolute;
	left: 55px;
	top:0px;
}

#navigation .menu a {padding: 6px 10px 7px 0px;}
#navigation .menu a span {padding: 6px 0px 7px 10px;}

#navigation .menu a:hover {background: transparent url("images/nav_right.gif") no-repeat scroll bottom right;}
#navigation .menu a:hover span {background: transparent url("images/nav_left.gif") no-repeat scroll bottom left;}

.ie6 #navigation .menu a:hover, .ie7 #navigation .menu a:hover {background: transparent; }
.ie6 #navigation .menu a:hover span, .ie7 #navigation .menu a:hover span {background: transparent;}

#navigation .menu a:active {background: transparent url("images/nav_right.gif") no-repeat scroll top right;}
#navigation .menu a:active span {background: transparent url("images/nav_left.gif") no-repeat scroll top left;}


#navigationh {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);  /* replaces margin-left hack */
  width: 830px;
  height: 114px;
  z-index: 80;
}
/* Table fixes */
.tablebox .hiscores td a,
.tablebox .hiscores td a.tt,
.tablebox .hiscores td .tt {
  padding-left: 0 !important;
  background: none !important;
  display: inline !important;   /* in case a global rule makes links block-level */
}

/* Optional: unify cell spacing & alignment */
.tablebox .hiscores th,
.tablebox .hiscores td {
  padding: 6px 10px;
  text-align: left;
}

/* If a bullet/arrow is injected with :before */
.tablebox .hiscores td a::before { content: none !important; }


.contentPage #navigationh {background: url("images/logo_background.jpg") no-repeat top left;}
#navigationh .menu {}
#navigationh table.menu {position: absolute; right: 25px;top: 30px;width: 500px;}
#navigationh .menu td {text-align: center;}
#navigationh .menu a {text-decoration: none; font-size: 14px;line-height: 20px;color: #333; text-shadow: 1px 1px 1px #fff;}
#navigationh .menu a.mark {color: #a20327;}
#navigationh a.home {
	width: 250px;
	height: 85px;
	position: absolute;
	left: 55px;
	top:0px;
}

#navigationh .menu a {padding: 6px 10px 7px 0px;}
#navigationh .menu a span {padding: 6px 0px 7px 10px;}

#navigationh .menu a:hover {background: transparent url("images/nav_right.gif") no-repeat scroll bottom right;}
#navigationh .menu a:hover span {background: transparent url("images/nav_left.gif") no-repeat scroll bottom left;}

.ie6 #navigationh .menu a:hover, .ie7 #navigation .menu a:hover {background: transparent; }
.ie6 #navigationh .menu a:hover span, .ie7 #navigation .menu a:hover span {background: transparent;}

#navigationh .menu a:active {background: transparent url("images/nav_right.gif") no-repeat scroll top right;}
#navigationh .menu a:active span {background: transparent url("images/nav_left.gif") no-repeat scroll top left;}



/*   Hiscores part */

/* One-row-per-server table */
table.hiscores{border-collapse:collapse;width:100%;max-width:1100px;margin:16px 0}
table.hiscores thead th{background:#f5f7fa;color:#2b2b2b;font-weight:600;border-bottom:1px solid #dfe3eb;padding:10px 12px;text-align:left;white-space:nowrap}
table.hiscores td{border-bottom:1px solid #eef1f6;padding:10px 12px;vertical-align:middle}
table.hiscores tbody tr:hover{background:#f8fbff}

/* Tooltip (same system as winner.php) */
.tt{position:relative;display:inline-block;vertical-align:middle}
.tt .tt-box{
  position:absolute; top:50%; left:100%; transform:translateY(-50%) translateX(6px);
  background:rgba(0,0,0,.92); color:#fff; border:1px solid rgba(255,255,255,.08);
  border-radius:6px; padding:8px 10px; box-shadow:0 8px 24px rgba(0,0,0,.28);
  font-size:12px; line-height:1.35; min-width:200px; max-width:360px; z-index:5000;
  opacity:0; visibility:hidden; transition:opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.tt:hover .tt-box{opacity:1; visibility:visible; transform:translateY(-50%) translateX(0)}
.tt .tt-row{display:block}
.tt .tt-h{font-weight:600; margin-right:6px}

/* Pager */
.pager{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.pager a,.pager span{border:1px solid #dfe3eb;padding:6px 10px;border-radius:6px;text-decoration:none}
.pager a{background:#fff}
.pager a:hover{background:#f5f7fa}
.pager .current{background:#2b6cb0;color:#fff;border-color:#2b6cb0}
.pager .disabled{opacity:.5; pointer-events:none}

/* Helpers */
.tt .tt-box.tight{min-width:0; max-width:none; white-space:nowrap; padding:6px 8px; width:max-content}
.tt .tt-box.nowrap-rows{max-width:none}
.tt .tt-box.nowrap-rows .tt-row{white-space:nowrap}
.tt.tt-left .tt-box{right:100%; left:auto; margin-right:8px; transform:translateY(-50%) translateX(-6px)}
.tt.tt-left:hover .tt-box{transform:translateY(-50%) translateX(0)}
@media (prefers-reduced-motion: reduce){ .tt .tt-box, .tt:hover .tt-box{transition:none; transform:none} }

/* Rounded container that clips contents */
.tablebox{
  border:1px solid #dfe3eb;
  border-radius:10px;
  position: relative;
  overflow:visible;          /* clip header bg to the rounded corners */
  max-width:1100px;
  width:100%;
  margin:16px 0;
  box-sizing:border-box;
  padding:0;                /* no inner padding/gap */
}


/* Paint the rounded border as a non-clipping layer */
.tablebox::before{
  content: "";
  position: absolute; inset: 0;
  border: 1px solid #dfe3eb;
  border-radius: 10px;
  pointer-events: none;
}

/* Ensure tooltip can rise above */
.tt{ position: relative; }
.tt .tt-box{ z-index: 9999; }


/* Table fills the wrapper with zero spacing */
.tablebox table.hiscores{
  border-collapse:separate; /* needed to radius individual cells */
  border-spacing:0;         /* no gaps anywhere */
  width:100%;
  margin:0;
}

/* Header sits flush at the very top, corners rounded */
.tablebox thead th{
  background:#f5f7fa;
  border-bottom:1px solid #dfe3eb;
  padding:10px 12px;
  white-space:nowrap;
  background-clip:padding-box;  /* keep bg inside the radius */
}
.tablebox thead th:first-child{ border-top-left-radius:10px; }
.tablebox thead th:last-child{  border-top-right-radius:10px; }

/* Clean bottom edge of the table */
.tablebox table.hiscores tbody tr:last-child td{ border-bottom:0; }

/* Hiscores end  */




#register_now {
	position: absolute;
	left: 50%;
	top: 277px;
	margin-left: -151px;
	color: #574b2e;
	height: 50px;
	width: 145px;
	color: #574b2e;
	font-weight: bold;
	z-index: 250;
}

#register_now a {
	margin-top: 7px;
	color: #574b2e;
	font-size: 21px;
	display: block;
}

#register_now span {
	font-size: 9px;
}


#t4play {
	position: absolute;
	left: 50%;
	top: 109px;
	margin-left: 30px;

	z-index: 250;
}

#t4play img {
	width: 460px;
	height: 290px;
}



#content {position: relative;z-index: 50;}

#content2 {position: relative;z-index: 50;}

body.indexPage #content {padding-top: 367px;padding-bottom: 120px;}
body.contentPage #content {padding-top: 177px;padding-bottom: 160px;}

body.indexPage #content2 {padding-top: 367px;padding-bottom: 120px;}
body.contentPage #content2 {padding-top: 177px;padding-bottom: 160px;}

#content .grit {position: relative;margin: 0 auto;}
#content2 .grit {position: relative;margin: 0 auto;}

body.indexPage #content .grit {width: 830px; background: transparent none;}
body.contentPage #content .grit {width: 840px; min-height: 400px; background: transparent url("images/content_background.jpg") no-repeat top left; }

body.indexPage #content2 .grit {width: 830px; background: transparent none;}
body.contentPage #content2 .grit {width: 1300px; min-height: 400px; background: transparent url("images/content_background_extended.png") no-repeat top left; }

.grit .infobox {
	float: left;
	margin-right: 9px;
	margin-left:15px;
	min-height: 391px;
	width: 378px;
	background: transparent url("images/info_background.jpg") no-repeat top left;
}

.grit .infobox div {padding-left: 43px;padding-right: 30px;}

#what_is_travian {padding-top:5px;}
#what_is_travian p {margin: 0;}
#what_is_travian h2 {font-size: 18px;font-weight: normal;color: #71d000;line-height: 20px;margin-bottom: 10px; text-shadow: 0px 2px 1px #fff;}
#what_is_travian .play_now {margin: 10px 0;}

#player_counter {position: relative; padding: 0;left: 23px;height: 98px;width: 330px;background: transparent url("images/count_background.jpg") no-repeat top left;}
#player_counter table {position: absolute;left: 135px;top: 20px;width: 165px;border-spacing: 0;}
#player_counter table th {font-weight: normal;}
#player_counter table td {font-weight: bold;}

#about_the_game {}
#about_the_game h2 {font-size: 15px; line-height: 20px; margin-bottom: 5px;}
#about_the_game ul {margin: 0; padding: 0; margin-top: 5px; margin-left: 15px;}
#about_the_game li {line-height: 19px;}


#news_from_forum h2 {font-size: 15px; line-height: 20px; margin-bottom: 5px; cursor: pointer;}
#news_from_forum ul {margin: 0; padding: 0; margin-top: 5px; list-style: none; border-top: 1px solid #999; margin-right:10px;}
#news_from_forum li {line-height: 19px; border-bottom: 1px solid #999; padding: 3px 5px;}
#news_from_forum li a {font-weight: normal;}


.hide {display:none;}

.grit .secondarybox {
	float: left;
	margin-top: 22px;
	background: transparent url("images/news_background.jpg") repeat-y top left;
	width: 397px;
}


.grit #screenshots {
	position: relative;
	height: 134px;
	width: 397px;
	background: transparent url("images/screenshots_background.jpg") no-repeat top left;
}

.grit #screenshots .prev img {
	display: none;
}

#screenshots h2 {
	margin:0px;
	padding:23px 20px 0;
	color: #fff;
	font-size:13px;
}

#screenshots_preview {
	height: 73px;
	width: 294px;
	position: absolute;
	overflow: hidden;
	margin: 7px 53px;
	padding: 0;
}

#screenshot_list {
	list-style: none;
	height: 73px;
	padding: 0;
	margin: 0;
}

#screenshots .navi img {
	position:absolute;
	width: 26px;
	height: 26px;
	top: 70px;
}

#screenshots .next img {
	right:7px;
	background-image: url("images/buttons_screenshots_next.gif");
}
#screenshots .prev img {
	left: 10px;
	background-image: url("images/buttons_screenshots_prev.gif");
}


#screenshot_list li {float:left;}
#screenshot_list img {
	width: 98px;
	height: 73px;
}




#newsbox {
	padding-bottom: 25px;
	background: transparent url("images/news_footer.jpg") no-repeat bottom left;
}

#newsbox h2 {
	display: block;
	padding: 7px 15px 0px;
	height: 30px;
	margin: 0px;

	font-size: 17px;
	color: #4c4c4c;
	background: transparent url("images/news_header.jpg") no-repeat top left;
	
}

#newsbox .news {
	width: 397px;
	padding-bottom: 0px;
	padding-left: 15px;
	background: transparent url("images/news_spacer.jpg") no-repeat bottom left;
}

#newsbox .news h4 {
	margin:0;
	margin-top: 3px;
}
#newsbox .news p.date {
	font-size: 11px;
	color: #999;
	padding-bottom: 0;
}

#newsbox .news p {
	margin: 0;
	padding-bottom: 10px;
	padding-right: 30px;
}



/* ========================
   FOOTER – DESKTOP (default)
   ======================== */
#footer {
  position: absolute;
  margin: 0 auto;
  right: 0;
  left: 0;
  bottom: 0;
  height: 90px;
  z-index: 80;
  background: #F1F1F1 url("images/footer_background.jpg") repeat-x top;
}

#footer .logo {
  position: absolute;
  top: 20px;
  left: 6px;
}

#footer li,
#footer a {
  color: #787878;
  font-size: 11px;
  line-height: 20px;
}

#footer .menu {
  position: absolute;
  top: 18px;
  right: 9px;
}

#footer .container {
  margin: 0 auto;
  position: relative;
  width: 840px;
}

#footer .copyright {
  direction: ltr;
  clear: left;
  position: absolute;
  right: 3px;
  top: 20px;
}

#footer ul.menu a {
  padding: 0 3px;
}


/* ========================
   FOOTER – MOBILE OVERRIDES
   ======================== */
@media (max-width: 900px) {
  #footer {
    position: relative !important;   /* no absolute pinning */
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 12px 0 !important;
    background: #F1F1F1 url("images/footer_background.jpg") repeat-x top !important;
    text-align: center !important;
  }

  #footer .container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  #footer .menu {
    position: static !important;
    list-style: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #footer .menu li {
    margin: 0 !important;
    white-space: nowrap !important;
  }

  #footer .copyright {
    position: static !important;
    display: block !important;
    margin-top: 8px !important;
    text-align: center !important;
    font-size: 11px !important;
    white-space: normal !important;
  }
}




.overlay {position: absolute;top:0px;left:0px;right: 0px;bottom: 0px;z-index: 400;}

.overlay .mask {
	position: fixed;
	background-color: #000;
	opacity: 0.25;
	filter:alpha(opacity=25);
	
	width: 100%;height: 100%;
}

.overlay_content {
	position: absolute;
	top: 150px;
	right: 50%;
	z-index: 600;
}

.overlay_content .closer img {
	position: absolute;
	right: 15px;
	top: 15px;
	background-image: url("images/popup_close.gif");
	height: 25px;
	width: 25px;
}

.overlay_content .footer {
	clear:both;
	height: 10px;
}

.overlay_content h2, .overlay_content h4 {
	margin:0px;
	padding: 20px 20px 0;
	font-size: 16px;
	line-height: 20px;
}

#screenshot_layer {display: none;}
#screenshot_layer h3 {display:none;}
#screenshot_layer .overlay_content {
	width: 644px;
	margin-right: -322px;
	background: #fff url("images/screenshot_background.gif") repeat-y top left;
	text-align: center;
}
#screenshot_layer #frame_box {margin: 0 20px;}
#screenshot_layer h4 {text-align: center  ;background: transparent url("images/screenshot_header.jpg") no-repeat top left; padding-bottom:15px;}
#screenshot_layer #screen_desc {
	margin: 20px 0;
	font-size: 12px;
	padding: 0 40px;
}

.screenshot_view img {
	border: 1px solid #ccc;
}

#screenshot_nr1 {
	
}

#screenshot_layer .footer {background: transparent url("images/screenshot_footer.gif") no-repeat bottom left;}

#screenshot_layer .navi img {
	position:absolute;
	width: 25px;
	height: 25px;
	top: 250px;
}

#screenshot_layer .next img {
	right:20px;
	background-image: url("images/popup_next.gif");
}
#screenshot_layer .prev img {
	left: 20px;
	background-image: url("images/popup_prev.gif");
}


#iframe_layer {display: none;}
#iframe_layer .overlay_content {
	width: 450px;
	margin-right: -225px;
	background: #fff url("images/anleitung_background.gif") repeat-y top left;
}
#iframe_layer #frame_box {margin: 0 20px;}
#iframe_layer h2 {background: transparent url("images/anleitung_header.gif") no-repeat top left; padding-bottom:15px;}
#iframe_layer .footer {background: transparent url("images/anleitung_footer.gif") no-repeat bottom left;}




#login_layer, #signup_layer {display: none;}
#login_layer .overlay_content, #signup_layer .overlay_content {
	width: 384px;
	margin-right: -192px;
	background: #fff url("images/gameworld_background.jpg") repeat-y top left;
}
#login_layer h2, #signup_layer h2 {
	color: #71d000;
	background: transparent url("images/gameworld_header.jpg") no-repeat top left;
}
#login_layer .footer, #signup_layer .footer {
	background: transparent url("images/gameworld_footer.jpg") no-repeat bottom left;
}


ul.world_list {
	padding: 7px;
	margin: 0px;
	list-style: none;
}

.world_list li {float: left;position:relative; margin: 4px 5px; background-repeat: no-repeat;}
.world_list li div {position: absolute;}
.world_list li img {position: absolute; z-index: 30;}

.world_list .w_small .players {top: 5px; left: 123px;}
.world_list .w_small .online {top: 22px; left: 123px;}
.world_list .w_big .players {top: 15px;right: 20px;}
.world_list .w_big .online {top: 33px;right: 20px;}
.world_list .label_players {top: 15px;left: 235px;}
.world_list .label_online {top: 33px;left: 235px;}

.world_list li.w_big {height: 64px;width: 361px;}
.world_list li.w_small {height: 46px;width: 175px;}

.world_list .w_big img {height: 64px;width: 361px;}

.world_list .w_small img {height: 46px;width: 175px;}

.world_list .worldstart {top: 10px;right: 20px;}
.world_list .timer {bottom: 15px;right: 20px;}



@media (max-width: 1024px) {

  /* let wrappers shrink */
  .wrapper,
  #content .grit,
  #content2 .grit {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  

  /* FOOTER */
  #footer {
    position: relative !important;
    bottom: auto !important;
    left: 0;
    right: 0;
    width: 100% !important;
    min-height: 90px;
    padding: 10px 0;
    background: #F1F1F1 url("images/footer_background.jpg") repeat-x top !important;
    text-align: center;
  }

  #footer .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 12px !important;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  #footer .menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  #footer .copyright {
    margin-top: 6px;
    text-align: center;
    font-size: 11px;
    white-space: normal;
  }

  /* BACKGROUND IMAGE FIX */
  body.contentPage #content2 .grit {
    background-size: contain !important;   /* always show full 1300px image */
    background-repeat: no-repeat !important;
    background-position: top center !important;
  }

  .tablebox {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .tablebox table.hiscores {
    width: 100% !important;
    table-layout: fixed !important;  /* evenly divide width */
  }

  .tablebox table.hiscores th,
  .tablebox table.hiscores td {
    white-space: normal !important;   /* allow wrapping */
    word-break: break-word !important;
    font-size: 11px !important;
    padding: 4px 3px !important;
    text-align: center;               /* keep tidy */
  }

  /* shorten certain headers with line breaks */
  .tablebox th:nth-child(4)::after { content:""; display:block; } /* Winner (WW 100) */
  .tablebox th:nth-child(6)::after { content:""; display:block; } /* Largest population */
  .tablebox th:nth-child(7)::after { content:""; display:block; } /* Best Attacker */
  .tablebox th:nth-child(8)::after { content:""; display:block; } /* Best Defender */
  .tablebox th:nth-child(9)::after { content:""; display:block; } /* Best Hero */

}



/* === HISCORES: force table to fit the panel === */
#content2 .grit .tablebox{
  width: 100% !important;
  max-width: 100% !important;     /* ignore the old 1100px cap */
}

#content2 .grit .tablebox table.hiscores{
  width: 100% !important;          /* fill the panel */
  table-layout: fixed !important;  /* equalize columns, prevent overflow */
}

#content2 .grit .tablebox th,
#content2 .grit .tablebox td{
  white-space: normal !important;  /* allow wrapping */
  word-break: break-word !important;
}

/* Slightly tighter on narrower screens only */
@media (max-width: 1024px){
  #content2 .grit .tablebox th,
  #content2 .grit .tablebox td{
    padding: 6px 4px !important;
    font-size: 12px !important;
  }
}

@media (min-width: 901px){
	  #fpc{
    max-width: 1200px !important;   /* 1300 - 40 - 40 */
    margin: 0 auto !important;      /* center inside the panel */
    padding: 0 40px !important;     /* even left/right padding */
    box-sizing: border-box;
  }
  #content2 .grit #fpc{
    padding: 0 50px 10px 50px !important; /* was 100px left only */
  }
  #content2 .grit .tablebox{
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;      /* center it */
  }
}

/* --- MOBILE FOOTER: align right (no viewport meta) --- */
@media (max-width: 1280px){
  #footer .container{
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 24px !important;        /* a little breathing room on the right */
	padding-left: 350px !important;
    box-sizing: border-box !important;
  }

  /* links row — sit on the right */
  #footer .menu{
    position: static !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;   /* <- right aligned */
    margin: 0 !important;
    padding: 6px !important;
  }

  /* copyright — next line, right aligned too */
  #footer .menu li.copyright{
    position: static !important;
    flex-basis: 100% !important;
    text-align: right !important;
    margin-top: 3px !important;
	padding-right: 5px !important;
    white-space: normal !important;
  }
}

/* --- MOBILE: render tooltips inline so they can't be clipped --- */
@media (max-width: 900px){
  /* let table rows grow to make room */
  table.hiscores td { vertical-align: top !important; }

  /* keep containers permissive just in case */
  #content2, #content2 .grit, .tablebox { overflow: visible !important; }

  /* show tooltip as a block under its trigger */
  .tt { position: static !important; } /* no positioned ancestor needed */
  .tt .tt-box{
    position: static !important;     /* no absolute positioning */
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;

    display: none;                   /* hidden by default */
    margin-top: 6px !important;      /* little gap under the trigger */
    max-width: 100% !important;      /* fit the cell */
    white-space: normal !important;  /* wrap text */
    z-index: 1 !important;           /* no special stacking needed */
    opacity: 1 !important;           /* disable fade trick on mobile */
    visibility: visible !important;
  }
  .tt:hover .tt-box,
  .tt:active .tt-box,
  .tt:focus-within .tt-box{
    display: block !important;       /* show on hover/tap/focus */
  }
}

@media (max-width: 768px) {
  /* Make tooltips narrower and keep inside viewport */
  .tt .tt-box { max-width: 85vw; }

  /* Flip tooltips to the LEFT for these right-side columns so they don't run off-screen */
  .hiscores td:nth-child(6) a.tt .tt-box,  /* Largest population */
  .hiscores td:nth-child(7) a.tt .tt-box,  /* Best Attacker   */
  .hiscores td:nth-child(8) a.tt .tt-box,  /* Best Defender   */
  .hiscores td:nth-child(9) a.tt .tt-box { /* Best Hero       */
    left: auto;
    right: 0;              /* right-align to trigger → content opens to the left */
  }
}
@media (min-width: 769px) {
  .hiscores td:nth-child(6) a.tt .tt-box,
  .hiscores td:nth-child(7) a.tt .tt-box,
  .hiscores td:nth-child(8) a.tt .tt-box,
  .hiscores td:nth-child(9) a.tt .tt-box {
    left: auto;
    right: 0;
  }
}

.tablebox .hiscores td a { padding-left: 0 !important; background: none !important; }

/* Tooltip base */
.tablebox .hiscores a.tt { position: relative; }
.tablebox .hiscores a.tt .tt-box {
  position: absolute;
  z-index: 9999;
  left: 0;
  top: 100%;
  margin-top: 6px;
  min-width: 160px;
  max-width: 85vw;
  padding: 6px 8px;
  background: #111;
  color: #fff !important;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  white-space: normal;
  line-height: 1.3;
  font-size: 13px;
  display: none;                     /* hidden by default */
}

/* FORCE content to render (theme sometimes hides spans) */
.tablebox .hiscores a.tt .tt-box,
.tablebox .hiscores a.tt .tt-box .tt-row { display: block !important; }
.tablebox .hiscores a.tt .tt-box .tt-h { font-weight: 600; display: inline !important; }

/* Prevent clipping by containers */
.tablebox, .tablebox .hiscores, .tablebox .hiscores tr, .tablebox .hiscores td { overflow: visible !important; }

/* On narrow screens, open right-side columns to the LEFT */
@media (max-width: 900px) {
  .tablebox .hiscores td:nth-child(6) a.tt .tt-box,
  .tablebox .hiscores td:nth-child(7) a.tt .tt-box,
  .tablebox .hiscores td:nth-child(8) a.tt .tt-box,
  .tablebox .hiscores td:nth-child(9) a.tt .tt-box {
    left: auto;
    right: 0;
  }
}

/* SHOW tooltips (hover on desktop, .open on mobile) */
.tablebox .hiscores a.tt:hover .tt-box,
.tablebox .hiscores a.tt.open .tt-box {
  display: inline-block !important;   /* shrink-wrap */
}

/* Keep multi-row tooltips with a comfortable min width */
.tablebox .hiscores a.tt .tt-box {
  /* remove any global 'display:block !important' on the container */
  display: none;                      /* hidden by default */
  min-width: 160px;                   /* for multi-row boxes */
  max-width: 85vw;
}

/* TIGHT one-liners (your date/time tooltips use class="tt-box tight") */
.tablebox .hiscores a.tt .tt-box.tight {
  min-width: 0 !important;            /* drop the floor */
  width: max-content;                 /* shrink to content */
  white-space: nowrap;                /* keep on one line */
  padding: 4px 6px;                   /* tighter padding */
}

/* Rows inside the tooltip can stay block-level; that's fine */
.tablebox .hiscores a.tt .tt-box .tt-row { display: block !important; }