/* Global layout & theme */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: #ffffff;
  overflow: hidden;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><line x1="10" y1="3" x2="10" y2="17" stroke="#ffffff" stroke-width="2.5" stroke-opacity="1" stroke-linecap="round"/><line x1="3" y1="10" x2="17" y2="10" stroke="#ffffff" stroke-width="2.5" stroke-opacity="1" stroke-linecap="round"/></svg>') 10 10, url('cursor.svg') 10 10, crosshair;
}

/* Text selection styling */
::selection {
  background-color: rgba(120, 120, 120, 0.5);
  color: #ffffff;
}

::-moz-selection {
  background-color: rgba(120, 120, 120, 0.5);
  color: #ffffff;
}

body.home-page {
  position: relative;
}

body.home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("NVIDIA_Overlay_bRp7ELKCGY.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.8);
  z-index: -1;
  pointer-events: none;
}

body.profile-page {
  background-image: url("NVIDIA_Overlay_bRp7ELKCGY.jpg");
}

.background-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 0;
}

/* Top bar (Windows-style) */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 42px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(80, 80, 80, 0.6);
  z-index: 20;
}

.top-bar-spacer {
  flex: 1;
}

.start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 6px 18px rgba(0, 0, 0, 0.7);
  cursor: none;
  padding: 5px;
  outline: none;
  box-sizing: border-box;
}

.start-button:focus-visible {
  outline: 2px solid rgba(120, 120, 120, 0.7);
  outline-offset: 3px;
}

.start-button:hover {
  border-color: rgba(120, 120, 120, 0.8);
  box-shadow: 0 0 0 1px rgba(120, 120, 120, 0.4),
    0 10px 26px rgba(0, 0, 0, 0.85);
  transform: translateY(-1px);
}

.start-button:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(100, 100, 100, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.85) inset;
}

.win-logo {
  position: relative;
  width: 16px;
  height: 16px;
  display: grid;
  grid-template-columns: 7px 7px;
  grid-template-rows: 7px 7px;
  gap: 2px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.win-logo .pane {
  background: #ffffff;
  width: 100%;
  height: 100%;
  display: block;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.top-bar-auth {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 12px;
}

.user-info-main {
  font-size: 0.85rem;
  color: rgba(200, 200, 200, 0.95);
}

.user-info-main.hidden {
  display: none;
}

.auth-buttons-main {
  display: flex;
  gap: 8px;
}

.login-button-main,
.signup-button-main {
  padding: 6px 14px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid rgba(80, 80, 80, 0.6);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: none;
  transition: all 0.12s ease-out;
  font-family: inherit;
}

.login-button-main:hover,
.signup-button-main:hover {
  background: rgba(30, 30, 30, 0.95);
  border-color: rgba(120, 120, 120, 0.7);
  transform: translateY(-1px);
}

.top-bar-clock {
  min-width: 96px;
  text-align: right;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui,
    sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  color: #ffffff;
}

/* Start menu panel */
.start-menu {
  position: fixed;
  top: 46px;
  left: 10px;
  width: 260px;
  max-width: calc(100% - 20px);
  background: rgba(0, 0, 0, 0.98);
  border-radius: 14px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(24px);
  transform-origin: top left;
  transform: scale(0.96) translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease-out, transform 0.16s ease-out;
  z-index: 25;
}

.start-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

.start-menu-inner {
  padding: 14px 14px 12px;
}

.start-menu-section {
  margin-bottom: 12px;
}

.start-menu-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: #ffffff;
  text-align: center;
}

.start-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.start-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  text-decoration: none;
  color: #ffffff;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid rgba(80, 80, 80, 0.4);
  font-size: 0.85rem;
  transition: background 0.16s ease-out, transform 0.12s ease-out,
    box-shadow 0.12s ease-out, border-color 0.12s ease-out;
}

.start-menu-item.hidden {
  display: none;
}

.start-menu-item:hover {
  background: rgba(30, 30, 30, 0.95);
  box-shadow: 0 0 0 1px rgba(120, 120, 120, 0.5),
    0 12px 34px rgba(0, 0, 0, 0.9);
  transform: translateY(-1px);
  border-color: rgba(120, 120, 120, 0.7);
}

.start-menu-label {
  flex: 1;
}

/* Desktop main content */
.desktop-main {
  position: relative;
  z-index: 1;
  height: 100%;
  padding-top: 52px;
  padding-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-title {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-align: center;
}

/* Custom cursor for all elements */
* {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><line x1="10" y1="3" x2="10" y2="17" stroke="#ffffff" stroke-width="2.5" stroke-opacity="1" stroke-linecap="round"/><line x1="3" y1="10" x2="17" y2="10" stroke="#ffffff" stroke-width="2.5" stroke-opacity="1" stroke-linecap="round"/></svg>') 10 10, url('cursor.svg') 10 10, crosshair;
}

/* Profile page (guns.lol style) */
.profile-root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 200px;
}

