/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

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;
}

html {
  font-family: sans-serif;
  box-sizing: border-box;
  font-size: 62.5%;
  padding: 0;
  margin: 0;
}

body {
  font-size: 1.6rem;
  /* background-image: linear-gradient(to right, #434343 0%, black 100%); */
  background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #f7f7f7;
  min-height: calc(100vh - 4rem);
}

main {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-block: 4rem;
  max-width: 1200px;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;

  h1 {
    font-size: 3.6rem;
    margin-bottom: 2rem;
  }

  p {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    max-width: 75rem;
    text-align: center;
  }
}

.word-search {
  display: flex;
  flex-direction: column;
  max-width: 650px;
  border: 1px solid #fdfcfb;
  border-radius: 5px;
  padding: 1rem;
}

.row {
  display: flex;
}

.cell {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.4rem;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.5rem;
}

.selected-word-wrapper {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;

  h4 {
    font-size: 2rem;
  }

  .selected-word {
    font-size: 2rem;
    color: yellow;
    text-transform: uppercase;
  }
}

.buttons {
  display: flex;
  gap: 3rem;
}

.btn {
  background-color: transparent;
  border: 1px solid #fdfcfb;
  border-radius: 5px;
  padding: 1rem 1.6rem;
  font-size: 1.8rem;
  color: #fdfcfb;
  cursor: pointer;
  margin-top: 2rem;
  &:hover {
    background-color: #fdfcfb;
    transition: all 0.3s;
    color: #764ba2;
  }
}

.category-wrapper {
  display: flex;
  margin-top: 2rem;
  gap: 1rem;
  font-size: 2rem;
}

.words-to-find {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-block: 2rem;

  span {
    font-size: 2.4rem;
    margin-bottom: 3rem;
  }
}

.words-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  font-size: 1.6rem;
  grid-gap: 3rem;
  text-align: center;
  text-transform: uppercase;
}

.cell.selected {
  color: #202020;
}

.cell.highlighted {
  background-color: #d0cc6b;
}

.found {
  opacity: 0.3;
  text-decoration: line-through;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #aaa;
  border-radius: 6px;
  width: 65rem;
  display: flex;
  flex-direction: column;
  align-items: center;

  p {
    font-size: 3rem;
  }
}

.close-btn {
  color: #aaa;
  position: absolute;
  right: 10px;
  top: 5px;
  font-size: 28px;
  font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.word-search {
  user-select: none; /* Disable text selection */
}

.cell {
  user-select: none; /* Disable text selection */
}
