/* ANDROID THEME - MODERNIZED */
:root {
    /* Base Colors */
    --bg-body: #0c0d0f;
    --bg-body-img: none;
    --bg-header: #161719;
    --bg-header-wrapper: #161719;
    --bg-page-content: #15171a;
    --bg-footer: #15171a;
    
    /* Text Colors */
    --text-main: #f3f4f6;       /* H1, H2, body default (sometimes) */
    --text-content: #aeb3ba;    /* Paragraphs, content */
    --text-muted: #c7ccd2;      /* H3-H6 */
    --text-link: #aeb3ba;
    --text-link-hover: #8fae2a;
    --text-inverse: #000;
    
    /* Borders & UI */
    --border-color: #26292e;
    --border-light: #34383e;
    --box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.65);
    --nav-bg: #161719;
    --nav-hover: #232629;
    --nav-active-border: #ec7a1c;
    --nav-border: #26292e;
    
    /* Forms */
    --input-bg: #FFF; /* Default input bg usually white */
    --fieldset-border: #999;
    --legend-bg: #777;
    
    /* Box Colors */
    --box-note-bg: #e15a1a;
    --box-note-border: #ec7a1c;
    --box-info-bg: #1c6fb5;
    --box-info-border: #B2B2FF;
    --box-warning-bg: #C33;
    --box-warning-border: #DB4D4D;
    --box-hint-bg: #ec7a1c;
    --box-hint-border: #fae6be;
    --box-download-bg: #7a9417;
    --box-download-border: #dce6be;
    --box-content-bg: #20242a;
    
    /* Button Colors */
    --btn-orange: #d96a1a;
    --btn-orange-hover: #ec7a1c;
    --btn-green: #7a9417;
    --btn-green-hover: #647a14;
    --btn-red: #C33;
    --btn-red-hover: #F60;
    --btn-blue: #1c6fb5;
    --btn-blue-hover: #688BB3;
    --btn-grey: #444;
    --btn-grey-hover: #888;
    
    /* Tile Colors */
    --tile-green: #7a9417;
    --tile-orange: #ec7a1c;
    --tile-red-orange: #e15a1a;
    --tile-blue: #1c6fb5;
    --tile-blue-light: #355f93;
}

html.light-theme {
    /* Base Colors - Higher Contrast Palette */
    --bg-body: #e9ecef; /* Distinct light gray background */
    --bg-body-img: none;
    --bg-header: #ffffff;
    --bg-header-wrapper: #ffffff;
    --bg-page-content: #ffffff; /* Pure white content area for contrast against gray body */
    --bg-footer: #dee2e6; /* Slightly darker gray for footer */
    
    /* Text Colors */
    --text-main: #212529; /* Almost black for sharper text */
    --text-content: #343a40; /* Dark gray for content */
    --text-muted: #6c757d; /* Muted gray */
    --text-link: #0d6efd; /* Standard bright blue link */
    --text-link-hover: #fd7e14; /* Orange hover */
    --text-inverse: #FFF;
    
    /* Borders & UI */
    --border-color: #ced4da;
    --border-light: #adb5bd;
    --box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* Stronger shadow for depth */
    --nav-bg: #f8f9fa; /* Light gray nav background */
    --nav-hover: #e9ecef;
    --nav-active-border: #fd7e14;
    --nav-border: #dee2e6;
    
    /* Forms */
    --fieldset-border: #ced4da;
    --legend-bg: #6c757d;
    
    /* Boxes */
    --box-content-bg: #f8f9fa;
    --box-content-text: #212529;

    /* Modern Touches */
    --tile-blue-light: #4A90E2;
}

/* Fix navigation icons in light mode */
html.light-theme .navItem img,
html.light-theme #arrowLeft,
html.light-theme #arrowRight,
html.light-theme .sliderImage,
html.light-theme #sl_arrowLeft,
html.light-theme #sl_arrowRight {
    filter: invert(1);
}

html {
	font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, Tahoma, Helvetica, sans-serif;
	font-size: 14px;
	color: var(--text-main);
	background-color: var(--bg-body);
    background: var(--bg-body-img);
    background-color: var(--bg-body);
}

