@import 'fonts.css';

/* These are CSS variables. You can quickly change the style of the most 
important elements here without changing the CSS code below. */

:root {
	--body-background: #222;

	/* Text colors */
	--header-text-color: #fff;
	--box-text-color: #fff;
	--border-radius: 5px;

	--links-text-color: #fff;
	--links-border-radius: 100%;
	--links-size: 60px;
	--links-font-size: 1.6em;

	/* STYLES */
	--box-background: rgba(0,0,0, 50%);
	--links-background: rgba(0,0,0, 30%);

	--progress-bar-background: rgba(255,255,255, 10%);
	--progress-bar-stripe-width: 10px;
	--progress-bar-value-color: #b72205;

	/* Creates a soft, translucent gradient overlay */
	--progress-bar-gradient-top: rgba(255, 255, 255, 0.3);
	--progress-bar-gradient-bottom: rgba(0,0,0, 10%);

	--progress-bar-border-radius: 20px;
	--progress-bar-padding: 10px;

	--soft-box-shadow-large: 0px 0px 30px rgba(0,0,0, 10%);
	--soft-text-shadow-large: 0px 0px 30px rgba(0,0,0, 40%);
	--header-soft-text-shadow-large: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
	--soft-text-shadow-small: 0px 2px 5px rgba(0,0,0, 20%);

	--main-padding: 20px;

	/* Width of the middle area */
	--container-width: 500px;
}

* {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	word-wrap: break-word;
	-webkit-appearance: none;
	padding: 0px; 
	margin: 0px;
} 

body, html {
	height: 100%;
}

body {
	background: var(--body-background) url(../image/bg.png) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;

	/* Fonts */
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10pt;
	font-weight: 400;

	/* Layout */
	display: grid;
	width: 100%;
	height: 100%;

	/* 1fr = 100% of the (remaining) available space left and right */
	grid-template-columns: 1fr var(--container-width) 1fr;

	/* A period signifies an empty cell. 
	Repeating the name of an element causes the content to span those cells. */
	grid-template-areas: ". header ."
						 "text text text"
						 ". links .";

	justify-content: center;
	align-content: center;
}

/* STANDARDS
Headlines, normal links, text fields and formatting
*/

a {
	color: var(--box-text-color);
	opacity: 80%;
	text-decoration: none;
}

a:hover {
	opacity: 100%;
}

input, textarea, button, select {
	border-radius: var(--border-radius);
	color: var(--box-text-color);
}

input::placeholder,
textarea::placeholder {
	color: rgba(255,255,255, 50%);
}

p:last-child { margin-bottom: auto; }
		   p { margin-bottom: 15px; line-height: 23px; }

/* Layout CSS starts here */
.inner-container {
	width: var(--container-width);
	padding: var(--main-padding);
	margin: 0 auto;
}

header {
	grid-area: header;
	font-family: Elsie;
	font-weight: 400;
	font-size: 3em;
	text-shadow: var(--header-soft-text-shadow-large);
	color: var(--header-text-color);
}

header i {
	margin-right: 10px;
}

#text {
	grid-area: text;
	background: var(--box-background);
	color: var(--box-text-color);
	text-shadow: var(--soft-text-shadow-small);
	border-radius: var(--border-radius);
}

.footer {
	margin-top: var(--main-padding);
}

#links {
	grid-area: links;
}

#links .inner-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, var(--links-size));
	grid-auto-rows: var(--links-size);
	grid-gap: 10px;
	justify-content: center;
}

#links a {
	display: flex;
	vertical-align: center;
	justify-content: center;
	box-shadow: var(--soft-box-shadow-large);
	background: var(--links-background);
	border-radius: var(--links-border-radius);
	align-items: center;
	color: var(--links-text-color);
	text-shadow: var(--soft-text-shadow-small);
	font-size: var(--links-font-size);
}

#links a > i {
	transition: transform .2s;
}

#links a:hover > i {
	transform: scale(1.5);
}

/* Bar style */
#progress .bar {
	background: var(--progress-bar-background);
	border-radius: calc(var(--progress-bar-border-radius) + calc(var(--progress-bar-border-radius) / 2));
	display: block;
	margin-bottom: 3px;
	text-shadow: var(--soft-text-shadow-small);
	padding: 5px;
}

#progress .bar span {
	background:
	repeating-linear-gradient(45deg,
    transparent,
    transparent var(--progress-bar-stripe-width),
    rgba(255, 255, 255, 10%) var(--progress-bar-stripe-width),
    rgba(255, 255, 255, 10%) calc(var(--progress-bar-stripe-width) * 2)
	),
	linear-gradient(0deg, 
	var(--progress-bar-gradient-bottom) 0%, 
	var(--progress-bar-gradient-top) 100%
	),
	linear-gradient(var(--progress-bar-value-color), 
					var(--progress-bar-value-color)
	);
	border-radius: var(--progress-bar-border-radius);
	padding: var(--progress-bar-padding);
	display: inline-block;
	overflow-wrap: normal;
}

/* Value style */
#progress [data]::before {
	content: attr(data);
	margin-right: 10px;
	font-weight: bold;
}


/* Mobile adjustments */

@media only screen and (max-width: 768px) {
	body {
		grid-template-columns: 100%;
		grid-template-areas: "header"
							 "text"
							 "links";
	}

	header {
		font-size: 2.3em;
		text-align: center;
	}

	#links .inner-container {
		display: grid;
		grid-template-columns: repeat(auto-fit, 40px);
		grid-auto-rows: 40px;
		grid-gap: 10px;
		justify-content: center;
	}

	.inner-container {
		width: 100%;
	}

	#links a {
		font-size: 1.3em;
	}
	
}