/* CSS reset */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* End reset */

html {
  font-family: 'Amatic SC', cursive;
}

h1 {
  padding: 1vh 0 1vh 0;
  font-size: 8vh;
}

h2 {
  padding: 1vh 0 1vh 0;
  font-size: 4vh;
}

#content {
  display: flex;
  justify-content: center;
}

#content div {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50vw auto;
  width: 50vw;
  padding-top: 41vh;
  padding-bottom: 35vh;
}

#content div p {
  height: 10vh
}

#left {
  background-image: url('left.png');
}

#right {
  background-image: url('right.png');
}

span.letter {
  text-transform: uppercase;
  position: relative;
  float: left;
  font-family: 'Overpass Mono', sans-serif;
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.2s;
}

span.letter:hover {
  box-shadow: 0 0 8px rgba(255, 82, 82, 0.5);
  border-radius: 4px;
}

span.letter.dragging {
  cursor: grabbing;
  opacity: 0.7;
}

#adjust-hint {
  position: absolute;
  top: 16vh;
  width: 100vw;
  text-align: center;
  font-family: 'Amatic SC', cursive;
  font-size: 2.5vh;
  color: rgba(0,0,0,0.4);
  pointer-events: none;
}

span.letter#finger0 {
  margin-top: 2vh;
  margin-left: 3.5vw;
  transform: rotate(-9deg);
  font-size: 9vw;
}

span.letter#finger1 {
  margin-top: 0vh;
  margin-left: 2.2vw;
  transform: rotate(-3deg);
  font-size: 10vw;
}

span.letter#finger2 {
  margin-top: -1vh;
  margin-left: 3.5vw;
  transform: rotate(-1deg);
  font-size: 11vw;
}

span.letter#finger3 {
  margin-top: -1vh;
  margin-left: 4.5vw;
  transform: rotate(3deg);
  font-size: 11vw;
}

span.letter#finger4 {
  margin-top: -1vh;
  margin-left: 11.5vw;
  transform: rotate(-1deg);
  font-size: 11vw;
}

span.letter#finger5 {
  margin-top: -0.5vh;
  margin-left: 4vw;
  transform: rotate(1deg);
  font-size: 11vw;
}

span.letter#finger6 {
  margin-top: 0.5vh;
  margin-left: 3.5vw;
  transform: rotate(3deg);
  font-size: 10vw;
}

span.letter#finger7 {
  margin-top: 2vh;
  margin-left: 2.2vw;
  transform: rotate(9deg);
  font-size: 9vw;
}


#header {
  position: absolute;
  top: 0px;
  width: 100vw;
  height: 16vh;
  color: rgb(255, 82, 82);
  text-align: center;
}

#footer {
  position: absolute;
  bottom: 0px;
  height: 18vh;
  width: 100vw;
  margin: 0 auto 0 auto;
  text-align: center;
}

.text-input {
  font-family: 'Overpass Mono', sans-serif;
  font-size: 3vh;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  padding: 0.3em 0.5em;
  border: 2px solid rgb(255, 82, 82);
  border-radius: 0.25em;
  outline: none;
  width: 8em;
  vertical-align: middle;
}

.text-input:focus {
  border-color: rgb(200, 50, 50);
  box-shadow: 0 0 5px rgba(255, 82, 82, 0.4);
}

.font-select {
  font-family: 'Amatic SC', cursive;
  font-size: 3vh;
  padding: 0.3em 0.5em;
  border: 2px solid rgb(255, 82, 82);
  border-radius: 0.25em;
  outline: none;
  background: #fff;
  color: #333;
  vertical-align: middle;
  margin-right: 0.5em;
  cursor: pointer;
}

/* Fist bump animation */
@keyframes bumpLeft {
  0% { transform: translateX(0); }
  40% { transform: translateX(8vw); }
  55% { transform: translateX(6vw); }
  100% { transform: translateX(0); }
}

@keyframes bumpRight {
  0% { transform: translateX(0); }
  40% { transform: translateX(-8vw); }
  55% { transform: translateX(-6vw); }
  100% { transform: translateX(0); }
}

@keyframes letterFlip {
  0% { transform: rotateX(0deg); opacity: 1; }
  40% { transform: rotateX(90deg); opacity: 0; }
  60% { transform: rotateX(90deg); opacity: 0; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

#left.bumping {
  animation: bumpLeft 0.6s ease-in-out;
}

#right.bumping {
  animation: bumpRight 0.6s ease-in-out;
}

span.letter.flipping {
  animation: letterFlip 0.6s ease-in-out;
}

/* Social card modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  max-width: 90vw;
}

.modal-content canvas {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-actions {
  margin-top: 16px;
}

.button-outline {
  background: #fff;
  color: rgb(255, 82, 82);
  border: 2px solid rgb(255, 82, 82);
  margin-left: 8px;
}

a {
  color: rgb(255, 82, 82);
}

button {
  font-family: 'Amatic SC', cursive;
  margin-bottom: 2vh;
  padding: 0.25em 0.25em 0.25em 0.25em;
  border-radius: 0.25em;
  font-size: 6vh;
  text-decoration: none;
  color: #fff;
  background-color: rgb(255, 82, 82);
  text-align: center;
  border: none;
  display: inline-block;
  text-transform: uppercase;
}
