:root{
	--purp:#a0e;
	--fieldpurp:#c9f;
	--folderTabHeight: 20px;	
	
	--cardWidth: 500px;
	--cardHeight:300px;
	
	--cornerRad:12px;
	
	--cardBackFill: linear-gradient(#ccc, #bbb), url("/images/assets/background/noise.gif");
	--cardBackLogo: none;
	--cardBackLogoFill:  url("/images/assets/id/logoArcade.gif") no-repeat 90% 90%;
/*	--cardBackLogo: url("/images/assets/id/cardbackmask2.gif");
	--cardBackLogoFill: #333;*/
	
	--overlayBackground:rgba(50,50,50,0.9);
	--overlayFilter:blur(4px) brightness(2);
}

[data-theme="dark"] {
	--cardBackFill: url("/images/assets/background/noise.gif") #333;
	--cardBackLogo: url("/images/assets/id/logoFinance.gif");
	--cardBackLogoFill: linear-gradient(#999, #333);
	
	--overlayBackground:rgba(5,20,5,0.9);
	--overlayFilter:blur(4px) brightness(2);
}

[data-theme="smoke"] {
	--cardBackFill: url("/images/assets/background/noise.gif") #633;
	--cardBackLogo: url("/images/assets/id/logoFinance.gif");
	--cardBackLogoFill: linear-gradient(#fff, #ff9, #996);
	
	--overlayBackground:rgba(40,30,25,0.9);
	--overlayFilter:blur(4px) brightness(1.5);
}

[data-theme="tower"]{
	--cardBackFill: linear-gradient(#ddd, #ccc), url("/images/assets/background/noise.gif");
	--cardBackLogo: url("/images/assets/id/logoArcade.gif");
	--cardBackLogoFill: linear-gradient(#f99, #933);
	
	--overlayBackground:rgba(100, 10, 10, 0.5);
	--overlayFilter:blur(2px) invert(1) grayscale(1);
}

*{
	image-rendering:pixelated;
}

html{
/*	Background color for colouring status bar on mobile.
	Manually matched to background image.
	Change if updating background-image. */
	background-color: #a8a8a8;
}

#walletInfoContainer{
	perspective: 200px;
	align-self: center;
	width: 100%;
	display: flex;
	align-content: space-around;
	align-items: center;
	flex-direction: column;
}

.cardWrapper{
	height: var(--cardHeight);
	padding-top: 0;
	box-sizing: border-box;
	transition: height 0.15s ease-out,
				padding-top 0.15s ease-out;
}

#wallet:has(.spin){
	perspective: 2000px;
	perspective-origin: bottom;
	z-index: 1000;
	position: relative;
}

.spin{
/*	animation:rotate 8s infinite linear;*/
	transform-style: preserve-3d;
	
	animation-name: rotate, cardIntro;
	animation-duration: 8s, 0.25s;
	animation-iteration-count: infinite, 1;
	animation-timing-function: linear, ease-out;
}

.spin.flipped{
	animation-delay: -4s;
}

@keyframes rotate {
  from {transform:	rotateY(0deg)	;}
  to {transform:	rotateY(360deg)	;}
}

body{
	image-rendering:pixelated;
	
	background:url("/images/assets/background/check.gif") #333;
	background-blend-mode: multiply;
	background-attachment: fixed;
	background-position: center center;
	background-size: 48px ;
	
/*	Think this has to be moved. */
/*	mask-image:url("/images/assets/id/idClassic.gif");
	mask-attachment: fixed;
	mask-position: center center;
	mask-size: 256px 96px;
	-webkit-mask-image:url("/images/assets/id/idClassic.gif");
	-webkit-mask-attachment: fixed;
	-webkit-mask-position: center center;
	-webkit-mask-size: 256px 96px; */
	
/*	background-blend-mode: lighten;
	background-color:#f99; */
	
/*	animation-name: idBackgroundScroll;
	animation-duration: 64s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;*/
	
	min-height: 100vh;
/*	Hiding overflow in order to fix scrollbar glitching due to perspective. */	
	overflow-x: hidden;
}

#background{
	position: fixed;
	
	width: 100%;
	height:100%;
	
	
	backdrop-filter: var(--overlayFilter);	
	-webkit-backdrop-filter: var(--overlayFilter);
	
	mask-image:url("/images/assets/id/idClassic.gif");
	mask-attachment: fixed;
	mask-position: center center;
	mask-size: 256px 96px;
	-webkit-mask-image:url("/images/assets/id/idClassic.gif");
	-webkit-mask-attachment: fixed;
	-webkit-mask-position: center center;
	-webkit-mask-size: 256px 96px;
	
	animation-name: idBackgroundScroll, filterBackground;
	animation-duration: 64s, 0.5s;
	animation-iteration-count: infinite, 1;
	animation-timing-function: linear, ease-out;
	
/*	animation-name: idBackgroundScroll;
	animation-duration: 64s;
	animation-iteration-count: infinite;
	animation-timing-function: linear; */
}

main#userPage{
/*	perspective: 200px;
	width: 100vw; */
	display: flex;
	flex-direction: row;
	min-height: 100vh;

	background: var(--overlayBackground);
	
	animation-name: backgroundIntro;
	animation-duration: 0.15s;
	animation-delay: 0.25;
	animation-iteration-count: 1;
	animation-timing-function: ease-out;
}

#wallet{
	width: 100%;
	align-self: center;
}