body {
	background-color: var(--bg-body);
    background: var(--bg-body-img);
    background-color: var(--bg-body);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tile:hover {
	box-shadow: var(--box-shadow);
    -moz-box-shadow: var(--box-shadow);
    -webkit-box-shadow: var(--box-shadow);
}

/* Links */
a {
	color: var(--text-link);
	text-decoration: underline;
}
a:hover {
	color: var(--text-link-hover);
}
a:active, a:selected, a:visited, a:focus {
 	outline: none;
	border: none;
}

em { margin-right: 2px; }

/* HEADINGS */
h1 {
	font-size: 38px;
	font-weight: 300;
	margin: 20px 0 0px 0;
	color: var(--text-main);
}
h2 {
	font-size: 30px;
	font-weight: 300;
	margin: 20px 0 2px 0;
	color: var(--text-main);
}
h3 {
	font-size: 22px;
	font-weight: normal;
	margin: 20px 0 2px 0;
	color: var(--text-muted);
}
h4 {
	font-size: 20px;
	font-weight: 300;
	margin: 15px 0 2px 0;
	color: var(--text-muted);
}
h5 {
	font-size: 18px;
	font-weight: normal;
	margin: 13px 0 2px 0;
	color: var(--text-muted);
}
h6 {
	font-size: 16px;
	font-weight: normal;
	margin: 10px 0 2px 0;
	color: var(--text-muted);
}

/* CONTENT */
.display-block { display: block; }
.margin-0 { margin: 0; }
.margin-t-0 { margin-top: 0; }
.margin-b-0 { margin-bottom: 0; }
.margin-t-20 { margin-top: 20px; }
.margin-t-40 { margin-top: 40px; }
.margin-b-20 { margin-bottom: 20px; }
.margin-b-40 { margin-bottom: 40px; }

/* Fluid images */
.size-auto {
	max-width: 100%;
	height: auto;
}

/* Alignment */
.align-left { display: block; float: left; text-align: left; }
.align-right { display: block; float: right; text-align: right; }
.align-center { display: block; text-align: center; margin: auto; }

/* Text Alignment */
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-justify { text-align: justify; }

/* Text Color Helpers */
.white { color: #FFF; }
.grey { color: #333; }

/* Weight */
.weight-lighter { font-weight: lighter; }
.weight-normal { font-weight: normal; }

/* NAVIGATION */
#headerWrapper {
	padding-bottom: 0;	
	min-height: 90px;
    background-color: var(--bg-header-wrapper);
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.3s ease;
}
#header {
	position: relative;
}
#headerTitles h2 {
	margin-bottom: 10px;
}
#nav {
	position: relative;
	right: 0;
	bottom: -3px;
	border-right: 1px solid var(--border-color);
}
.navItem {
	height: 70px;
	width: 95px;
	background-color: var(--nav-bg);
	color: var(--text-main);
	font-size: 14px;
	text-align: center;	
	border: 1px solid var(--border-color);
	border-right: none;
	border-bottom: 4px solid var(--nav-active-border);
    padding-bottom: 6px;
    text-decoration: none;
    margin: 0 0 0 -3px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.navItem:hover {
    color: var(--text-main);
    background-color: var(--nav-hover);
}
.navItem img {
    margin: 10px 10px 3px 10px;
    height: 32px;
}
#nav > a.navActive {
    padding-bottom: 0px;
    border-bottom: 10px solid var(--nav-active-border);
}

/* Subnav */
#subNav a {	
	font-size: 14px;
	color: #FFF; /* Always white for readability on dark subnav backgrounds */
}
#subNav a:hover {
	color: #FFF;
    text-decoration: underline;
}
.subNavItemActive {
	padding: 3px 7px 2px 7px !important;
	border: 1px solid var(--text-main);
	border-top: none;
	box-shadow: 0px 1px 4px 1px #999;
}

/* FORMS */
fieldset {
	border: 1px solid var(--fieldset-border);
	margin: 10px 0;
	padding: 10px;
}
legend {
	background-color: var(--legend-bg);
	color: #FFF;
	font-weight: bold;
	padding: 1px 3px;
	font-size: 12px;
}
label {
	margin-left: 10px;
    color: var(--text-content);
}
textarea {
	font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, Tahoma, Helvetica, sans-serif;
	overflow: auto;
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}
input, select, textarea {
	margin: 3px 3px 3px 10px;
}
input[type=button] {
	background-color: #777;
	border: 1px solid #FFF;
	color: #FFF;
	padding: 2px 5px;
}
input[type=button]:hover {
	background-color: #999;	
}

/* BUTTONS */
.orangeButton, button {
	 border: 1px solid #FFF;
	 background-color: var(--btn-orange);
	 color: #FFF;
	 padding: 2px 5px;
	 margin: 5px 3px 3px 3px;
}
.orangeButton:hover, button:hover { background-color: var(--btn-orange-hover); cursor: pointer; }
.greenButton { background-color: var(--btn-green); }
.greenButton:hover { background-color: var(--btn-green-hover); }
.redButton { background-color: var(--btn-red); }
.redButton:hover { background-color: var(--btn-red-hover); }
.blueButton { background-color: var(--btn-blue); }
.blueButton:hover { background-color: var(--btn-blue-hover); }
.greyButton { background-color: var(--btn-grey); }
.greyButton:hover { background-color: var(--btn-grey-hover); }

/* SLIDES */
div.sliderContent {
	padding: 10px;
}
div.sliderHead h2 {
	font-size: 26px;
	display: inline;
	margin: 0;
	padding: 0;
}
div.sliderHead h2:hover {
	cursor: pointer;
	color: var(--link-hover);
}
img.sliderImage {
	height: 24px;
	width: 24px;
	vertical-align: middle;
	margin-top: -12px;
	margin-right: 10px;
}

