/* 
Josh W Comeau CSS Reset 
*/

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  /* 4. Increase line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

/*
My styles
*/

.container {
  font-family: 'Roboto Mono', 'Courier New', Courier, monospace;
  position: relative;
  display: grid;
  gap: clamp(0.5rem, 2vmin, 1rem);
  width: 100%;
  height: 100dvh;
  background-color: black;
}

.player {
  background-color: var(--player-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: clamp(1rem, 5vmin, 4rem);
}

.player--active {
  filter: brightness(1.2);
}

.player:hover {
  filter: brightness(1.1);
}

.player:active {
  filter: brightness(0.9);
}

.rotate-90 {
  transform: rotate(90deg);
}

.rotate-180 {
  transform: rotate(180deg);
}

.rotate-270 {
  transform: rotate(270deg);
}

#controls {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background-color: darkgrey;
  border: 2px solid grey;
  border-radius: 0.5em;
  padding: 1em 1.5em;
}

@media (orientation: portrait) {
  #controls {
    transform: translate(-50%, -50%) rotate(90deg);
  }
}

#controls fieldset {
  border: none;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

#controls button {
  padding: 0.25em 0.5em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}