:root,
html[data-theme="light"]{
  --background-color: #add2eb;
  --background-accent: #98b0e8;
  --card-background: #E9F7F9;
  --title-color: #fff;
  --title-shadow: rgba(177, 72, 89, .35);
  --text-color: #2C365E;
  --button-text-color: #fff;
  --accent-color: #e35f75;
  --accent-color-light: #f76e84;
  --combination-background: #fff;
}

html[data-theme="dark"]{
  --background-color: #2E3440;
  --background-accent: #434C5E;
  --card-background: #434C5E;
  --title-color: #E9F7F9;
  --title-shadow: #485e78;
  --text-color: #b1b7c3;
  --button-text-color: #2E3440;
  --accent-color: #E9F7F9;
  --accent-color-light: #D8DEE9;
  --combination-background: #4C566A;
}

*,
*:before,
*:after {
	box-sizing: border-box;
}

body {
	background-color: var(--background-color);
	min-height: 100%;
	display: flex;
	flex-direction: column;
	background-repeat: no-repeat;
	background-attachment: fixed;
	background-image: radial-gradient(var(--background-accent) 1px, transparent 1px), radial-gradient(var(--background-accent) 1px, var(--background-color) 1px);
	background-size: 40px 40px;
	background-position: 0 0,20px 20px;
	background-repeat: repeat;
}

.container {
	text-align: center;
	max-width: 480px;
	padding: 10px 15px;
	margin: 0 auto 50px;
	background-color: var(--card-background);
	border-radius: 30px;
	position: relative;
	width: 92%;
	box-shadow: 0 20px 40px rgba(26, 41, 51, 0.22);
}

svg{
  fill: var(--accent-color);
}

.shake{
  animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}
.shake2{
  animation: shake2 0.82s cubic-bezier(.36,.07,.19,.97) both;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

#title {
	color: var(--title-color);
	margin-bottom: 5px;
	text-align: center;
	font-size: 2.8em;
	margin: 30px 10px 30px;
	text-shadow: 0.2rem 0.2rem 0px var(--title-shadow);
}

#output {
  margin-bottom: 50px;
  overflow: auto;
}

#roll {
  margin: 0px;
  display: flex;
  padding: 10px 30px 5px;
}

svg {
  height: auto;
}

#roll svg g.cover{
  fill: var(--accent-color);
  background: var(--accent-color);
  outline: solid 30px var(--accent-color);
  border-radius: 100%;
  outline-offset: -48px;
}

.combination{
	border-radius: 14px;
	margin: 10px;
	padding: 10px;
	box-shadow: 0 4px 14px -5px rgba(0, 0, 0, 0.14);
	background-color: var(--combination-background);
	max-width: 85%;
	margin: 18px auto;
}
.combination p{
  font-size: 1em;
  margin: 5px 0;
  color: var(--text-color);
  font-style: italic;
}
.combination p strong {
	font-size: 2em;
	color: var(--text-color);
	font-style: normal;
	vertical-align: sub;
	font-weight: 200;
}

.combinationDice{
  margin: 0;
  font-size: 2.5em;
  color: var(--accent-color);
}
.combinationDice span{
  color: var(--text-color);
  font-weight: 400;
}

.combination.hidden>*{
  opacity: 0;
}

.button-wrap{
	margin: 0 auto 25px;
}

.button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.3), 0 3px 3px rgba(0, 0, 0, 0.15), 0 3px 2px -2px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  color: var(--button-text-color);
  font-size: 1.25em;
  letter-spacing: 1px;
  outline: none;
  width: 80%;
  background: var(--accent-color);
  padding: 1.5em 3em;
  margin: 0;
  position: relative;
  min-width: 250px;
  display: inline-block;
  overflow: hidden;
  -ms-touch-action: manipulation;	/* IE10  */
  touch-action: manipulation;		/* IE11+ */
  border-radius: 100px;
  transition: .3s;
}
.button:hover {
  background: var(--accent-color-light);
}

.ripple-container {
  position: absolute;
  left: 0;
  top: 0;
  height: 0;
  width: 0;
  pointer-events: none;
  overflow: hidden;
}

.ripple-effect {
  margin-top: 0px;
  margin-left: 0px;
  width: 1px;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.033);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  pointer-events: none;
}

.ripple-effect.dark {
  background-color: rgba(0, 0, 0, 0.075);
}

@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0) scale(1.1);
  }
  
  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }

  30%, 50%, 70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%, 60% {
    transform: translate3d(4px, 0, 0);
  }
}

@keyframes shake2 {
  10%, 90% {
    transform: translate3d(5px, 0, 0) scale(1.1);
  }
  
  20%, 80% {
    transform: translate3d(-5px, 0, 0);
  }

  30%, 50%, 70% {
    transform: translate3d(2px, 0, 0);
  }

  40%, 60% {
    transform: translate3d(-2px, 0, 0);
  }
}

/* Media queries */
@media (max-height:950px) {
  .container {
    margin-bottom: 10px;
  }

  h1#title {
    font-size: 1.3rem;
    margin: 12px 10px;
  }

  div#output {
    margin-bottom: 10px;
  }

  button#button {
    padding: 1em 3em;
  }

  svg {
    height: 60px;
  }

  h2.combinationDice {
    font-size: 2rem;
  }

  .combination p {
    font-size: 0.8em;
  }
}


/*! normalize.css v3.0.2 | MIT License | git.io/normalize */

/**
 * 1. Set default font family to sans-serif.
 * 2. Prevent iOS text size adjust after orientation change, without disabling
 *    user zoom.
 */

html {
  font-family: sans-serif; /* 1 */
  -ms-text-size-adjust: 100%; /* 2 */
  -webkit-text-size-adjust: 100%; /* 2 */
  height: 100%;
}

/**
 * Remove default margin.
 */

body {
  margin: 0;
}

/* HTML5 display definitions
   ========================================================================== */

/* Text-level semantics
   ========================================================================== */

/**
 * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
 */

b,
strong {
  font-weight: bold;
}

/**
 * Address variable `h1` font-size and margin within `section` and `article`
 * contexts in Firefox 4+, Safari, and Chrome.
 */

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

/* Forms
   ========================================================================== */

/**
 * Known limitation: by default, Chrome and Safari on OS X allow very limited
 * styling of `select`, unless a `border` property is set.
 */

/**
 * 1. Correct color not being inherited.
 *    Known issue: affects color of disabled elements.
 * 2. Correct font properties not being inherited.
 * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
 */

button,
input{
  margin: 0; /* 3 */
}

/**
 * Address `overflow` set to `hidden` in IE 8/9/10/11.
 */

button {
  overflow: visible;
}

/**
 * Address inconsistent `text-transform` inheritance for `button` and `select`.
 * All other form control elements do not inherit `text-transform` values.
 * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
 * Correct `select` style inheritance in Firefox.
 */

button,
select {
  text-transform: none;
}

/**
 * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
 *    and `video` controls.
 * 2. Correct inability to style clickable `input` types in iOS.
 * 3. Improve usability and consistency of cursor style between image-type
 *    `input` and others.
 */

button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button; /* 2 */
  cursor: pointer; /* 3 */
}

/**
 * Re-set default cursor for disabled elements.
 */

button[disabled],
html input[disabled] {
  cursor: default;
}

/**
 * Remove inner padding and border in Firefox 4+.
 */

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/**
 * Address Firefox 4+ setting `line-height` on `input` using `!important` in
 * the UA stylesheet.
 */

input {
  line-height: normal;
}