.profile-card {
  width: 100%;
  max-width: 420px;
  background: rgba(0, 0, 0, 0.96);
  border-radius: 26px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
  padding: 22px 20px 20px;
  backdrop-filter: blur(24px);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid rgba(80, 80, 80, 0.8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-text-main {
  flex: 1;
}

.profile-username {
  font-size: 1.1rem;
  font-weight: 650;
  color: #ffffff;
}

.profile-handle {
  font-size: 0.82rem;
  color: rgba(200, 200, 200, 0.98);
}

.profile-tagline {
  font-size: 0.8rem;
  color: rgba(180, 180, 180, 0.96);
  margin-top: 4px;
}

.profile-divider {
  height: 1px;
  background: rgba(80, 80, 80, 0.6);
  margin: 12px 0 10px;
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 16px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid rgba(80, 80, 80, 0.4);
  color: #ffffff;
  font-size: 0.84rem;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
    border-color 0.12s ease-out, background 0.12s ease-out;
}

.profile-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.85);
  border-color: rgba(120, 120, 120, 0.7);
  background: rgba(30, 30, 30, 0.95);
}

.profile-link-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: #0b1220;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-link-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.profile-link-label-main {
  font-weight: 520;
  color: #ffffff;
}

.profile-link-label-sub {
  font-size: 0.72rem;
  color: rgba(180, 180, 180, 0.98);
}

.profile-link-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.profile-link-like {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: none;
  color: rgba(150, 150, 150, 0.8);
  transition: color 0.12s ease-out, background 0.12s ease-out, transform 0.12s ease-out;
  flex-shrink: 0;
  margin-left: auto;
}

.profile-link-like:hover {
  color: rgba(200, 200, 200, 0.95);
  background: rgba(40, 40, 40, 0.6);
  transform: scale(1.05);
}

.profile-link-like:active {
  transform: scale(0.95);
}

.profile-link-like.liked {
  color: rgba(180, 180, 180, 0.95);
}

.profile-link-like.liked .like-icon {
  fill: rgba(180, 180, 180, 0.95);
  stroke: rgba(180, 180, 180, 0.95);
}

.profile-link-like:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.like-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  transition: fill 0.12s ease-out, stroke 0.12s ease-out;
}

.like-count {
  font-size: 0.72rem;
  font-weight: 500;
  color: currentColor;
  min-width: 12px;
  text-align: center;
}

.profile-footer-note {
  margin-top: 10px;
  font-size: 0.72rem;
  color: rgba(160, 160, 160, 0.85);
  text-align: right;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .desktop-grid {
    grid-template-columns: 1fr;
  }

  .desktop-card {
    padding: 16px 14px 14px;
  }

  .profile-card {
    padding: 18px 16px 16px;
  }
}

/* Custom Modal Styles */
.custom-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.custom-modal.hidden {
  display: none;
}

.custom-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.custom-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.custom-modal-content {
  position: relative;
  background: rgba(0, 0, 0, 0.98);
  border-radius: 20px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(24px);
  width: 90%;
  max-width: 400px;
  transform: scale(0.95) translateY(-10px);
  transition: transform 0.2s ease-out;
  z-index: 1001;
}

.custom-modal.active .custom-modal-content {
  transform: scale(1) translateY(0);
}

.custom-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(80, 80, 80, 0.6);
}