#options{
	max-width: 100%;
	animation-name: optionsIntro;
	animation-duration: 0.25s;
	animation-delay: 0;
	animation-iteration-count: 1;
	animation-timing-function: ease-out;
	
}

.cardWrapper{
	z-index: 100;
	position:relative;
	margin-bottom:4px;
	pointer-events: none;
/*	
	animation-name: cardIntro;
	animation-duration: 0.25s;
	animation-delay: 0;
	animation-iteration-count: 1;
	animation-timing-function: ease-out;*/
}

/*.infoContainer>p{
	font-family: sans-serif;
}*/

#userCard{
	position:relative;
	left: 50%;
	
	transform-origin: center center;
	transform: translateX(-50%) rotateZ(0deg);
	
	transition: transform 0.25s;
	transition-timing-function: cubic-bezier(.18,.89,.32,1.28);
	
	backface-visibility: hidden;
	pointer-events: initial;
}

#userCard.front{
	background: var(--cardBackFill);
	background-blend-mode: multiply;
}
#userCard.front::after{
	content: "";
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--cardBackLogoFill);
	background-blend-mode: multiply;
	mask-image: var(--cardBackLogo);
	mask-repeat: no-repeat;
	mask-position:90% 90%;
	-webkit-mask-image: var(--cardBackLogo);
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position:90% 90%;
}

#userCard.front,
#userCard.anonymous{
	pointer-events: none;
}

.spin #userCard:not(.front){
	position: absolute;
	top: 0;
	transform: translateX(-50%) rotateZ(0deg) rotateY(180deg);
}

.sticker.active{
	pointer-events:none;
	opacity:0.5;
}

#userCard .sticker{
	position:absolute;
}

.stickerInactive{
	npointer-events: none;
	nopacity:0.25;
}

.stickerActive{
	
}

.sticker.used{
	filter: grayscale(100%) brightness(0);
	opacity: 0.6;
}

#signup{
	text-align:center;
	padding:20px;
	background: var(--screenBackground);
	background-blend-mode: overlay;
/*	background-color:rgba(200,150,255,1);
	background-blend-mode:screen;*/
	background-image:url("/images/assets/background/smile.gif");
	animation-name: bgScrollDiagonalLeft;
	animation-duration: 2s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
}

/*Individual boxes*/

#alert{
	position: relative;
	margin:auto;
	display: flow-root;
/*	max-width:var(--cardWidth);*/
	width: min( calc(100% - 8px), var(--cardWidth));
}

/* ------------- */

#stickerBook{
	height:var(--cardHeight);
	border:none;
	background:none;
	position:relative;
	padding:0px;
	text-align:center;
}

#stickerBook #page{
	height:100%;
	width:calc(100% - 16px);
	position:absolute;
	right:0;
	noverflow:hidden;
	nmargin-left:32px;
	background:none;
	padding:4px;
	padding-left:20px;
	border:outset;
	border-width: 0px 1px 1px 0px;
	border-radius:var(--cornerRad);
	background-color:#c9c;
	box-sizing:border-box;
}

#stickerBook img.used{
	filter: grayscale(100%) brightness(0);
	opacity: 0.1;
}

#stickerBook #rings{
	z-index:10;
	left:-16px;margin-right:4px;
	top:0;
	position:sticky;
	float:left;
	display:inline-block;
	width:32px;
	height:100%;
	background-image:url("/images/assets/ringbind.gif");
}

