@import "shared/reset.css";
@import "shared/variables.css";
@import "shared/message.css";
@import "shared/fonts.css";
@import "shared/header.css";
@import "shared/body.css";
@import "shared/footer.css";
@import "shared/form.css";
@import "shared/buttons.css";
:root {
  font-family: var(--global-fonts);
  font-size: 1.3rem;
  font-weight: normal;
  color: var(--color-text-light);
}

html {
  height: 100%;
}

body {
  background: var(--color-background);
  height: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.preload * {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -ms-transition: none !important;
  -o-transition: none !important;
}


h1 {
  font-weight: bold;
}

h2 {
  font-size: 2rem;
  font-weight: 500;
  text-align: center;
  padding: var(--heading-spacing);
}

h3 {
  font-size: 1.6rem;
  font-weight: 500;
  text-align: center;
  padding: var(--heading-spacing);
}

h4 {
  font-size: 1.4rem;
  font-weight: 500;
}

pre {
  font-family: var(--global-fonts);
}

.input, .textarea {
  display: block;
  font-family: var(--global-fonts);
  font-weight: normal;
  background: var(--color-input);
  border: solid 2px var(--color-input-border);
  border-radius: var(--default-border-radius);
  color: var(--color-text-dark);
  padding: var(--mini-spacing);
  width: 100%;
}

.textarea {
  resize: vertical;
  max-height: 25rem;
  min-height: 5rem;
}

::placeholder {
  font-style: italic;
}

.input:focus, textarea:focus {
  outline: none;
  border: solid 2px var(--color-input-border-focus);
}

.input-inline {
  /* display: inline; */
  font-family: var(--global-fonts);
  font-weight: normal;
  background: var(--color-input);
  border: solid 2px var(--color-input-border);
  border-radius: var(--default-border-radius);
  color: var(--color-text-dark);
  padding: var(--mini-spacing);
  width: 100%;
  resize: none;
}

/* Home Page Specifics */

section.home {
  text-align: center;
}

/* Legal Page Specifics */

section.legal * {
  text-align: left;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.3em;
}

section.legal h5 {
  font-size: 1rem;
  font-weight: bold;
  margin: .8em 0;
}

section.legal ol, section.legal ul {
  padding-inline-start: 4em;
}

/* Game Page Specifics */

section.games {
  text-align: center;
}

section.games .description {
  display: flex;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1rem;
  word-break: break-word;
  word-wrap: break-word;
}

.games-div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
}

.games-div.small {
  flex-wrap: nowrap;
  justify-content: start;
  overflow: hidden;
}

.game-div {
  position: relative;
  display: inline-block;
  overflow: hidden;
  width: 280px;
  height: 210px;
  margin: 0 var(--small-spacing);
  font-size: 1rem;
  border-radius: 0.3rem;
}

.game-div.small {
  width: 175px;
  height: 131px;
  margin: 0;
  margin-right: var(--small-spacing);
  font-size: .7rem;
  border-radius: 0.2rem;
}

.games-div.small:after {
  content: '';
  width: 120px;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  background: linear-gradient(to right, transparent, var(--color-footer) 60%);
  border-bottom-right-radius: var(--panel-border-radius);
}

.game-div>.img-div {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-game-icon);
}

.game-div .game-img {
  transform: scale(1);
  transition: 0.7s ease-out;
  width: 100%;
}

.game-div>span {
  background-color: var(--color-game-default);
  font-size: 1em;
  line-height: 1em;
  color: white;
  position: absolute;
  transition: 0.7s ease-in-out;
  width: 100%;
  text-align: left;
  padding: 0.5rem;
}

.game-div>span.desc {
  text-align: start;
  transform: scale(1) translateX(105%);
  right: 0;
  bottom: 0;
  border-radius: 15px 0 0 0;
  width: 95%;
  font-size: 0.7em;
  line-height: 1em;
}

