/* Root - adding color variables */
:root {
  --primary-color: rgba(168, 201, 230, 1);
  --primary-color-faded: rgba(168, 201, 230, 0.3);
  --secondary-color: hsl(209, 38%, 50%);
  --text-color: hsl(208, 38%, 35%, 1);
  --text-color-alt: hsl(208, 38%, 25%, 1);
  --white: hsl(208, 100%, 100%, 1);
  --shadow: rgba(0, 0, 0, 0.2);
  --delete: rgb(167, 74, 74);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  /* border: 1px solid black; */
  color: var(--text-color);
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -5;
}

body {
  background-color: var(--white);
  background-image: linear-gradient(
    to right,
    var(--primary-color) 0%,
    var(--primary-color-faded) 35%,
    var(--primary-color-faded) 65%,
    var(--primary-color) 100%
  );
}

a {
  text-decoration: none;
  transition: 0.25s ease all;
  color: var(--text-color);
}

a:visited {
  color: var(--text-color);
}

a:hover {
  color: var(--white);
}

input,
textarea {
  outline: none;
}

ol {
  width: 100%;
}

li {
  list-style: none;
}

header,
footer {
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--primary-color);
  background-image: linear-gradient(
    to right,
    var(--secondary-color) 50%,
    var(--primary-color) 51%
  );
}

header {
  border-bottom: 0.25rem solid white;
}

footer {
  border-top: 0.25rem solid white;
}

header .sub-wrapper,
footer .sub-wrapper {
  padding: 1rem;
  background-color: var(--primary-color);
  background: linear-gradient(
    to right,
    var(--secondary-color),
    var(--primary-color)
  );
}

/* footer {
  position: absolute;
  bottom: 0;
} */

header a,
header a:visited,
header i {
  color: var(--white);
}

header a:hover {
  color: var(--text-color);
}

h1 {
  font-size: 3.5rem;
  text-shadow: 1px 2px 3px var(--shadow);
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100vh;
}

.sub-wrapper {
  width: 100vw;
  max-width: 1200px;
  display: flex;
  align-items: center;
}

header .sub-wrapper {
  justify-content: space-between;
}

footer .sub-wrapper {
  justify-content: flex-end;
}

nav a {
  margin: 0 1rem;
  padding: 0.35rem 1rem;
  border-radius: 0.75rem;
  font-size: 1.25rem;
  border: 2px solid var(--primary-color);
  background-color: var(--secondary-color);
  box-shadow: 1px 2px 3px 1px var(--shadow);
  transition: 0.25s ease all;
}

nav a:hover {
  background-color: var(--white);
  color: var(--secondary-color);
}

main {
  height: 100%;
  width: 100vw;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  /* flex-wrap: wrap; */
  margin: 1.5rem;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

form div {
  margin: 0.5rem;
}

button {
  padding: 0.5rem 1.5rem;
  text-transform: uppercase;
  background-color: var(--primary-color);
  outline: none;
  border: 2px solid var(--secondary-color);
  border-radius: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
  box-shadow: 1px 2px 3px 1px var(--shadow);
  transition: 0.25s ease all;
}

button:hover {
  color: var(--white);
  background-color: var(--secondary-color);
}

#welcome-tag {
  width: 100%;
  text-align: center;
  display: block;
  padding: 0.5em;
  font-size: 1.5rem;
}

#welcome {
  font-weight: bold;
}

.login-form div,
.signup-form div {
  margin: 0.25rem 0.5rem;
}

input,
label {
  padding: 0.25rem 0.5rem;
}

input,
textarea {
  border-right: 2px solid var(--primary-color);
  border-top: 2px solid var(--primary-color);
  border-left: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

input:focus,
textarea:focus {
  border-color: var(--secondary-color);
  background-color: var(--primary-color-faded);
}

.divide-header {
  margin-bottom: 1rem;
  text-align: center;
  width: 85%;
  color: var(--secondary-color);
}

.divide-header::after {
  content: "";
  display: block;
  width: 100%;
  border-top: 2px solid var(--secondary-color);
}

#create-post,
#edit-post {
  width: 100%;
}

#create-post,
#edit-post,
.comment-form {
  background-color: rgba(255, 255, 255, 0.6);
}

#create-post label,
#edit-post label {
  font-weight: bold;
}

.new-post-form,
.edit-post-form,
.check-user-form,
.login-form,
.signup-form {
  width: 90%;
}

.edit-link {
  display: flex;
  width: 1.1rem;
  height: 1.1rem;
  margin-right: 1rem;
}

.form-div {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#check-username-div {
  width: 100%;
  display: flex;
  justify-content: center;
}

.check-user-form input,
.login-form input,
.signup-form input {
  width: 50%;
  padding: 0.75rem;
  border-radius: 1rem;
  text-align: center;
  font-size: 1.5rem;
}

#post-div {
  display: flex;
  flex-direction: column;
}

.new-post-form div,
.edit-post-form div {
  width: 100%;
  display: flex;
}

.new-post-form input,
.new-post-form textarea,
.edit-post-form input,
.edit-post-form textarea {
  resize: vertical;
  padding: 0.75rem;
  border-radius: 1rem;
  font-size: 1.5rem;
}

.comment-form,
#create-post,
#edit-post {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  border: 2px solid var(--primary-color);
  border-radius: 1rem;
  padding: 1rem;
  margin: 0.5rem 0;
  box-shadow: 1px 2px 3px 1px var(--shadow);
}

#edit-post h2 {
  width: 100%;
  text-align: center;
}

.button-foot {
  width: 100%;
  display: flex;
  justify-content: space-around;
}

.delete-btn:hover {
  background-color: var(--delete);
}

#comment-body {
  width: 100%;
  resize: vertical;
  padding: 0.75rem;
  border-radius: 1rem;
  font-size: 1.5rem;
}

.post-list,
#comment-div {
  width: 90%;
  list-style: none;
}

#post-list-item {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.post {
  width: 100%;
  display: flex;
  justify-content: right;
  flex-wrap: wrap;
  background-color: var(--primary-color);
  border: 3px solid var(--primary-color);
  border-radius: 0.7rem;
  box-shadow: 1px 2px 3px 1px var(--shadow);
  margin-bottom: 1rem;
}

.post-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  padding: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
}

.title-div {
  display: flex;
  align-items: baseline;
}

.post-content {
  width: 100%;
  padding: 0.5rem;
  background-color: var(--white);
  border-radius: 0 0 0.5rem 0.5rem;
}

.comment-count,
.post .meta {
  font-style: italic;
  font-size: 0.8rem;
  font-weight: lighter;
  padding: 0 0.5rem;
}

.comments {
  width: 90%;
  background-color: rgba(255, 255, 255, 0.6);
  padding: 0.5em;
  margin-top: -1.5rem;
  margin-bottom: calc(-0.5rem - 2px);
  z-index: -1;
  border-left: 2px solid var(--primary-color);
  border-right: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

.comments section {
  padding: 0.5rem;
}

.comments section:not(:first-of-type) {
  border-top: 2px dashed var(--primary-color);
}

.comments .text {
  padding: 0 1rem;
}

.comment-date {
  font-size: 0.9rem;
}