/*

	FOLDERS -------------------------------------------------------------------------------------------------------------FOLDERS---------------+

*/

#folders{
	width:var(--cardWidth);
	background: none;
	padding: 0px;
	border: none;
	top:0px;
	margin-bottom:0px;
}

#folders ul{
	nbackground-color: white;
	margin: 0px;
	padding:0px;
	position:relative;
	left:var(--cornerRad);
	max-height:30px;
	
}

#folders ul li{
	text-decoration: none;
	padding: 0px 4px;
	list-style: none;
	font-family:"MS Gothic", monospace;
	font-size: calc( var(--folderTabHeight) - 4px);
	border-bottom: var(--folderTabHeight) solid #f9f;
	border-left:  6px solid transparent;
	border-right: 6px solid transparent;
	border-radius:2px;
	height: 0px;
	display: inline-block;
	position: relative;
	margin-left: -4px;
}

#folders #cover{
	background-blend-mode:multiply;
	background-image: url('/images/assets/cardemboss.gif');
	background-position: center; 
	height:calc(var(--cardHeight) - var(--folderTabHeight));
	background-color: #f99;
	nborder-radius: 2px 6px 6px 6px;
	
	border-radius: var(--cornerRad);
	border: outset;
	border-width: 0px 1px 1px 0px;
	box-sizing: border-box;
}

#folders ul li:nth-child(1) { border-bottom-color:#f99; z-index: 100; }
#folders ul li:nth-child(2) { border-bottom-color:#f9f }
#folders ul li:nth-child(3) { border-bottom-color:#ff9 }
#folders ul li:nth-child(4) { border-bottom-color:#99f }
#folders ul li:nth-child(5) { border-bottom-color:#9f9 }
#folders ul li:nth-child(6) { border-bottom-color:#9ff }
#folders ul li:nth-child(7) { border-bottom-color:#fff }
#folders ul li:nth-child(8) { border-bottom-color:#fff }
#folders ul li:nth-child(9) { border-bottom-color:#fff }

/*#stickers::before{
	content:" ";
	z-index:-10;
	right:0;
	top:0;
	position:sticky;
	display:inline-block;
	width:calc(100% - 12px);
	height:100%;
	border:outset;
	box-sizing:border-box;
	border-width: 0px 1px 1px 0px;
	border-radius:12px;
	background-color:#c9c;
}*/

#title{
	position:relative;
	z-index:  1000;
	max-width:100%;
	pointer-events:none;
	font-size:60px;
	line-height: 0.8em;
	/*display:inline-block;*/
	width:var(--cardWidth);
	margin: -20px auto;
	transform:
		/*scaleX(1.25)
		scaleY(1.25)*/
		rotateY(4deg)
	;
	background: linear-gradient(#eee, #f44);
    background-clip: border-box;
	color: transparent;
	background-clip: text;
	-webkit-background-clip: text;
	
	-webkit-text-stroke-width: 1px;
	-webkit-text-stroke-color: #633;
}

/* -------------THREADS --------------------*/

#threads{
	height:calc( var(--cardHeight) - 4px );
	width: calc( var(--cardWidth)  - 4px );
	margin: auto;
	background-image:url("/images/assets/background/marble.gif");
	padding:4px;
	box-sizing:border-box;
	box-shadow:4px 4px grey;
	background-color:#c66;
	background-blend-mode:multiply;
	color:white;
	position:relative;
	
}

#threads h2{
	margin:0px;
	position:absolute;
	text-shadow: 2px 2px gray;
	bottom:8px;
	right: 8px;
}



/*

	 ~ Info Box Stuff ~
	 
*/

.userInfoBox{
	width:calc(100% - 8px);
	max-width:var(--cardWidth);
	padding:8px;
	
	margin:auto;
	margin-bottom:4px;
/*	border:3px outset #999;*/
	box-sizing:border-box;
	
	
	
	overflow:hidden;
	position:relative;
	top:4px;
	
	
	background: var(--sidebarBackground);
	background-size: var(--sidebarBackgroundSize);
	background-blend-mode: var(--sidebarBackgroundBlend);
	
	box-shadow: 4px 4px;
	
/*	background-color: #b4f;
	background-image:url("/images/assets/background/marble.gif");
	background-blend-mode:multiply;*/
	
	color:#333;
}

.userInfoBox h2, .userInfoBox p{
	margin:0px 4px;
}

