/*
	Loading screen layout (shared). Colours and fonts live in theme.css.
	Kept compatible with the old embedded browser on Garry's Mod's default branch:
	no CSS variables/grid/viewport units, prefixed gradients and animations.
*/

html, body {
	margin: 0; padding: 0;
	width: 100%; height: 100%;
	overflow: hidden;
	background: #05070a;
	color: #eef2f6;
	-webkit-font-smoothing: antialiased;
	-webkit-user-select: none;
}

/* ------------------------------------------------------------------ background */
/* Clipped so the oversized, zooming layers never make the page scrollable */
#bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; }
.bg-layer {
	position: absolute; top: -4%; left: -4%;
	width: 108%; height: 108%;
	background-size: cover;
	background-position: center;
	opacity: 0;
	-webkit-transition: opacity 2.5s ease;
	transition: opacity 2.5s ease;
}
.bg-layer.is-visible {
	opacity: 1;
	-webkit-animation: kenburns 24s ease-out forwards;
	animation: kenburns 24s ease-out forwards;
}
@-webkit-keyframes kenburns { from { -webkit-transform: scale(1); } to { -webkit-transform: scale(1.08); } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }

#shade {
	position: absolute; top: 0; left: 0; width: 100%; height: 100%;
	background: rgba(3, 5, 8, 0.45);
	background: -webkit-radial-gradient(center, ellipse cover, rgba(3, 5, 8, 0.35) 0%, rgba(3, 5, 8, 0.8) 100%);
	background: radial-gradient(ellipse at center, rgba(3, 5, 8, 0.35) 0%, rgba(3, 5, 8, 0.8) 100%);
}
#shade-bottom {
	position: absolute; left: 0; bottom: 0; width: 100%; height: 45%;
	background: -webkit-linear-gradient(bottom, rgba(3, 5, 8, 0.95) 0%, rgba(3, 5, 8, 0) 100%);
	background: linear-gradient(to top, rgba(3, 5, 8, 0.95) 0%, rgba(3, 5, 8, 0) 100%);
}

/* ------------------------------------------------------------------ shared panel look */
.panel {
	background: rgba(10, 14, 20, 0.62);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 14px;
	-webkit-box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}
.eyebrow {
	font-size: 12px;
	letter-spacing: 3px;
	text-transform: uppercase;
	opacity: 0.6;
}

/* ------------------------------------------------------------------ top corners: player card + music, server */
#corner {
	position: absolute; top: 36px; left: 48px;
	width: 330px;
}
#player { padding: 10px 16px 10px 10px; border-radius: 12px; }
#player .eyebrow, #server .eyebrow { font-size: 10px; letter-spacing: 2.5px; }
.avatar-wrap {
	float: left;
	width: 54px; height: 54px;
	border-radius: 12px;
	padding: 2px;
	margin-right: 12px;
}
.avatar {
	display: block;
	width: 54px; height: 54px;
	border-radius: 10px;
	background: #1b222c;
	opacity: 0;
	-webkit-transition: opacity 0.6s ease;
	transition: opacity 0.6s ease;
}
.avatar.is-loaded { opacity: 1; }
.player-text { overflow: hidden; padding-top: 2px; }
#player-name {
	font-size: 17px;
	line-height: 1.2;
	margin: 3px 0 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.player-ids {
	font-family: Consolas, "Courier New", monospace;
	font-size: 11px;
	opacity: 0.7;
}

#server {
	position: absolute; top: 36px; right: 48px;
	text-align: right;
	max-width: 440px;
}
#server-name {
	font-size: 22px;
	line-height: 1.2;
	margin-top: 5px;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
#server-details {
	margin-top: 6px;
	font-size: 13px;
	opacity: 0.85;
}
#server-details span + span:before {
	content: "\2022";
	margin: 0 8px;
	opacity: 0.5;
}
#community-online {
	margin-top: 4px;
	font-size: 12px;
	opacity: 0.6;
}

/* ------------------------------------------------------------------ centre column: logo, tips, music */
#center {
	position: absolute; left: 50%; top: 46%;
	width: 1100px; margin-left: -550px;
	-webkit-transform: translateY(-50%);
	transform: translateY(-50%);
}
#logo {
	display: block;
	margin: 0 auto;
	max-height: 160px; max-width: 160px;
	-webkit-filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.7));
}

