/* Estilos estilo Needy Streamer Overload - Finestres */

/* Reset bàsic */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

/* Variables de colors */
:root {
  --nso-bg: #1a1a2e;
  --nso-window-bg: #2d2d44;
  --nso-title-bg: #4a4a6e;
  --nso-border: #6b6b9e;
  --nso-text: #e0e0e0;
  --nso-accent: #ff6b9d;
}

/* Finestra base */
.window {
  background: var(--nso-window-bg);
  border: 2px solid var(--nso-border);
  border-radius: 0;
  margin-bottom: 20px;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* Títol de la finestra */
.window .title {
  background: var(--nso-title-bg);
  border-bottom: 2px solid var(--nso-border);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  color: var(--nso-text);
  font-size: 14px;
  text-transform: lowercase;
  font-family: 'Courier New', monospace;
}

.window .title span {
  flex: 1;
}

/* Icones per als títols */
.ico-bio::before {
  content: "👤";
  margin-right: 4px;
}

.ico-music::before {
  content: "🎵";
  margin-right: 4px;
}

.ico-blog::before {
  content: "📝";
  margin-right: 4px;
}

.ico-comments::before {
  content: "💬";
  margin-right: 4px;
}

.ico-link::before {
  content: "🔗";
  margin-right: 4px;
}

.ico-contact::before {
  content: "📧";
  margin-right: 4px;
}

/* Contingut de la finestra */
.window .content {
  padding: 12px;
  color: var(--nso-text);
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  background: var(--nso-window-bg);
}

.window .content p {
  margin: 8px 0;
}

.window .content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--nso-border);
}

.window .content a {
  color: var(--nso-accent);
  text-decoration: none;
}

.window .content a:hover {
  text-decoration: underline;
}

/* Bio específica */
#pfp {
  width: 80px;
  height: 80px;
  border-radius: 0;
  border: 2px solid var(--nso-border);
  float: left;
  margin-right: 12px;
  margin-bottom: 8px;
  image-rendering: pixelated;
}

.subtitle {
  font-weight: bold;
  color: var(--nso-accent);
}

/* Reproductor de música */
.music-iframe-container {
  padding: 0;
  min-height: 120px;
}

.music-iframe-container iframe {
  border: none;
  width: 100%;
  height: 100%;
  display: block;
}

#media-container {
  width: 100%;
  min-height: 80px;
  background: var(--nso-bg);
}

#media-container.video-mode {
  min-height: 400px;
  max-height: 600px;
}

.media-player {
  background: var(--nso-bg);
  width: 100%;
}

#audio-player {
  height: 50px;
}

#video-player {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  background: #000;
}

#video-player[style*="display: block"] {
  min-height: 400px;
}

/* Blog feed */
.blog-frame {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.blog-post {
  border-bottom: 1px solid var(--nso-border);
  padding: 12px 0;
  margin-bottom: 12px;
}

.blog-post:last-child {
  border-bottom: none;
}

.blog-post-title {
  font-weight: bold;
  color: var(--nso-accent);
  margin-bottom: 6px;
  font-size: 14px;
}

.blog-post-date {
  color: #888;
  font-size: 11px;
  margin-bottom: 8px;
}

.blog-post-content {
  color: var(--nso-text);
  font-size: 12px;
  line-height: 1.5;
}

.blog-post-content img {
  max-width: 100%;
  margin: 8px 0;
  border: 1px solid var(--nso-border);
}

/* Comentaris */
.comments-list {
  max-height: 400px;
  overflow-y: auto;
}

.comment-item {
  border-bottom: 1px solid var(--nso-border);
  padding: 10px 0;
  margin-bottom: 10px;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.comment-author {
  font-weight: bold;
  color: var(--nso-accent);
  font-size: 12px;
}

.comment-date {
  color: #888;
  font-size: 10px;
}

.comment-body {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.no-comments {
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 20px;
  font-size: 11px;
}

/* Formulari de comentaris */
.comment-form {
  margin-top: 12px;
}

.comment-input, .comment-textarea {
  width: 100%;
  padding: 6px;
  margin-bottom: 8px;
  background: var(--nso-bg);
  border: 1px solid var(--nso-border);
  color: var(--nso-text);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  box-sizing: border-box;
}

.comment-textarea {
  resize: vertical;
  min-height: 60px;
}

.comment-btn {
  padding: 6px 12px;
  background: var(--nso-accent);
  border: 1px solid var(--nso-border);
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  cursor: pointer;
  font-weight: bold;
}

.comment-btn:hover {
  background: #ff8bb3;
}

.delete-comment-btn {
  padding: 4px 8px;
  background: #ff4444;
  border: 1px solid var(--nso-border);
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  cursor: pointer;
  margin-top: 4px;
}

.delete-comment-btn:hover {
  background: #ff6666;
}

/* Body principal */
.nso-body {
  background: var(--nso-bg);
  color: var(--nso-text);
  font-family: 'Courier New', monospace;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Layout principal */
.nso-layout {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.nso-left, .nso-middle, .nso-right {
  display: flex;
  flex-direction: column;
}

/* Estils per a la playlist */
.playlist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.playlist-item {
  background: var(--nso-bg);
  border: 1px solid var(--nso-border);
  padding: 8px;
  margin: 6px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.playlist-item.active {
  background: rgba(255, 107, 157, 0.2);
  border-color: var(--nso-accent);
}

.playlist-song-name {
  flex: 1;
  color: var(--nso-text);
}

.playlist-controls {
  display: flex;
  gap: 6px;
}

.play-btn, .remove-btn {
  padding: 4px 8px;
  border: 1px solid var(--nso-border);
  background: var(--nso-title-bg);
  color: var(--nso-text);
  cursor: pointer;
  font-size: 10px;
  font-family: 'Courier New', monospace;
}

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

.remove-btn {
  background: #ff4444;
  color: #fff;
}

.remove-btn:hover {
  background: #ff6666;
}

.empty-playlist {
  color: #888;
  font-style: italic;
  padding: 12px;
  text-align: center;
  font-size: 11px;
}

.current-track {
  padding: 8px 12px;
  background: var(--nso-bg);
  border-bottom: 1px solid var(--nso-border);
  font-size: 11px;
  color: var(--nso-accent);
  font-weight: bold;
}

/* Aquests estils ja estan definits més amunt */

/* Responsive */
@media screen and (max-width: 1024px) {
  .nso-layout {
    grid-template-columns: 1fr;
  }
}

/* Scrollbar personalitzat */
.blog-frame::-webkit-scrollbar,
.window .content::-webkit-scrollbar {
  width: 8px;
}

.blog-frame::-webkit-scrollbar-track,
.window .content::-webkit-scrollbar-track {
  background: var(--nso-bg);
}

.blog-frame::-webkit-scrollbar-thumb,
.window .content::-webkit-scrollbar-thumb {
  background: var(--nso-border);
  border-radius: 4px;
}

.blog-frame::-webkit-scrollbar-thumb:hover,
.window .content::-webkit-scrollbar-thumb:hover {
  background: var(--nso-accent);
}