ul, ol{
	margin:0px 0px 4px 0px;
}

.userInfoBox hr{
	margin:4px 0px;
}

.userInfoBox input{
	float:left;
	border-style:inset;
	background-color: transparent;	
	border-radius: 0;
}

.userInfoBox input:focus, .userInfoBox input, .userInfoBox button{
	color:#333;
}

.userInfoBox button{
	border-style:outset;
	background-color: var(--fieldpurp);	
}

.userInfoBox button:active{
	border-style:inset;
}

.userInfoBox input,
.userInfoBox button{
	border-width: 1px;
}

.userInfoBox input{
	background: var(--screenBackground);
	color: var(--screenDarker);
	border-style: solid;
	border-color:	var(--engravingDark)
					var(--engravingLight)
					var(--engravingLight)
					var(--engravingDark);
}

.userInfoBox button{
	background: var(--buttonBackground);
	color: var(--buttonColor);
	border-style: solid;
	border-color:	var(--engravingLight)
					var(--engravingDark)
					var(--engravingDark)
					var(--engravingLight);	
}

#alert.local{
	position:relative;
	max-width: 100%;
/*	top: -4px;
	left: 4px;*/
}

#captcha{
	margin: auto;
	display:block;
	max-width:var(--cardWidth);
}

.userInfoBox input , .userInfoBox button{
	font-family:serif;
	box-sizing:border-box;
	padding: 2px 4px;
/*	border-width:3px;	*/
/*	border-color:#999;	*/
	
	font-size:20px;
	font-weight:bold;
}

.userInfoBox li{
	display:list;
	list-style-type: circle;
}

#emailCheck{
	display: inline-block;
	padding: 4px 4px;
	background: var(--screenBackground);
	color: var(--screenDarker);
	box-sizing: border-box;
	border-width: 1px;
	border-style: solid;
	border-color:	var(--engravingLight)
					var(--engravingDark)
					var(--engravingDark)
					var(--engravingLight);	
}

#emailCheck label{
	padding: 4px;
}

.fullWidth{
	width:100%;
}

.halfWidth{
	display:inline-block;
	width:calc(50% - 2px);
}

.halfWidth, .fullWidth{
	margin-bottom:4px;
}

.halfWidth.last, .fullWidth.last{
	margin-bottom:0px;
}

.halfWidth.left{
	margin-right:2px;
}

.halfWidth.right{
	margin-left:2px;
}

#logout{
	display:inline;
}

#editButton{
	width:50%;
}

#userPhoto{
	position:relative;
	float:left;
	margin-right:12px;
	width:128px;
	height:128px;
	background-size:cover;
	background-position:center; 
}


#avatarContainer input[type="file"]{
    display: none;
}

#avatarContainer .fileInput{
	position: absolute;
	top: 12px;
	left: 12px;
	max-width: 120px;
	font-size:10px;
	background-color: rgba(200,200,200,0.75);
	border: 2px outset;
	padding: 4px;
	box-sizing: border-box;
	nz-index: 100;
}

#avatarContainer .fileInput:hover{
	border:2px rgba(200,200,200,0.75) solid;
}

#avatarContainer .fileInput:active{
	background-color:#ccc;
	border:2px inset;
}

/*test img stuff*/
#avatarUpload{
	position: absolute;
	display: inline-block;
	height: 30px;
	left: 10px;
}

.infoContainer{
	height:100%;
}

.userDetailField input,
.userDetailField select{
	padding:0px;
	font-size:inherit;
	height:100%;
	width:100%;
	box-sizing:border-box;
	padding:8px;
/*	z-index: 100; */
	position:relative;
	background-color: white;
}

.userDetailField input,
.userDetailField select:focus{
	border: 2px inset;
}

.userDetailField select{
	border: 2px outset;
}

/*edit stuff test ends*/

.fieldFill{
	overflow:hidden;
}

.fieldFloat{
	float:right;
}

#hash{
	white-space:pre;
}

#userID{
	display:inline-block;
	width:auto;
}

.bioText{
	width:calc(100% - 4px);
	height:calc(100% - 4px);
	nz-index: 100;
	position:relative;
	nbackground-color: rgba(255,255,255,0.9);
	overflow:hidden;
	border:none;
}