/* "ICEFUSE NETWORKS" wordmark in the logo's ice and flame colours */
#wordmark {
	margin-top: 16px;
	text-align: center;
	font-size: 36px;
	line-height: 1.1;
	font-weight: bold;
	letter-spacing: 3px;
	text-transform: uppercase;
	white-space: nowrap;
	-webkit-filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.7));
}
.wm-ice {
	color: #cfe8ff;
	background: -webkit-linear-gradient(top, #ffffff 0%, #cfe8ff 45%, #6fb4ff 100%);
	background: linear-gradient(to bottom, #ffffff 0%, #cfe8ff 45%, #6fb4ff 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}
.wm-fire {
	color: #ff8a2a;
	background: -webkit-linear-gradient(top, #ffd84a 0%, #ff8a2a 55%, #e8401c 100%);
	background: linear-gradient(to bottom, #ffd84a 0%, #ff8a2a 55%, #e8401c 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}
.wm-rule { display: table; width: 380px; margin: 10px auto 0; }
.wm-rule span, .wm-rule i { display: table-cell; vertical-align: middle; }
.wm-rule span:before { content: ""; display: block; height: 1px; }
.wm-rule span:first-child:before {
	background: -webkit-linear-gradient(left, rgba(111, 180, 255, 0) 0%, #6fb4ff 100%);
	background: linear-gradient(to right, rgba(111, 180, 255, 0) 0%, #6fb4ff 100%);
}
.wm-rule span:last-child:before {
	background: -webkit-linear-gradient(left, #ff8a2a 0%, rgba(255, 138, 42, 0) 100%);
	background: linear-gradient(to right, #ff8a2a 0%, rgba(255, 138, 42, 0) 100%);
}
.wm-rule i { width: 28px; text-align: center; }
.wm-rule i:before {
	content: "";
	display: inline-block;
	width: 8px; height: 8px;
	vertical-align: middle;
	background: #ffd84a;
	-webkit-transform: rotate(45deg);
	transform: rotate(45deg);
	-webkit-box-shadow: 0 0 10px rgba(255, 170, 60, 0.9);
	box-shadow: 0 0 10px rgba(255, 170, 60, 0.9);
}

.tip-box { display: table; table-layout: fixed; width: 100%; margin-top: 36px; }
/* always one line at a fixed height, so tip changes never move the logo */
#tip {
	display: table-cell;
	vertical-align: middle;
	height: 28px;
	max-width: 1100px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: center;
	font-size: 17px;
	line-height: 1.5;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.8);
	opacity: 0;
	-webkit-transition: opacity 0.6s ease;
	transition: opacity 0.6s ease;
}
#tip.is-visible { opacity: 0.9; }
.clear { clear: both; }

/* ------------------------------------------------------------------ bottom: notice + loading bar */
#bottom {
	position: absolute; left: 48px; right: 48px; bottom: 40px;
}

.notice-row { text-align: center; margin-bottom: 16px; }
.notice {
	display: inline-block;
	padding: 7px 14px 7px 38px;
	border-radius: 20px;
	position: relative;
	background: rgba(255, 176, 32, 0.12);
	border: 1px solid rgba(255, 176, 32, 0.4);
	font-size: 13px;
	line-height: 1.4;
}
.notice:before {
	content: "!";
	position: absolute; left: 12px; top: 50%;
	width: 18px; height: 18px; margin-top: -9px;
	border-radius: 50%;
	background: #ffb020;
	color: #111;
	font-size: 12px;
	font-weight: bold;
	font-family: Arial, sans-serif;
	text-align: center;
	line-height: 18px;
}
.notice strong { color: #ffc24d; }
.notice .ok-text { display: none; }
.notice.is-ok {
	background: rgba(60, 200, 120, 0.10);
	border-color: rgba(60, 200, 120, 0.35);
}
.notice.is-ok:before { content: "\2713"; background: #3cc878; }
.notice.is-ok .warn-text { display: none; }
.notice.is-ok .ok-text { display: inline; }

.status-row { font-size: 14px; margin-bottom: 10px; }
#status {
	float: left;
	max-width: 80%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	opacity: 0.8;
}
#bar-percent { float: right; font-weight: bold; }

.bar {
	height: 6px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.12);
	overflow: hidden;
}
#bar-fill {
	height: 100%; width: 0%;
	border-radius: 6px;
	-webkit-transition: width 0.8s ease;
	transition: width 0.8s ease;
}

/* ------------------------------------------------------------------ music player (one slim row) */
.music {
	display: none;
	margin-top: 6px;
	padding: 8px 12px;
	border-radius: 10px;
	background: rgba(10, 14, 20, 0.45);
}
.music.is-visible {
	display: block;
	-webkit-animation: fade-in 1s ease;
	animation: fade-in 1s ease;
}
@-webkit-keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.music-row { display: table; table-layout: fixed; width: 100%; }
.music-row > div { display: table-cell; vertical-align: middle; }
.music-progress-row { margin-top: 6px; }

/* little equalizer, frozen while muted */
.music-eq { width: 22px; height: 14px; white-space: nowrap; }
.music-eq span {
	display: inline-block;
	width: 2px; height: 14px;
	margin-right: 2px;
	border-radius: 1px;
	vertical-align: middle;
	-webkit-transform-origin: bottom;
	transform-origin: bottom;
	-webkit-animation: eq 1s ease-in-out infinite alternate;
	animation: eq 1s ease-in-out infinite alternate;
}
.music-eq span:nth-child(2) { -webkit-animation-duration: 0.7s; animation-duration: 0.7s; -webkit-animation-delay: -0.3s; animation-delay: -0.3s; }
.music-eq span:nth-child(3) { -webkit-animation-duration: 1.3s; animation-duration: 1.3s; -webkit-animation-delay: -0.6s; animation-delay: -0.6s; }
@-webkit-keyframes eq { from { -webkit-transform: scaleY(0.2); } to { -webkit-transform: scaleY(1); } }
@keyframes eq { from { transform: scaleY(0.2); } to { transform: scaleY(1); } }
.is-muted .music-eq span {
	-webkit-animation-play-state: paused;
	animation-play-state: paused;
	opacity: 0.35;
}

.music-info {
	padding-right: 10px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.music-info .eyebrow { font-size: 10px; letter-spacing: 2px; margin-right: 8px; }
#music-name { font-size: 13px; opacity: 0.9; }

.music-time {
	width: 38px;
	font-family: Consolas, "Courier New", monospace;
	font-size: 11px;
	opacity: 0.55;
}
#music-duration { text-align: right; }
.music-track-cell { padding: 0 8px; }
.music-track {
	height: 3px;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.12);
	overflow: hidden;
}
#music-progress {
	height: 100%; width: 0%;
	border-radius: 3px;
	-webkit-transition: width 0.5s linear;
	transition: width 0.5s linear;
}
.is-muted #music-progress { opacity: 0.5; }

.music-side { width: 40px; text-align: right; }
#music-hint { display: none; }
#music-mute {
	display: inline-block;
	width: 26px; height: 26px;
	border-radius: 50%;
	vertical-align: middle;
	text-align: center;
	cursor: pointer;
	-webkit-transition: background 0.2s ease;
	transition: background 0.2s ease;
}
#music-mute:hover { background: rgba(255, 255, 255, 0.12); }
#music-mute svg { width: 16px; height: 16px; margin-top: 5px; }
#music-mute .icon-muted { display: none; }
.is-muted #music-mute .icon-sound { display: none; }
.is-muted #music-mute .icon-muted { display: inline; }
.is-muted #music-mute { opacity: 0.7; }

#yt-player { position: absolute; left: -9999px; }

/* ------------------------------------------------------------------ fade in */
#center, #server, #corner, #bottom {
	opacity: 0;
	-webkit-transition: opacity 1.2s ease;
	transition: opacity 1.2s ease;
}
.is-ready #center, .is-ready #server, .is-ready #corner, .is-ready #bottom { opacity: 1; }

/* ------------------------------------------------------------------ smaller screens */
@media (max-height: 800px) {
	#corner { top: 24px; left: 32px; }
	#server { top: 24px; right: 32px; }
	#center { top: 45%; }
	#logo { max-height: 124px; max-width: 124px; }
	#wordmark { font-size: 30px; margin-top: 12px; }
	.wm-rule { width: 320px; }
	.tip-box { margin-top: 26px; }
	#bottom { left: 32px; right: 32px; bottom: 24px; }
}
@media (max-width: 1200px) {
	#center { width: 940px; margin-left: -470px; }
	#tip { max-width: 940px; font-size: 15px; }
}