.game-div>span.title {
  text-shadow: 2px 0px var(--color-game-default), -2px 0px var(--color-game-default), 0px 2px var(--color-game-default), 0px -2px var(--color-game-default);
  text-align: center;
  top: 0;
  left: 0;
  transform: scale(1);
  border-radius: 0 0 15px 0;
  width: 90%;
}

.game-div:hover .game-img {
  transform: scale(1.1);
  transition: 0.1s ease-in-out;
}

.game-div:hover>span {
  background-color: var(--color-game-hover);
}

.game-div:hover>span.desc {
  transform: scale(1) translateX(0%);
  transition: 0.4s ease-in-out;
}

.game-div:hover>span.title {
  transition: 0.2s ease-in-out;
  width: 100%;
  border-radius: 0;
}

/* Admin images card grid (inspired by games thumbnails) */
.images-div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--small-spacing);
  justify-content: flex-start;
}

.image-card {
  position: relative;
  display: inline-block;
  overflow: hidden;
  width: 220px;
  height: 170px;
  margin: 0;
  border-radius: 0.3rem;
  background: var(--color-game-icon);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.image-card .img-div {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-game-icon);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.3s ease-out;
}

.image-card .title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.45rem 0.6rem;
  background-color: rgba(0,0,0,0.5);
  color: white;
  font-size: 0.95rem;
  transform: translateY(100%);
  transition: transform 0.2s ease-in-out;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-card .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  pointer-events: none; /* allow clicks through overlay except for actionable children */
  z-index: 2;
}

.image-card .overlay .overlay-actions {
  position: absolute;
  top: 10px; /* place actions above the filename bar */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  pointer-events: auto; /* enable interaction only on actions */
  z-index: 4;
}

.image-card .overlay .btn {
  opacity: 0.95;
  padding: 0.28rem 0.6rem;
  font-size: 0.95rem;
  border-radius: 1.2rem;
  min-width: 62px;
}

.image-card .title { z-index: 5; }

.image-card:hover img { transform: scale(1.05); }
.image-card:hover .overlay { opacity: 1; }
.image-card:hover .title { transform: translateY(0); }

/* Simple modal for admin delete */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  z-index: 9999;
}

.modal-inner {
  background: var(--color-background);
  padding: 1rem;
  border-radius: 0.4rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  width: 360px;
  max-width: calc(100% - 40px);
}

.modal-inner label { display:block; margin-bottom:.25rem; font-weight:500; }
.modal-inner input[type="password"] { width:100%; padding:.45rem; box-sizing:border-box; }

/* About Page Specifics */

section.about .desc {
  font-weight: 500;
  font-size: 1.1rem;
}

section.about p {
  margin-bottom: calc(var(--paragraph-spacing) * 2);
}

/* Posts Page Specifics */

section.posts {
  text-align: center;
}

section .posts-img {
  width: 150px;
  height: 150px;
  /* max-width: fit-content; */
}

section div[data-p-newspost] {
  position: relative;
}

pre[data-p-newspost] {
  overflow: hidden;
  height: 85px;
  max-height: 85px;
}

section .description[data-p-newspost] {
  padding: var(--small-spacing);
  border-top: solid 2px var(--color-line);
  margin-bottom: var(--small-spacing);
  transition: background 0.2s;
}

section .description[data-p-newspost] h4 {
  padding: 0 0 var(--small-spacing) 0;
  text-align: left;
  line-height: 1;
}

section .description[data-p-newspost]:hover {
  background: rgba(255, 255, 255, 0.15);
  /* color: var(--color-text-dark); */
  /* background: rgba(255, 255, 255, 0.15); */
  background: var(--color-button-hover);
}

section.posts .posts-grid {
  display: grid;
  grid-template-columns: 60% 40%;
}

section .common-grid {
  display: grid;
  grid-template-columns: 50% 50%;
}

section.posts .posts-grid>* {
  padding: 5px;
}

.fcn {
  font-family: 'Courier New', Courier, monospace;
}