.custom-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.custom-modal-close {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: none;
  color: rgba(150, 150, 150, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.12s ease-out, background 0.12s ease-out;
  width: 28px;
  height: 28px;
}

.custom-modal-close:hover {
  color: rgba(200, 200, 200, 0.95);
  background: rgba(40, 40, 40, 0.6);
}

.custom-modal-close svg {
  width: 18px;
  height: 18px;
}

.custom-modal-body {
  padding: 20px 22px;
}

.custom-modal-message {
  font-size: 0.9rem;
  color: rgba(200, 200, 200, 0.95);
  margin: 0;
  line-height: 1.5;
}

.custom-modal-footer {
  padding: 16px 22px 20px;
  border-top: 1px solid rgba(80, 80, 80, 0.6);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.custom-modal-button {
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  background: rgba(20, 20, 20, 0.9);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: none;
  transition: background 0.12s ease-out, border-color 0.12s ease-out, transform 0.12s ease-out;
}

.custom-modal-button:hover {
  background: rgba(30, 30, 30, 0.95);
  border-color: rgba(120, 120, 120, 0.7);
  transform: translateY(-1px);
}

.custom-modal-button:active {
  transform: translateY(0);
}

.cancel-btn-main {
  background: transparent;
  border-color: rgba(80, 80, 80, 0.4);
  color: rgba(200, 200, 200, 0.9);
}

.cancel-btn-main:hover {
  border-color: rgba(120, 120, 120, 0.7);
  color: #ffffff;
}

.auth-form-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-main label {
  font-size: 0.85rem;
  color: rgba(200, 200, 200, 0.95);
  font-weight: 500;
}

.form-group-main input[type="text"],
.form-group-main input[type="password"] {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  background: rgba(20, 20, 20, 0.9);
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.12s ease-out, background 0.12s ease-out;
}

.form-group-main input[type="text"]:focus,
.form-group-main input[type="password"]:focus {
  outline: none;
  border-color: rgba(120, 120, 120, 0.7);
  background: rgba(30, 30, 30, 0.95);
}

.checkbox-group-main {
  margin: 4px 0;
}

.checkbox-label-main {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: none;
  font-size: 0.85rem;
  color: rgba(200, 200, 200, 0.95);
}

.checkbox-label-main input[type="checkbox"] {
  display: none;
}

.checkbox-custom-main {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  border-radius: 4px;
  background: rgba(20, 20, 20, 0.9);
  position: relative;
  transition: all 0.12s ease-out;
}

.checkbox-label-main input[type="checkbox"]:checked + .checkbox-custom-main {
  background: rgba(120, 120, 120, 0.8);
  border-color: rgba(120, 120, 120, 0.8);
}

.checkbox-label-main input[type="checkbox"]:checked + .checkbox-custom-main::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-error-main {
  padding: 10px;
  background: rgba(255, 100, 100, 0.1);
  border: 1px solid rgba(255, 100, 100, 0.3);
  border-radius: 8px;
  color: rgba(255, 150, 150, 0.95);
  font-size: 0.85rem;
}

.auth-error-main.hidden {
  display: none;
}

/* Music Player */
.music-player {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 64px);
  max-width: 600px;
  min-height: 160px;
  background: rgba(0, 0, 0, 0.98);
  border: 1px solid rgba(80, 80, 80, 0.6);
  border-radius: 24px;
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(80, 80, 80, 0.3);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.music-player-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.music-player-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.music-player-title-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.music-player-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  flex: 1;
  min-width: 0;
  padding-right: 60px;
  padding-left: 60px;
}

.music-player-like {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: inherit;
  color: rgba(150, 150, 150, 0.8);
  transition: color 0.12s ease-out, background 0.12s ease-out, transform 0.12s ease-out;
  flex-shrink: 0;
}

.music-player-like:hover {
  color: rgba(200, 200, 200, 0.95);
  background: rgba(40, 40, 40, 0.6);
  transform: scale(1.05);
}

.music-player-like:active {
  transform: scale(0.95);
}

.music-player-like.liked {
  color: rgba(180, 180, 180, 0.95);
}

.music-player-like.liked .like-icon {
  fill: rgba(180, 180, 180, 0.95);
  stroke: rgba(180, 180, 180, 0.95);
}

.music-player-like:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.music-player-like .like-icon {
  width: 16px;
  height: 16px;
}

.music-player-like .like-count {
  font-size: 0.75rem;
  font-weight: 500;
}

.music-player-artist {
  font-size: 0.8rem;
  color: rgba(180, 180, 180, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-player-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.music-player-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(80, 80, 80, 0.4);
  border-radius: 2px;
  cursor: inherit;
  position: relative;
  overflow: hidden;
}

.music-player-progress-fill {
  height: 100%;
  background: rgba(150, 150, 150, 0.8);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.music-player-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(180, 180, 180, 0.9);
}

.music-player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  position: relative;
}

.music-player-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid rgba(80, 80, 80, 0.6);
  color: rgba(200, 200, 200, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: all 0.12s ease-out;
  padding: 0;
}

.music-player-btn:hover {
  background: rgba(30, 30, 30, 0.95);
  border-color: rgba(120, 120, 120, 0.7);
  color: #ffffff;
  transform: scale(1.05);
}

.music-player-btn:active {
  transform: scale(0.95);
}

.play-pause-btn {
  width: 56px;
  height: 56px;
  background: rgba(40, 40, 40, 0.9);
  border-color: rgba(100, 100, 100, 0.7);
}

.play-pause-btn:hover {
  background: rgba(50, 50, 50, 0.95);
}

.music-player-btn svg {
  width: 20px;
  height: 20px;
}

.play-pause-btn svg {
  width: 24px;
  height: 24px;
}

.music-player-btn .hidden {
  display: none;
}



.music-player-iframe-container {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Chatroom Styles */
.chatroom-modal-content {
  max-width: 900px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.chatroom-container {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.chatroom-sidebar {
  width: 200px;
  background: rgba(10, 10, 10, 0.95);
  border-right: 1px solid rgba(80, 80, 80, 0.6);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.chatroom-channels {
  padding: 12px 8px;
}

.chatroom-channel-header {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(150, 150, 150, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  margin-bottom: 4px;
}

.chatroom-channel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: none;
  color: rgba(180, 180, 180, 0.9);
  font-size: 0.85rem;
  transition: background 0.12s ease-out, color 0.12s ease-out;
  margin-bottom: 2px;
}

.chatroom-channel-item:hover {
  background: rgba(30, 30, 30, 0.6);
  color: rgba(220, 220, 220, 0.95);
}

.chatroom-channel-item.active {
  background: rgba(50, 50, 50, 0.8);
  color: #ffffff;
}

.chatroom-channel-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.chatroom-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chatroom-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0;
}

.chatroom-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  max-height: 500px;
}

.chatroom-message {
  padding: 12px 16px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid rgba(80, 80, 80, 0.4);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chatroom-message.own-message {
  background: rgba(40, 40, 40, 0.9);
  border-color: rgba(100, 100, 100, 0.6);
  align-self: flex-end;
  max-width: 80%;
}

.chatroom-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chatroom-username {
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(200, 200, 200, 0.95);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chatroom-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(120, 120, 120, 0.6);
  border: 1px solid rgba(150, 150, 150, 0.4);
  color: rgba(200, 200, 200, 0.95);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><line x1="10" y1="3" x2="10" y2="17" stroke="#ffffff" stroke-width="2.5" stroke-opacity="1" stroke-linecap="round"/><line x1="3" y1="10" x2="17" y2="10" stroke="#ffffff" stroke-width="2.5" stroke-opacity="1" stroke-linecap="round"/></svg>') 10 10, url('cursor.svg') 10 10, crosshair;
  flex-shrink: 0;
  transition: background 0.12s ease-out, border-color 0.12s ease-out, color 0.12s ease-out;
}

.chatroom-verified-badge:hover {
  background: rgba(150, 150, 150, 0.8);
  border-color: rgba(180, 180, 180, 0.6);
  color: #ffffff;
}

.chatroom-time {
  font-size: 0.75rem;
  color: rgba(150, 150, 150, 0.8);
}

.chatroom-message-text {
  font-size: 0.9rem;
  color: #ffffff;
  line-height: 1.5;
  word-wrap: break-word;
}

.chatroom-input-container {
  padding: 16px 20px;
  border-top: 1px solid rgba(80, 80, 80, 0.6);
  background: rgba(10, 10, 10, 0.95);
  position: relative;
}

.chatroom-cooldown {
  position: absolute;
  top: -30px;
  left: 20px;
  right: 20px;
  padding: 6px 12px;
  background: rgba(255, 100, 100, 0.1);
  border: 1px solid rgba(255, 100, 100, 0.3);
  border-radius: 6px;
  color: rgba(255, 150, 150, 0.95);
  font-size: 0.8rem;
  text-align: center;
}

.chatroom-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chatroom-upload-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  background: rgba(20, 20, 20, 0.9);
  color: rgba(200, 200, 200, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: background 0.12s ease-out, border-color 0.12s ease-out, transform 0.12s ease-out;
  padding: 0;
  flex-shrink: 0;
}

.chatroom-upload-btn:hover:not(:disabled) {
  background: rgba(30, 30, 30, 0.95);
  border-color: rgba(120, 120, 120, 0.7);
  transform: translateY(-1px);
}

.chatroom-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chatroom-upload-btn svg {
  width: 18px;
  height: 18px;
}

.chatroom-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  background: rgba(20, 20, 20, 0.9);
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.12s ease-out, background 0.12s ease-out;
}

.chatroom-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(15, 15, 15, 0.9);
}

.chatroom-input:focus {
  outline: none;
  border-color: rgba(120, 120, 120, 0.7);
  background: rgba(30, 30, 30, 0.95);
}

.chatroom-send-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  background: rgba(40, 40, 40, 0.9);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: none;
  transition: background 0.12s ease-out, border-color 0.12s ease-out, transform 0.12s ease-out;
  white-space: nowrap;
}

.chatroom-send-btn:hover {
  background: rgba(50, 50, 50, 0.95);
  border-color: rgba(120, 120, 120, 0.7);
  transform: translateY(-1px);
}

.chatroom-send-btn:active {
  transform: translateY(0);
}

.chatroom-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chatroom-error {
  padding: 20px;
  text-align: center;
  color: rgba(255, 150, 150, 0.95);
  font-size: 0.85rem;
}

.chatroom-media-container {
  position: relative;
  margin: 8px 0;
  border-radius: 8px;
  overflow: hidden;
  max-width: 100%;
  display: inline-block;
}

.chatroom-image {
  max-width: 100%;
  max-height: 400px;
  display: block;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.12s ease-out;
}

.chatroom-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.12s ease-out;
  border-radius: 8px;
}

