/* styles.css */

@font-face {
  font-family: BRSegma;
  src: url(/styles/BRSegma.otf) format("opentype");
}

/* Reset and Basic Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: BRSegma, sans-serif;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body {
  background-color: #000;
  color: #bbb;
  font-size: 15px;
  line-height: 1.4;
}

/* Container */
.container {
  display: none;
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Sidebars */
.sidebar {
  width: 300px;
  padding: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}

/* Logo */
.logo {
  font-size: 22px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 24px;
  width: auto;
}

/* Navigation */

nav ul {
  list-style: none;
  border-radius: 10px;
  padding: 20px;
}

nav li {
  margin-bottom: 15px;
}

nav span {
  text-decoration: none;
  font-size: 19px;
  font-weight: bold;
  display: flex;
  align-items: center;
  cursor: pointer;
}

nav span.active {
  color: #a6b42f;
}

nav span:hover {
  color: #a6b42f;
}

/* Main Feed */
.posts-container {
  flex: 1;
  border-right: 1px solid #333;
  border-left: 1px solid #333;
  min-width: 0;
  margin-bottom: 28px;
}

/* Feed Header */
.feed-header {
  padding: 15px 20px;
  border-bottom: 1px solid #333;
  position: sticky;
  top: 0;
  background-color: #000;
  z-index: 10;
}

.feed-header h1 {
  font-size: 20px;
  font-weight: bold;
}

/* Post */
.post {
  display: flex;
  padding: 15px 20px;
  border-bottom: 1px solid #333;
  cursor: pointer;
  background-color: #000;
}

.post:hover {
  background-color: #111;
}

.full-post {
  padding: 15px 20px;
  margin-bottom: 50px;
  background-color: #000;
}

.full-post article img {
  max-width: 400px;
  margin: 0 auto;
  margin-top: 10px;
  display: block;
  border-radius: 10px;
  opacity: 0.65;
}

.full-post article p {
  margin-bottom: 20px;
}

.full-post article h2 {
  margin-bottom: 10px;
  text-decoration: underline;
  font-size: 18px;
  font-weight: bold;
}

.full-post article ul li {
  margin-bottom: 10px;
  margin-top: 10px;
  margin-left: 20px;
}

.post-icon span {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  margin-right: 10px;
  font-size: 48px;
  font-size: 3rem;
}

.post-content {
  width: 100%;
}

.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.username {
  font-weight: bold;
  margin-right: 5px;
}

.handle {
  color: #8899a6;
  margin-right: 5px;
}

.timestamp {
  color: #8899a6;
}

.post-text {
  margin-bottom: 10px;
  color: #d9d9d9;
}

.post-actions {
  max-width: 100%;
  float: right;
}

.post-actions a {
  background: none;
  border: none;
  color: #8899a6;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
}

.post-actions a:hover {
  color: #a6b42f;
  text-decoration: underline;
}

/* Profile Section */
.profile-section {
  background-color: rgb(10, 10, 10, 0.7);
  border-radius: 10px;
  padding: 12px;
}

.profile-banner img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

.profile-avatar {
  margin-top: -40px;
  margin-left: 12px;
}

.profile-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  border: 4px solid #111;
  background-color: #999;
}

.profile-info {
  margin-top: 10px;
  padding: 0 12px;
}

.profile-name {
  font-size: 19px;
  font-weight: bold;
}

.profile-handle {
  display: block;
  color: #8899a6;
  margin-bottom: 10px;
}

.profile-bio {
  margin-bottom: 10px;
  color: #d9d9d9;
}

.blog-stats {
  display: flex;
  justify-content: space-between;
  color: #8899a6;
  font-size: 13px;
  text-align: center;
}

.blog-stats span {
  font-variant-numeric: slashed-zero;
}

.send-email {
  background-color: transparent;
  border: 1px solid #333;
  color: white;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
}

.send-email:hover {
  background-color: #141414;
}

.emoji {
  filter: grayscale(80%);
}

#detail-content img {
  max-width: 100%;
  margin-top: 10px;
  display: block;
  border-radius: 10px;
  opacity: 0.75;
}

/* Search Container */
.search-container {
  margin: 0;
  padding: 0;
}

#search-input {
  width: 100%;
  padding: 12px 20px;
  background-color: #111;
  border: 1px solid #333;
  border-radius: 10px;
  color: #d9d9d9;
  font-size: 15px;
}

#search-input::placeholder {
  color: #8899a6;
}

#search-input:focus {
  outline: none;
  border-color: #a6b42f;
}