section .the_markdown * {
  font-size: inherit;
  line-height: 1.25em;
  color: var(--color-text-dark);
  margin: 0;
  font-weight: normal;
  font-style: normal;
  text-decoration: none;
  font-family: var(--global-fonts);
  margin-bottom: 0.5rem;
  text-align: left;
  padding: 0;
}

section .the_markdown h1 {
  font-size: 2.2rem;
  line-height: 1.1em;
  margin: 0.8em 0 0.7em 0;
  font-weight: 500;
}

section .the_markdown h2 {
  font-size: 1.85rem;
  line-height: 1.1em;
  margin: 0.8em 0 0.7em 0;
  font-weight: 500;
}

section .the_markdown h3 {
  font-size: 1.5rem;
  line-height: 1.1em;
  margin: 0.8em 0 0.7em 0;
  font-weight: 500;
}

section .the_markdown p {
  font-size: 1rem;
  margin-bottom: 0.6em;
}

section .the_markdown img {
  display: block;
  margin: 1em auto;
}

section .the_markdown div.hr {
  border-bottom: solid 2px var(--color-input-border);
  margin-bottom: var(--paragraph-spacing);
}

section .the_markdown div.br {
  border-bottom: solid 2px transparent;
}

section .the_markdown ul, section .the_markdown ol {
  margin-bottom: 1rem;
}

section .the_markdown ul li {
  margin-left: var(--list-spacing);
  list-style-type: disc;
}

section .the_markdown ol li {
  margin-left: var(--list-spacing);
}

section .the_markdown blockquote {
  margin-left: var(--blockquote-spacing);
  margin-bottom: 1rem;
  font-style: italic;
}

section .the_markdown a {
  font-weight: 500;
  color: var(--color-link-dark);
  text-decoration: underline;
}

section .the_markdown a:hover {
  font-weight: 500;
  color: var(--color-section);
  background: var(--color-link-dark);
}

section .the_markdown em, section .the_markdown i {
  font-style: italic;
}

section .the_markdown strong, section .the_markdown b {
  font-weight: 500;
}

section .the_markdown code {
  font-family: monospace;
  background-color: var(--color-input-border);
  color: var(--color-text-light);
}

section .light_text * {
  color: var(--color-text-light);
}

section .light_text a {
  font-weight: 500;
  color: var(--color-text-light);
}

section .light_text a:hover {
  font-weight: 500;
  color: var(--color-footer);
  background: var(--color-text-light);
}

section .light_text div.hr {
  border-bottom: solid 2px var(--color-text-light);
  margin-bottom: var(--paragraph-spacing);
}

/* Contact Page Specifics */

section.contact {
  text-align: center;
}

section.contact pre {
  color: var(--color-button-default);
  font-size: 0.7rem;
  font-family: var(--global-fonts);
}

section.contact ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

section.contact ul li {
  margin-left: var(--default-spacing-x);
}

/* Sign Up Specifics */

section.signup pre {
  color: var(--color-button-default);
  font-size: 0.7rem;
  font-family: var(--global-fonts);
}

section.signup-verify input.token-box {
  display: none !important;
}

/* User Page Specifics */

section.users div.userList {
  display: flex;
  justify-content: flex-start;
  padding: var(--mini-spacing);
}

section.users div.userList>div {
  flex: 1;
}

section.users div.userList>div div {
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
}

section.users div.userList>div a {
  width: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
  text-decoration: none;
  font-weight: normal;
  color: inherit;
}

section.users div.userList a span {
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
  text-decoration: none;
  font-weight: normal;
}

section.users div.userList a img {
  border-radius: var(--default-border-radius);
  width: var(--users-image-size);
  height: var(--users-image-size);
  margin-right: var(--small-spacing);
}

section.users div.userList:nth-child(odd) {
  background-color: var(--color-footer);
  color: var(--color-text-light);
  border-radius: var(--default-border-radius);
}