/* MISC */
pre {
	padding: 15px;
	background-color: #444;
	color: #FFF;
	overflow-x: auto;
}
blockquote {
	padding: 10px;
	border-left: 1px solid var(--tile-green);
	font-style: italic;
	font-size: 14px;
    color: var(--text-content);
}
.highlight { background-color: #F90; }
.underlineDotted { border-bottom: 2px dotted #F60; }
.bold { font-weight: bold; }
.italic { font-style: italic; }
mark { background-color: #F90; color: #000; }
abbr, dfn { border-bottom: 1px dotted #333; }

/* HR */
hr {
	border: none;
	border-top: 1px solid #555;
	margin-bottom: 15px;
	margin-top: 2px;
}
hr.dotted { border-top: 1px dashed #666; }
hr.light { border-color: var(--border-light); }

/* Boxes */
.box-content, .box-note { margin: 15px 0; padding: 15px; text-align: justify; }
.box-info, .box-warning, .box-hint, .box-download { 
    margin: 15px 0; text-align: justify; padding: 10px 10px 10px 40px; color: #FFF; 
}
.box-note { background-color: var(--box-note-bg); border-color: var(--box-note-border); color: #FFF; }
.box-info { background: var(--box-info-bg) url(../../img/icons/box_info.png) 0 0 no-repeat; border-color: var(--box-info-border); }
.box-warning { background: var(--box-warning-bg) url(../../img/icons/box_warning.png) 0 0 no-repeat; border-color: var(--box-warning-border); }
.box-hint { background: var(--box-hint-bg) url(../../img/icons/box_hint.png) 0 0 no-repeat; border-color: var(--box-hint-border); }
.box-download { background: var(--box-download-bg) url(../../img/icons/box_download.png) 0 0 no-repeat; border-color: var(--box-download-border); }
.box-content { background: var(--box-content-bg); color: var(--text-main); }

/* TABLE */
.table table, tr, td, th {
	margin: 0;
	border: none;
}
.table {
	border: 1px solid var(--border-color);
	border-top: none;
}
.table td, th {
	padding: 5px;
    color: var(--text-content);
}
.table thead {
	font-weight: bold;
	background-color: var(--border-color);
	border-bottom: 1px solid #DDD;
	color: #FFF;
}
.table tfoot {
	font-style: italic;
}
.table tr.dark, th.dark {
	background-color: #222;
}

/* DEFINITION LIST */
dl.separator dt {	
	width: 150px;
	padding-right: 10px;
	float: left;
	clear: both;
    color: var(--text-main);
}
dl.separator dd {
	margin-left: 160px;
	padding: 5px 0 5px 20px;
	border-left: 1px solid var(--border-color);
    color: var(--text-content);
}
dl.separator dt {	
	position: relative;
	padding-top: 5px;
	padding-bottom: 5px;
}
dl.separator dt:before {
	content: "";
	position: absolute;
	top: 0;
	right: -15px;
	width: 30px;
	border-top: 1px solid var(--border-color);
}
dl.separator dt:after {
	content: "";
	position: absolute;
	top: -2px;
	right: -3px;
	width: 3px;
	height: 3px;
	background: var(--border-light);
	border: 1px solid var(--border-color);
}
dl.separator dt:first-child:before,
dl.separator dt:first-child:after { display: none; }

/* BODY PARTS EXTRA */
#header h1 a {
	color: var(--text-main);
	font-size: 46px;
	text-decoration: none;
}
#header h1 a:hover {
	color: var(--link-hover);
}
#header h2 {
	font-size: 16px;
	color: var(--text-content);
}
.groupTitle h3 {
	font-size: 24px;
    color: var(--text-main);
}
.groupTitle h3:hover {
	color: var(--link-hover);
}
#content {
	color: var(--text-content);
}
div.pageContent {
	background: var(--bg-page-content);
	box-shadow: var(--box-shadow);
	-moz-box-shadow: var(--box-shadow);
	-webkit-box-shadow: var(--box-shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
#footer {
	color: var(--text-content);
	font-size: 10px;
	background-color: var(--bg-footer);
	border-top: 1px solid #555;
	border-left: 1px solid #555;
    transition: background-color 0.3s ease;
}
a#goToMobile {
	background: var(--tile-green);
	color: #FFF;
	padding: 3px;
}

/* FIXES */
.tileFlip:hover > .flipContainer, .tileFlipPerf:hover > .flipContainer {
	box-shadow: var(--box-shadow) !important;
	-moz-box-shadow: var(--box-shadow) !important;
	-webkit-box-shadow: var(--box-shadow) !important;
}

/* Theme Toggle Float */
#theme-toggle-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px; /* Reduced from 50px */
    height: 40px; /* Reduced from 50px */
    border-radius: 50%;
    background-color: var(--nav-bg);
    color: var(--text-main);
    border: 2px solid var(--nav-active-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px; /* Reduced from 24px */
    transition: all 0.3s ease;
}
#theme-toggle-float:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}