/* Media Player */

#player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#player-content {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 550px;
  width: 100%;
  justify-content: center;
}

.controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.controls button {
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition:
    background 0.18s,
    transform 0.08s;
}

.controls button:hover {
  background: #444;
}

.controls button:active {
  background: #555;
}

.controls button svg,
#player-content svg {
  width: 28px;
  height: 28px;
  fill: #bbb;
  position: relative;
  top: 2px;
  left: 2px;
}

#play .pause-icon {
  display: none;
}

#play.playing .play-icon {
  display: none;
}

#play.playing .pause-icon {
  display: block;
}

#song-title {
  text-align: center;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

#song-title::after {
  content: var(--song-title);
  position: absolute;
  bottom: 35px;
  background: black;
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
  display: none;
  background-color: #222;
  border-radius: 5px;
}

#song-title:hover::after {
  display: block;
}

#volume {
  width: 80px;
  height: 3px;
  appearance: none;
  background: #555;
  border-radius: 2px;
  cursor: pointer;
}

#volume::-webkit-slider-thumb {
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
}

#volume::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
}

#spectrum {
  border-radius: 5px;
  border: 1px dashed #333;
  margin: 0px;
  padding: 0px;
}

/* Tag Cloud */

.tag-cloud {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.tag:hover {
  color: #ddd;
}

.tag {
  margin: 10px;
  cursor: pointer;
  color: #a6b42f;
}

.tag-small {
  font-size: 12px;
}

.tag-medium {
  font-size: 16px;
}

.tag-large {
  font-size: 20px;
}

/* Starfield */

canvas#starfield,
canvas#shootingstars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

canvas#shootingstars {
  z-index: -10000;
}

canvas#starfield {
  z-index: -10001;
}

/* Media Queries */

@media (max-width: 1024px) {
  .container {
    flex-direction: column;
    max-width: 100%;
    padding: 0 10px;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 15px;
  }

  .posts-container {
    border-left: none;
    border-right: none;
    margin-bottom: 0;
  }

  .feed-header {
    padding: 10px 15px;
  }

  .post {
    padding: 10px 15px;
  }

  .full-post {
    padding: 10px 15px;
  }

  .profile-section {
    padding: 10px;
  }

  .profile-banner img {
    height: 80px;
  }

  .profile-avatar {
    margin-top: -30px;
    margin-left: 10px;
  }

  .profile-avatar img {
    width: 70px;
    height: 70px;
  }

  .profile-info {
    padding: 0 10px;
  }

  .send-email {
    padding: 10px 15px;
  }

  #search-input {
    padding: 10px 15px;
  }

  .tag-cloud {
    justify-content: flex-start;
  }

  .tag {
    margin: 5px;
  }
}

@media (max-width: 768px) {
  .logo img {
    height: 20px;
  }

  nav ul {
    padding: 15px;
  }

  nav li {
    margin-bottom: 10px;
  }

  .post-icon span {
    width: 40px;
    height: 40px;
  }

  .post-text {
    margin-bottom: 8px;
  }

  .full-post article img {
    max-width: 100%;
  }

  #player {
    height: 40px;
  }

  #player-content {
    gap: 8px;
  }

  .controls button {
    width: 20px;
    height: 20px;
  }

  .controls button svg,
  #player-content svg {
    width: 24px;
    height: 24px;
  }

  #song-title {
    max-width: 150px;
  }

  #volume {
    width: 60px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 5px;
  }

  .sidebar {
    padding: 10px;
  }

  nav li {
    float: left;
    margin-right: 20px;
  }

  nav li span {
    font-size: 16px;
  }

  .feed-header {
    padding: 8px 10px;
  }

  .post-header {
    font-size: 14px;
  }

  .post {
    padding: 10px 15px;
  }

  .post-icon {
    display: none;
  }

  .full-post {
    padding: 8px 10px;
  }

  .full-post article ul li {
    margin-left: 15px;
  }

  .profile-banner img {
    height: 60px;
  }

  .profile-avatar {
    margin-top: -25px;
    margin-left: 8px;
  }

  .profile-avatar img {
    width: 60px;
    height: 60px;
    border-width: 3px;
  }

  .profile-info {
    margin-top: 5px;
    padding: 0 8px;
  }

  .send-email {
    padding: 8px 12px;
  }

  #search-input {
    padding: 8px 12px;
  }

  #player-content {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }

  #song-title {
    max-width: 120px;
  }

  .controls {
    gap: 4px;
  }

  .tag {
    margin: 4px;
  }
}