/* Profile Page Specifics */

section.profile div.profile-main {
  position: relative;
  display: flex;
}

section.profile .profile-name {
  font-size: 1.7rem;
  font-weight: 500;
}

section.profile pre {
  font-family: var(--global-fonts);
}

section.profile div.profile-main-det {
  padding-left: var(--default-spacing-x);
}

section.profile desc {
  font-weight: 500;
}

section .profile-img-big {
  width: 256px;
  height: 256px;
  max-width: initial;
}

section.profile img {
  border-radius: var(--default-border-radius);
}

section.profile p {
  margin-bottom: calc(var(--paragraph-spacing) * 2);
}

section.profile-edit img {
  border-radius: var(--default-border-radius);
}

section.profile-edit .profile-img {
  display: inline-block;
}

section.profile-edit .filepond--root {
  font-family: var(--global-fonts);
  margin-bottom: 0;
  color: var(--color-text-dark);
  font-size: inherit;
}

section.profile-edit .filepond--panel-root {
  background-color: var(--color-input);
  border: solid 2px var(--color-input-border);
}

section.profile-edit .filepond--drop-label {
  color: var(--color-text-dark);
  font-size: inherit;
}

/* Secrets */

div.hptt {
  font-weight: bold;
  font-size: 1.6rem;
  text-align: center;
}

table td#all_subjects, table td#your_subjects {
  font-size: 0.8rem;
}

/* Responsivity */

@media screen and (max-height: 500px) {
  table td.pttd {
    font-size: 0.7rem;
    height: 0.8rem !important;
  }
}

@media screen and (max-width: 1050px) {
  section.posts .posts-grid {
    display: block;
  }
}

@media screen and (max-width: 700px) {
  :root {
    font-size: 1.1rem;
  }
  section .common-grid {
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: auto auto;
  }
  section .common-grid> :first-child {
    border-bottom: solid 2px var(--color-line);
    padding-bottom: var(--default-spacing-y);
    margin-bottom: var(--default-spacing-y);
  }
  section .profile-img-big {
    width: 180px;
    height: 180px;
  }
  section.profile .profile-name {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 500px) {
  :root {
    font-size: 1rem;
    --default-spacing-x: 1rem;
    --default-spacing-y: 1.2rem;
  }
  h2 {
    font-size: 1.6rem;
  }
  h3 {
    font-size: 1.4rem;
  }
  section.contact ul {
    display: block;
  }
  section .profile-img-big {
    width: 120px;
    height: 120px;
  }
  section.profile .profile-name {
    font-size: 1.4rem;
  }
}

@media screen and (max-width: 400px) {
  :root {
    font-size: 0.9rem;
  }
  table td.pttd {
    font-size: 0.7rem;
    word-wrap: break-word;
    height: 0.8rem !important;
    text-indent: -9999px;
  }
  h2 {
    font-size: 1.3rem;
  }
  h3 {
    font-size: 1.1rem;
  }
  section .profile-img-big {
    width: 100px;
    height: 100px;
  }
  section.profile .profile-name {
    font-size: 1rem;
  }
}

@media screen and (min-width: 800px) {
  :root {
    font-size: 1.3rem;
    --default-spacing-x: 1.8rem;
    --default-spacing-y: 2rem;
  }
}

@media screen and (min-width: 1024px) {
  :root {
    --container-width: 1024px;
  }
}

@media screen and (min-width: 1400px) {
  :root {
    font-size: 1rem;
    /* --container-width: 1200px; */
  }
}

@media screen and (min-width: 2000px) {
  :root {
    font-size: 1rem;
    /* --container-width: 1750px; */
  }
}

@media screen and (max-width: 760px) {
  .game-div {
    width: 256px;
    height: 192px;
    font-size: 0.8rem;
  }
}

@media screen and (max-width: 500px) {
  .game-div {
    margin: 0;
  }
}

/* Error 404 Specifics */

section.error404 {
  text-align: right;
}