.chatroom-media-container:hover .chatroom-image-overlay {
  opacity: 1;
}

.chatroom-download-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(120, 120, 120, 0.7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: all 0.12s ease-out;
  text-decoration: none;
}

.chatroom-download-btn:hover {
  background: rgba(30, 30, 30, 0.95);
  transform: scale(1.1);
}

.chatroom-download-btn svg {
  width: 20px;
  height: 20px;
}

.chatroom-message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  position: relative;
}

.chatroom-message-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.12s ease-out;
}

.chatroom-message:hover .chatroom-message-actions {
  opacity: 1;
}

.chatroom-message-action {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(80, 80, 80, 0.6);
  color: rgba(150, 150, 150, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><line x1="10" y1="3" x2="10" y2="17" stroke="#ffffff" stroke-width="2.5" stroke-opacity="1" stroke-linecap="round"/><line x1="3" y1="10" x2="17" y2="10" stroke="#ffffff" stroke-width="2.5" stroke-opacity="1" stroke-linecap="round"/></svg>') 10 10, url('cursor.svg') 10 10, crosshair;
  transition: all 0.12s ease-out;
  padding: 0;
  flex-shrink: 0;
}

.chatroom-message-action:hover {
  background: rgba(40, 40, 40, 0.8);
  border-color: rgba(120, 120, 120, 0.7);
  color: #ffffff;
}

.chatroom-message-action svg {
  width: 14px;
  height: 14px;
}

.chatroom-report-btn {
  color: rgba(150, 150, 150, 0.8);
}

.chatroom-report-btn:hover {
  color: rgba(255, 200, 100, 0.9);
  border-color: rgba(255, 200, 100, 0.5);
}

.chatroom-delete-btn {
  color: rgba(150, 150, 150, 0.8);
}

.chatroom-delete-btn:hover {
  color: rgba(255, 100, 100, 0.9);
  border-color: rgba(255, 100, 100, 0.5);
}

.chatroom-textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  background: rgba(20, 20, 20, 0.9);
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.12s ease-out, background 0.12s ease-out;
}