#userBio{
	resize:none;
	white-space:pre-wrap;
	margin-top:4px;
	padding:1px 4px;
	font-size:18px;
	background-position-y:-1px;
	box-sizing:border-box;
	line-height:20px;
	height:140px;
	width:100%;
	noverflow:hidden;
	background-image: repeating-linear-gradient(rgba(0,0,0,0) 0px, rgba(0,0,0,0) 19px, rgba(0,0,0,0.75) 20px);
	
	box-sizing:border-box;
}

#userBio p{
	width:100%;
}

.userSticker{
	position:absolute;
}

#first{
	top:120px;
	left:40px;
}
#second{
	top:20px;
	left:405px;
}

#third{
	nopacity: 0.5;
	top:210px;
	left:-10px;
}

#fourth{
	top:6px;
	left:84px;
	transform:scaleX(0.5) scaleY(0.5);
}

/*	Screen is small, vertical mode, phone style.	*/

@media screen and /*(min-width: 320px) and*/ (max-width: 500px) and (orientation: portrait) {
	
	*{
		/*outline: 1px solid red;*/
	}

/*	header{
		position:fixed;
		top:4px;
		left:4px;
		z-index:1000;
	}
*/	

/*	body{
		width:auto;
	}
	
	main{
		width:100%;
		perspective:initial;
	}
*/	
.cardWrapper{
	height: var(--cardWidth);
	padding-top:  calc( ( var(--cardWidth) - var(--cardHeight) ) /2 );
	/*	margin: calc(50vh - (var(--cardWidth) / 2)) auto;*/
	
	/*	width:var(--cardHeight);
		display:block;
		position:relative;*/
		
		/*margin:auto;
		width: 500px;
		left:300px;*/
	}
	
	.cardWrapper, .cardWrapper > form{
	/*	height: var(--cardWidth);
		width: var(--cardHeight);	*/
	}
	
	.cardWrapper > *, .cardWrapper > form > * {
	/*	transform-origin: center center;
		transform: rotate(90deg) translate(0, -100%);*/
	}
	
	#userCard{
		transform: translateX(-50%) rotateZ(90deg);
	/*	transform: rotate(90deg) translate(0, -100%);*/
	}
	
	#userCard.anonymous{
		transform: translateX(-50%) translateY(100px) rotateZ(90deg) rotateY(180deg);
	};
	
	.cardWrapper > form{
	/*	transform-origin:	unset;
		transform:			unset;*/
	}
	
	#userCard {
		overflow-x: hidden;
		
		border-width: 1px 1px 0px 0px;
		
    /*! top: 100%; */
	}
	
	#threads{
		nheight:var(--cardWidth);
		nwidth: var(--cardHeight);
		
		margin: 0px 4px 0px 4px;
	}





	
	#captchaContent select{
		left:40px;
	}
	
	footer, #options{
		
	/*	position: fixed; */
		bottom: 4px;
		display: inline-block;
		margin: auto;
		left: 0;
		right: 0;
		top:unset;
		
		
	}
	
/*	header{
		margin-bottom:0px;
		width:100%;
		overflow: scroll;
		display:inline-block;
		background-color:transparent;
		background-image:
			linear-gradient(to top, 
				rgba(255,255,255,0),
				rgba(255,255,255,0) 3px,
				#fff 3px,
				#aaf 21px,
				rgba(255,255,255,0) 21px,
				rgba(255,255,255,0)
			);
	}*/
	
}

@keyframes idBackgroundScroll{
	from {
		background-position:0 0;
		mask-position:0 0;
		-webkit-mask-position:0 0;
	} to {
		background-position:calc( (128px * 6) ) calc( (48px * 16) );
		mask-position:calc( (128px * 6) ) calc( (48px * 16) );
		-webkit-mask-position:calc( (128px * 6) ) calc( (48px * 16) );
} }

@keyframes cardIntro{
	from {
		transform: translateY(-100vh);
	} to {
		transform: translateY(initial);
} }

@keyframes optionsIntro{
	from {
		transform: translateY(100vh);
	} to {
		transform: translateY(0);
} }

@keyframes backgroundIntro{
	from {
		background: transparent;
	}to{
		background: var(--overlayBackground);	
} }

@keyframes filterBackground{
	from {
		opacity: 0;
		background-size: 2000px;
	} to {
		opacity: 1;
		background-size: 20px;
} }

/*@keyframes idBackgroundScroll{
	from {
		background-position-x:center 0px;
		background-position-y: center 0px;
	} to {
		background-position-x:center calc( (64px * 3) );
		background-position-y:center calc( (32px * 3) * 2 );
} }*/