/* 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;
}
/* HTML5 display-role reset for older browsers */
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;
}

/* STYLE */

html,
body {
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  min-height: 100vh;
}

body {
  display: grid;
  max-height: 100vh;
  overflow: clip;
}

nav {
  position: relative;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

a {
  background-color: inherit;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

i {
  cursor: pointer;
  background-color: inherit;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

nav > a {
  text-decoration: none;
  cursor: pointer;
  display: flex;
}

nav > a.active {
  box-shadow: none;
  border: solid 1px rgba(0, 0, 0, 0.23);
}

main {
  padding: 0.5rem;
  overflow-y: auto;
}

@media (orientation: landscape) {
  body {
    grid-template-rows: 1fr;
    grid-template-columns: 4rem 1fr;
  }

  nav {
    flex-direction: column;
  }
}

@media (orientation: portrait) {
  body {
    grid-template-rows: 4rem 1fr;
    grid-template-columns: 1fr;
  }

  nav {
    flex-direction: row;
  }
}

/* SETTINGS */

section.settings {
  display: flex;
  gap: 3rem;
  flex-direction: column;
  justify-content: space-evenly;
  height: 100%;
}

.radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

@media (orientation: landscape) {
  .radio-group {
    flex-direction: row;
  }
}

@media (orientation: portrait) {
  .radio-group {
    flex-direction: column;
  }
}

.radio-group input {
  margin: 0px;
  cursor: pointer;
}

.radio-group label {
  padding-left: 1rem;
  cursor: pointer;
}

.radio-group-option {
  display: flex;
  align-items: center;
  padding: 0.2rem 0.4rem;
}

.radio-group-option.selected {
  background-color: slategray;
  border-radius: 1rem;
}

/* ABOUT */

section.about {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* FORTUNE */

section.fortune {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
}

section.fortune > p {
  white-space: pre-wrap;
  -moz-tab-size: 8;
  tab-size: 8;
}

/* SNAKS */

.snacks {
  position: fixed;
  display: grid;
  bottom: 1rem;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  width: 80%;
  padding: 1rem;
  box-shadow: 0 3px 6px rgba(156, 154, 156, 1), 0 3px 6px rgba(156, 154, 156, 1);
  height: 100px;
  transition: 0.3s;
  z-index: 20;
  background-color: inherit;
}

.snacks.closed {
  bottom: -20rem;
  transition: 0.3s;
}

@media only screen and (min-width: 600px) {
  .snacks {
    width: 300px;
  }
}

.snacks .buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 2rem;
}

.snacks .button {
  display: grid;
  grid-template-columns: 1fr;
}

/* NEW */

i.new {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  text-decoration: none;
  display: flex;
}

/* SHARE */

a.share {
  position: fixed;
  text-decoration: none;
  display: flex;
}

@media (orientation: landscape) {
  a.share {
    top: 1.5rem;
    right: 1.5rem;
  }
}

@media (orientation: portrait) {
  a.share {
    left: 1.5rem;
    bottom: 1.5rem;
  }
}

.btn {
  background-color: inherit;
  color: inherit;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
}

/* THEME */

.light {
  background-color: #eee;
  color: black;
}
.dark {
  background-color: #333;
  color: white;
}

@media (prefers-color-scheme: dark) {
  a {
    box-shadow: 0 3px 6px rgba(255, 255, 255, 0.16),
      0 3px 6px rgba(255, 255, 255, 0.23);
  }

  i {
    box-shadow: 0 3px 6px rgba(255, 255, 255, 0.16),
      0 3px 6px rgba(255, 255, 255, 0.23);
  }

  nav > a.active {
    border: solid 1px rgba(255, 255, 255, 0.23);
  }

  nav {
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.16),
      0 3px 6px rgba(255, 255, 255, 0.23);
  }

  .light {
    background-color: #333;
    color: white;
  }
  .dark {
    background-color: black;
    color: #ddd;
  }
}

@media (prefers-color-scheme: light) {
  .light {
    background-color: white;
    color: #555;
  }
  .dark {
    background-color: #eee;
    color: black;
  }
}