.chatroom-textarea:focus {
  outline: none;
  border-color: rgba(120, 120, 120, 0.7);
  background: rgba(30, 30, 30, 0.95);
}

.chatroom-textarea::placeholder {
  color: rgba(150, 150, 150, 0.6);
}

/* Custom Notification Toast */
.custom-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  min-width: 300px;
  max-width: 500px;
  opacity: 0;
  transform: translateX(400px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  pointer-events: none;
}

.custom-notification.hidden {
  display: none;
}

.custom-notification.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.custom-notification-content {
  background: rgba(0, 0, 0, 0.98);
  border: 1px solid rgba(80, 80, 80, 0.6);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(80, 80, 80, 0.3);
  backdrop-filter: blur(24px);
}

.custom-notification-message {
  flex: 1;
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.5;
}

.custom-notification-close {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: rgba(200, 200, 200, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><line x1="10" y1="3" x2="10" y2="17" stroke="#ffffff" stroke-width="2.5" stroke-opacity="1" stroke-linecap="round"/><line x1="3" y1="10" x2="17" y2="10" stroke="#ffffff" stroke-width="2.5" stroke-opacity="1" stroke-linecap="round"/></svg>') 10 10, url('cursor.svg') 10 10, crosshair;
  transition: all 0.12s ease-out;
  padding: 0;
  flex-shrink: 0;
}

.custom-notification-close:hover {
  background: rgba(40, 40, 40, 0.8);
  color: #ffffff;
}

.custom-notification-close svg {
  width: 16px;
  height: 16px;
}

/* NSFW Warning Modal - No close button, must accept */
#nsfw-warning-modal .custom-modal-close {
  display: none;
}

#nsfw-warning-modal .custom-modal-overlay {
  pointer-events: none;
}




