@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

:root {
  --input-color: #eee7c7;
  --input-on-color: #cec;
  --strong-color: #f00;

  --shadow: 2px 2px 0 0 #000;

  --main-font: 'Quicksand', sans-serif;
}


* {
  margin: 0;
  border: 0;
  padding: 0;

  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;

  padding: 0 5em;
}

h1 {
  font-size: 2em;
  margin-bottom: 0.3em;
}

/* Header */

nav {
  width: 100%;
  padding: 1rem 0;
  border-bottom: 1px solid #000;
  margin-bottom: 2rem;
}

nav .banner {
  max-width: 2000px;
  height: 200px;
  margin: 0 auto;
  border: 5px solid #835342;

  background-image: url('../img/banner.png');
  background-position-x: center;
  background-position-x: top;
  background-size: cover;
  background-repeat: no-repeat;
}

nav .links {
  display: flex;
  justify-content: center;
  gap: 3em;

  margin-top: 0.5em;

  font-size: 1.45em;
  white-space: nowrap;

  list-style: none;
}

nav ul a {
  color: #000;
}

nav a.current {
  text-decoration: none;
  opacity: 0.9;
  
  cursor: default;
}

/* Content */

.content {
  display: flex;
  flex-direction: column;
  
  padding: 0 2em 2em 2em;

  font-family: var(--main-font);
}

/* Panel */

.panel {
  margin-bottom: 1.5em;
}

.search-area {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 25px;
}

.search-area input {
  min-width: 15em;
}

.user-posts {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  white-space: nowrap;
}

/* Form and button */

form {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 1em;
  
  width: 80%;
  margin: 0 auto;

  text-align: left;
  font-size: 1.4em;
}

.error {
  margin-top: 1em;
  
  color: #f00;
  font-size: 1.2em;
}

label {
  width: 100%;
}

label input, label textarea {
  margin-top: 0.2em;
}

input, textarea {
  width: 100%;
  padding: 5px;

  font-family: var(--main-font);
  font-size: 1em;
  
  cursor: pointer;
}

input:not(*[type='submit']), textarea {
  border: 1px solid #000;

  background-color: var(--input-color);
}

button, input[type='submit'] {
  border: 1px solid #0002;

  font-size: 1.3em;

  cursor: pointer;
}
button:active, input[type='submit']:active, input[type='checkbox']:active {
  position: relative;
  top: 1px;
  left: 1px;

  box-shadow: inset 1px 1px 0 0 black;
}

input[type='checkbox'] {
  aspect-ratio: 1;
  width: 1.5em;

  appearance: none;
}
input[type='checkbox']:checked {
  background-color: var(--input-on-color);
}

input[type='text']:focus, input[type='password']:focus, textarea:focus {
  outline: none;

  cursor: text;
}

/* Posts */

.posts {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-list-message {
  margin-top: 1em;

  text-align: center;
  font-size: 2em;
}

.post-preview {
  display: flex;
  flex-direction: column;
  gap: 5px;

  padding: 1em;
  border: 1px solid #000;

  cursor: pointer;
}

.post-preview footer {
  font-size: 0.9em;
}

.post {
  overflow: hidden;
}

.delete {
  color: var(--strong-color);

  font-size: 0.3em;
  cursor: pointer;
}

.post-text {
  margin-top: 1em;
  font-size: 1.5em;
}

/* Misc */

.tac { text-align: center; }
.centered { margin: 0 auto; }
.fullw { width: 100%; }
.halfw { width: 50%; }
.horizontal { display: flex; gap: 25px; align-items: center; }
.horizontal-full-gap { display: flex; justify-content: space-between; align-items: center; }
.shadow, button, input, textarea { box-shadow: 2px 2px 0 0 #000; }

.btn {
  padding: 1px 6px;
  font-family: inherit;
}

/* Media Queries */
@media screen and (min-width: 1700px) {
  body {
    font-size: 1.4em;
  }
}
@media screen and (min-width: 1500px) {
  body {
    font-size: 1.3em;
  }
}
@media screen and (min-width: 1000px) {
  body {
    padding: 0 4em;
    font-size: 1.3em;
  }
}

@media screen and (max-width: 1000px) {
  form {
    width: 100% !important;
  }
}
@media screen and (max-width: 800px) {
  body {
    padding: 0 3em;
  }
}
@media screen and (max-width: 750px) {
  nav .banner {
    background-image: url('../img/left-banner.png');
    background-position-x: left;
  }
  nav .links {
    gap: 2em;
  }
}
@media screen and (max-width: 700px) {
  body {
    padding: 0 1.5em;
    font-size: 1em;
  }

  nav {
    margin-bottom: 1em;
  }
  nav .banner {
    aspect-ratio: 3;

    height: auto;
  }
  nav .links {
    gap: 0;
    justify-content: space-evenly;
  }

  .content {
    padding: 0 0.1em;
  }

  .panel {
    font-size: 1em;
  }
  .search-area input {
    font-size: inherit;
  }
}
@media screen and (max-width: 550px) {
  body {
    padding: 0 1em;
    font-size: 0.9em;
  }
}
@media screen and (max-width: 500px) {
  body {
    padding: 0 0.75em;
    font-size: 0.8em;
  }
  
  .search-area {
    gap: 1em;
  }
}
@media screen and (max-width: 400px) {
  .panel {
    font-size: 0.8em;
  }
}
@media screen and (max-width: 460px) {
  body {
    padding: 0 0.5em;
    font-size: 0.75em;
  }

  nav {
    padding: 0.5em 0;
  }
}
@media screen and (max-width: 360px) {
  body {
    padding: 0 0.5em;
    font-size: 0.6em;
  }

  nav {
    padding: 0.5em 0;
  }

  .panel {
    font-size: 0.9em;
  }

  .search-area input {
    min-width: 15em;
  }
}
@media screen and (max-width: 300px) {
  nav {
    font-size: 0.9em;
  }

  .search-area {
    gap: 0.9em;
  }
  .panel {
    font-size: 1em;
  }
  .search-area input {
    min-width: 10em;
  }
}