/* Because of time constraints created with the help of Chat GPT (adapted) */
:root {
    --background-color: #121212;
    --background-accent-color: #1f1f1f;
    --button-color: #3e1eca;
    --box-shadow-color: rgba(0, 0, 0, 0.5);
    --input-field-background-color: #2c2c2c;
    --border-color: #333;
    --highlight-color: #2c2c2c;
    --font-color: #ffffff;
    --error-color: var(--button-color); /*Alternative: #ff4c4c */
    
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--font-color);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-accent-color);
    padding: 1rem 2rem;
    box-shadow: 0 25px 50px var(--box-shadow-color);
}

.logo {
    display: flex;
    align-items: center;
    margin: -10px 0;
    cursor: pointer;
}

.logo p {
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 15px;
}
.logo img {
    height: 3rem;
}

.buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2vw;
}

.buttons a {
    color: #9c009c;
    text-decoration-line: none;
}

.buttons a:hover {
    color: #480048;
    text-decoration-line: underline;
    transition: decoration 0.2s ease-in-out;
}

#loginBtn {
    background-color: var(--button-color);
    color: var(--font-color);
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

main h1 {
    margin-top: 4rem;
}

 /* -------------- Video Section -------------- */

.video-section {
    margin-top: 2.5rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: stretch;
    height: auto;
    height: 20rem;
}

.video-player, .video-suggestions {
  flex: 8;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}
.video-player {
    width: 75%;
}

.video-player video {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.video-suggestions {
  flex: 3;
  background-color: var(--background-accent-color);
  padding: 1rem;
  border-radius: 8px;
  max-height: 100%;
  overflow-y: auto;
}

.video-suggestions ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.video-suggestions li {
  display: flex;
  margin-bottom: 1rem;
  cursor: pointer;
  align-items: center;
  transition: background-color 0.3s;
  border-radius: 4px;
  padding: 0.25rem;
  min-height: 4rem;
}

.video-suggestions li:hover {
  background-color: var(--highlight-color);
}

.video-suggestions img {
  width: 6rem;
  height: 4rem;
  object-fit: cover;
  margin-right: 0.5rem;
  border-radius: 4px;
  flex-shrink: 0; /* Prevent image from shrinking */
}

.video-suggestions p {
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  color: var(--font-color);
}

 /* -------------- Comment Section -------------- */

.comments-section {
    background-color: var(--background-accent-color);
    padding: 1rem;
    border-radius: 8px;
}

.comments-section h2 {
    margin-top: 0;
}


#commentForm {
    border: 2px solid var(--border-color);
    border-radius: 5px;
    padding: 0.5rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

#commentForm textarea {
    height: 40px;
    resize: none;
    overflow: hidden;
}

#commentForm input,
#commentForm textarea {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background-color: var(--input-field-background-color);
    color: var(--font-color);
}

#commentForm div {
    padding-bottom: 0.5rem;
}

#commentForm div b {
    margin-left: 10px;
}

#commentForm #spoilerHeader {
    display: none;
    margin-bottom: 1rem;
}

#commentForm button {
    background-color: var(--button-color);
    color: var(--font-color);
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.comment {
    margin-top: 1rem;
    padding: 0.75rem;
}
.userComment {
    border-radius: 5px;
    animation: newComment 1.25s ease-out forwards;
}

@keyframes newComment {
    0% {
        background-color: transparent;
    }
    25% {
        background-color: var(--highlight-color);
    }
    50% {
        background-color: transparent;
    }
    75% {
        background-color: var(--highlight-color);
    }
    100% {
        background-color: transparent;
    }
}

.comment + .comment {
    border-top: 1px solid var(--border-color);
    
}

.comment p {
    margin-left: 20px;
}

.spoiler {
  color: transparent;
  background-color: var(--box-shadow-color);
  cursor: default;
  transition: color 0.5s;
  margin-left: 5px;
}

.spoiler:hover {
  color: var(--font-color);
}

 /* -------------- Login Section -------------- */

.login-section {
    background-color: var(--background-accent-color);
    padding: 1rem;
    border-radius: 8px;
}

#loginForm {
    padding: 0 0.4rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#loginForm input {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background-color: var(--input-field-background-color);
    color: var(--font-color);
}

#loginForm button {
    background-color: var(--button-color);
    color: var(--font-color);
    border: none;
    padding: 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 2rem;
    font-weight: bold;
    font-size: 1.125rem;
}

.error-message {
    color: var(--error-color);
    font-weight: bold;
    margin-top: 1rem;
    animation: errorFlash 1.25s ease-out forwards;
}

@keyframes errorFlash {
    25% {
        filter: brightness(2);
        scale: 1.2;
    }
    50% {
        filter: brightness(1);
        scale: 1;
    }
    75% {
        filter: brightness(1.5);
        scale: 1.1;
    }
    100% {
        filter: brightness(1);
        scale: 1;
    }
}

/* -------------- Credits Section -------------- */

.credits-section {
    display: flex;
    align-items: center;
    height: 74vh;
}

.credits-section table {
    margin-top: 10vh;
    width: 100%;
    font-size: 4.5vh;
    line-height: 3;
    border-collapse: separate;
    border-spacing: 3vw 0;
}