@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #3a3a3a;

  --text-primary: #e8e8e8;
  --text-secondary: #b8b8b8;
  --text-muted: #8a8a8a;

  --accent-primary: #4a9eff;
  --accent-hover: #6bb0ff;
  --accent-active: #2d7fd9;

  --success: #4ade80;
  --warning: #fbbf24;
  --error: #f87171;

  --border: #404040;
  --shadow: rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 1.2rem;
}

a:not(.btn, .btn-delete):hover {
  color: var(--accent-hover);
}

.title {
  margin-right: auto;

  a {
    font-size: 1.8rem;
    font-weight: 700;
  }
}

nav {
  background-color: var(--bg-secondary);
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px var(--shadow);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.container,
.form-container,
.auth-container {
  margin: 1rem auto;
  padding: 2rem;
}

.container {
  max-width: 1200px;

  &>h1 {
    margin-bottom: 1rem;
  }
}

.post {
  background-color: var(--bg-secondary);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 2px 4px var(--shadow);

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.posts {
  list-style: none;
  padding: 0;
}

.info {
  color: var(--text-secondary);
  margin: 0.5rem 0;
  text-align: right;
}

.actions {
  margin-left: 2rem;
}

.content {
  flex: 0 1 60%;
  margin-right: auto;
  word-break: break-all;
}

.error {
  color: var(--error);
  margin: 0.5rem 0;
}

.btn-delete {
  font-family: inherit;
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  background-color: var(--error);
  color: var(--bg-primary);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s ease;

  &:hover {
    background-color: #f05555;
  }
}

.auth-container {
  max-width: 500px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 2px 4px var(--shadow);

  p {
    margin-bottom: 1rem;
  }
}

.error-message {
  background-color: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
}

.secret-hint {
  color: var(--text-muted);
  font-style: italic;
}

.form-container {
  margin: 2rem auto;
  max-width: 350px;
  background-color: var(--bg-secondary);
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 2px 4px var(--shadow);

  h1 {
    margin-bottom: 1rem;
    text-align: center;
  }
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input {
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem;
  background-color: var(--bg-tertiary);
  border-radius: 3px;
  outline: none;
  border: 2px solid var(--border);
  color: var(--text-primary);
  transition: border 0.3s ease;
  width: 100%;

  &:focus {
    border: 2px solid var(--accent-primary);
  }
}

input::placeholder {
  color: var(--text-muted);
}

textarea {
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem;
  background-color: var(--bg-tertiary);
  border-radius: 3px;
  outline: none;
  border: 2px solid var(--border);
  color: var(--text-primary);
  transition: border 0.3s ease;
  width: 100%;
  min-height: 150px;
  resize: vertical;

  &:focus {
    border: 2px solid var(--accent-primary);
  }
}

.input-container {
  margin-bottom: 0.3rem;
}

.msg {
  color: var(--error);
  visibility: hidden;
  font-size: 0.8rem;
}

.btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.7rem;
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

.msg {
  color: var(--error);
  visibility: hidden;
}

.join-club {
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 2px 4px var(--shadow);
  text-align: center;

  .btn {
    display: inline-block;
    margin-top: 1rem;
  }
}

.redacted {
  filter: blur(6px);
}

@media screen and (max-width: 768px) {
  .post {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .title {
    margin: 0
  }

  .form-container,
  .auth-container {
    width: 90%;
  }
}