/* Layout */
.layout-wrapper {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: linear-gradient(180deg, var(--surface) 0%, rgba(17, 24, 39, 0.98) 100%);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0 1rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition), width var(--transition);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem 1.25rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 10;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.sidebar {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Global scrollbar style to match the sidebar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-logo .logo-icon {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
}

.sidebar-section {
  padding: 0.5rem 0.875rem;
}

.sidebar-section.sidebar-admin {
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 1rem;
}

.sidebar-section.sidebar-admin .sidebar-label {
  color: var(--danger);
}

.sidebar-label {
  display: block;
  padding: 0.75rem 1rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 0.25rem;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  width: 100%;
  font: inherit;
  text-align: left;
}

.sidebar-link:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
  transform: translateX(2px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(139, 92, 246, 0.12));
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.sidebar-link.active .sidebar-icon .iconify {
  color: var(--accent);
}

.sidebar-icon {
  font-size: 1.25rem;
  width: 1.5rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem 0.875rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-footer .sidebar-link {
  padding-left: 0.875rem;
  padding-right: 0.875rem;
}

.main-content {
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 260px;
  right: 0;
  z-index: 80;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.menu-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  transition: var(--transition);
}

.menu-toggle:hover {
  background: var(--bg);
  border-color: var(--text-muted);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-stats {
  display: flex;
  gap: 0.75rem;
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
}

.chip-icon {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.chip-icon .iconify {
  font-size: 1rem;
}

.chip-label {
  color: var(--text-muted);
}

.player-chip strong {
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  margin-left: 0.2rem;
}

.player-chip.credits strong {
  color: var(--success);
}

.player-chip.bytes strong {
  color: var(--accent);
}

.player-chip.xp strong {
  color: #f59e0b;
}

.player-chip.level strong {
  color: #8b5cf6;
}

/* Level-up animation */
.level-up-flash {
  animation: level-flash 0.4s ease-in-out 4;
}

@keyframes level-flash {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
  50% { transform: scale(1.2); box-shadow: 0 0 20px 6px rgba(139, 92, 246, 0.7); }
}

.level-up-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  background: linear-gradient(135deg, #8b5cf6, #6366f1, #a855f7);
  background-size: 200% 200%;
  color: #fff;
  padding: 1.5rem 2.5rem;
  border-radius: 16px;
  font-size: 1.6rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 12px 48px rgba(139, 92, 246, 0.5), 0 0 0 2px rgba(255,255,255,0.1) inset;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: popup-glow 1.5s ease-in-out infinite alternate;
}

@keyframes popup-glow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.level-up-popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.level-up-popup.fade-out {
  opacity: 0;
  transform: translate(-50%, -70%) scale(0.85);
}

.level-up-burst {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.6);
  z-index: 99998;
  pointer-events: none;
  animation: burst 0.6s ease-out forwards;
}

@keyframes burst {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(40); opacity: 0; }
}

.level-up-particle {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  z-index: 99998;
  pointer-events: none;
}

/* Smooth layout transitions */
.sidebar,
.main-content,
.footer,
.top-bar {
  transition: width var(--transition), margin-left var(--transition), left var(--transition);
}

.layout-wrapper.no-sidebar-transition .sidebar,
.layout-wrapper.no-sidebar-transition .main-content,
.layout-wrapper.no-sidebar-transition .footer,
.layout-wrapper.no-sidebar-transition .top-bar,
.layout-wrapper.no-sidebar-transition .sidebar *,
.layout-wrapper.no-sidebar-transition .top-bar *,
.layout-wrapper.no-sidebar-transition .main-content * {
  transition: none !important;
}

/* Collapsed sidebar tooltips */
.layout-wrapper.collapsed .sidebar-link {
  position: relative;
}

.layout-wrapper.collapsed .sidebar-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 0.75rem);
  top: 50%;
  transform: translateY(-50%) scale(0.95);
  background: var(--surface-2);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
}

.layout-wrapper.collapsed .sidebar-link:hover::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.layout-wrapper.collapsed .sidebar-toggle {
  width: auto;
  padding: 0.6rem;
  margin-left: auto;
  margin-right: auto;
}

.user-greeting {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.4rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.user-greeting .iconify {
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.greeting-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Logout link in sidebar */
.logout-link {
  color: var(--text-muted);
  border-color: transparent;
}

.logout-link:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
  transform: translateX(2px);
}

.logout-link:hover .sidebar-icon .iconify {
  color: #ef4444;
}

/* Games page */
.games-page {
  padding: 5rem 1.5rem 4rem;
  flex: 1;
}

.games-header {
  margin-bottom: 2rem;
}

.games-header h1 {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.games-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.featured-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.featured-banner h2 {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.featured-banner p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.game-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.game-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(139, 92, 246, 0.04));
  opacity: 0;
  transition: opacity var(--transition);
}

.game-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: var(--shadow);
}

.game-tile:hover::before {
  opacity: 1;
}

.game-tile.coming-soon {
  opacity: 0.55;
  cursor: default;
}

.game-tile.coming-soon:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}

.game-tile.coming-soon::before {
  display: none;
}

.game-tile.game-new {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}

.game-tile.game-new:hover {
  border-color: rgba(245, 158, 11, 0.9);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.3);
}

.game-tile.game-original {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.15);
}

.game-tile.game-original:hover {
  border-color: rgba(34, 197, 94, 0.9);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.3);
}

.game-tile.game-old {
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 0 16px rgba(148, 163, 184, 0.1);
}

.game-tile.game-old:hover {
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow: 0 0 24px rgba(148, 163, 184, 0.2);
}


.tile-icon {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.game-tile h3 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
  position: relative;
  z-index: 1;
}

.game-tile .tile-version {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  z-index: 2;
}

.game-tile.game-new .tile-version {
  color: rgba(245, 158, 11, 0.95);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.game-tile.game-original .tile-version {
  color: rgba(34, 197, 94, 0.95);
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.game-tile.game-old .tile-version {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.game-tile p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

/* Admin Profiles */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.admin-header p {
  color: var(--text-muted);
}

.admin-game-fields-stacked {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.admin-game-fields-stacked .admin-field-wide {
  grid-column: 1 / -1;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-tab {
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.admin-tab.active,
.admin-tab:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--text-muted);
}

.admin-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.modal-card-wide {
  max-width: 600px;
  width: 90%;
}

.admin-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--danger);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.admin-loading {
  color: var(--text-muted);
  padding: 2rem;
  text-align: center;
}

.admin-search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-search-bar .iconify {
  color: var(--text-muted);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.admin-search-bar .admin-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
}

.admin-search-bar .admin-input:focus {
  outline: none;
  border-color: transparent;
}

.admin-profiles-list {
  display: flex;
  flex-direction: column;
}

.admin-profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 0.5rem;
}

.admin-profiles-list .admin-profile-card:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.admin-profiles-list .admin-profile-card:last-child {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}

.admin-profile-card.banned {
  border: 2px solid rgba(239, 68, 68, 0.8);
  border-bottom: none;
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
}

.admin-profiles-list .admin-profile-card.banned:last-child {
  border-bottom: 2px solid rgba(239, 68, 68, 0.8);
}

.admin-profile-header-row {
  display: flex;
  align-items: center;
}

.admin-profile-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), border-color var(--transition);
}

.admin-profile-header:hover {
  background: var(--surface);
  border-color: var(--text-muted);
}

.admin-profile-summary {
  flex: 1;
  min-width: 0;
}

.admin-profile-summary h3 {
  font-size: 1rem;
  margin: 0 0 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-username {
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85em;
}

.admin-profile-header .admin-profile-email {
  margin: 0;
  font-size: 0.8rem;
}

.admin-profile-header .admin-profile-meta {
  flex-shrink: 0;
}

.admin-profile-email {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.admin-joined-date {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 0.2rem 0 0;
  opacity: 0.8;
}

.admin-profile-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.admin-profile-body.open {
  grid-template-rows: 1fr;
}

.admin-profile-detail {
  overflow: hidden;
  padding: 0 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease, padding 0.25s ease;
}

.admin-profile-body.open .admin-profile-detail {
  padding: 0.75rem;
  opacity: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-profile-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
}

.admin-badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  margin-left: 0.5rem;
}

.admin-badge-level {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent);
}

.admin-ban-reason {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid var(--danger);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.admin-permissions-groups {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-permissions-category {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.admin-permissions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.4rem;
}

.admin-permission-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  position: relative;
}

.admin-permission-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.admin-permission-toggle .checkmark {
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  transition: all 0.15s ease;
  display: grid;
  place-items: center;
}

.admin-permission-toggle .checkmark::after {
  content: '';
  width: 0.45rem;
  height: 0.25rem;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.15s ease;
  margin-bottom: 0.15rem;
}

.admin-permission-toggle input:checked + .checkmark {
  background: var(--accent);
  border-color: var(--accent);
}

.admin-permission-toggle input:checked + .checkmark::after {
  transform: rotate(-45deg) scale(1);
}

.admin-permission-toggle.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.admin-permission-toggle input:disabled {
  cursor: not-allowed;
}

.admin-permission-toggle input:focus-visible + .checkmark {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.admin-profile-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-currency-editor {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.admin-currency-editor label,
.admin-level-editor {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-level-editor input {
  width: 80px;
}

.admin-level-editor-wide {
  margin-bottom: 0.75rem;
}

.admin-level-editor-wide label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-level-editor-wide input {
  width: 120px;
}

.admin-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
  width: 140px;
  box-sizing: border-box;
}

.admin-input:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-input:read-only {
  opacity: 0.6;
  cursor: not-allowed;
}

#banReasonInput {
  width: calc(100% - 0.25rem);
  resize: none;
  min-height: 80px;
  margin-left: 0.25rem;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
}

.btn-icon {
  padding: 0.45rem;
  border-radius: var(--radius);
  font-size: 1rem;
}

/* Admin Games */
.admin-games-list {
  display: grid;
  gap: 1rem;
}

.admin-game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-game-card.inactive {
  opacity: 0.7;
}

.admin-game-header-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
}

.admin-game-header {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), border-color var(--transition);
}

.admin-game-header:hover {
  background: var(--surface);
  border-color: var(--text-muted);
}

.admin-game-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.admin-game-title {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-game-status-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-game-status-label.status-plain {
  color: #64748b;
  background: rgba(100, 116, 139, 0.1);
  border-color: rgba(100, 116, 139, 0.3);
}

.admin-game-status-label.status-inactive {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.admin-chevron {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.admin-chevron.open {
  transform: rotate(180deg);
}

.admin-game-body {
  padding: 0 0.5rem 1rem;
}

.admin-game-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  position: relative;
  margin-bottom: 0.75rem;
}

.admin-game-preview .tile-icon {
  font-size: 2.25rem;
  margin: 0;
}

.admin-game-preview h3 {
  font-size: 1.2rem;
  margin: 0;
}

.admin-game-preview .tile-version {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.admin-game-preview.game-new {
  border-color: rgba(245, 158, 11, 0.6);
}

.admin-game-preview.game-original {
  border-color: rgba(34, 197, 94, 0.6);
}

.admin-game-preview.game-old {
  border-color: rgba(148, 163, 184, 0.6);
}

.admin-game-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-field-wide {
  flex: 1 1 100%;
}

.admin-field-wide .admin-input {
  width: 100%;
}

.admin-field .admin-input {
  width: 160px;
}

.admin-game-fields-stacked .admin-field .admin-input,
.admin-game-fields-stacked .admin-field-wide .admin-input {
  width: 100%;
}

.admin-status-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.admin-status-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: var(--transition);
}

.admin-status-tag input {
  position: absolute;
  opacity: 0;
}

.admin-status-tag:has(input:checked) {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}

.admin-status-tag:has(input:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-game-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.admin-toggle {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.admin-toggle input {
  position: absolute;
  opacity: 0;
}

.toggle-slider {
  width: 40px;
  height: 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}

.admin-toggle input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.admin-toggle input:checked + .toggle-slider::after {
  transform: translateX(18px);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toast-in 0.25s ease;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
}

.toast.leaving {
  animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  z-index: 1;
}

.modal-card h3 {
  margin-bottom: 0.5rem;
}

.modal-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tile-cta {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.game-tile.coming-soon .tile-cta {
  background: var(--surface-2);
  color: var(--text-muted);
}

/* Auth overlay */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(11, 15, 25, 0.95);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-overlay.active {
  display: flex;
}

.auth-overlay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  max-width: 420px;
}

.auth-overlay-card h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.auth-overlay-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.auth-overlay-card .btn {
  width: 100%;
  margin-bottom: 0.75rem;
}

.auth-overlay-extra {
  margin: 1.5rem 0 0.5rem;
}

.auth-overlay-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.auth-overlay-note code {
  color: var(--accent);
  font-size: 0.8rem;
}

/* Game template pages */
.game-template-page {
  padding: 2rem 1.5rem 4rem;
  flex: 1;
}

.game-template-page .container {
  max-width: 900px;
}

.game-board {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.game-board::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 60%);
  pointer-events: none;
}

.game-board > * {
  position: relative;
  z-index: 1;
}

.game-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.game-message {
  text-align: center;
  margin-top: 1rem;
  min-height: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Footer */
.footer {
  margin-top: auto;
}

/* Mobile sidebar */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 85;
}

.sidebar-backdrop.active {
  display: block;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .top-bar {
    left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .top-bar-right {
    gap: 0.5rem;
  }

  .user-greeting,
  .chip-label {
    display: none;
  }

  .player-chip {
    padding: 0.35rem 0.55rem;
  }

  .sidebar-backdrop.active {
    display: block;
  }
}

/* Collapsible sidebar */
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: calc(100% - 2rem);
  margin: 1rem 1rem 0;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--text-muted);
}

.sidebar-toggle .iconify {
  font-size: 1.25rem;
}

.sidebar-icon .iconify {
  font-size: 1.35rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.sidebar-link:hover .iconify,
.sidebar-link.active .iconify {
  color: var(--text);
}

/* Collapsed state */
.layout-wrapper.collapsed .sidebar {
  width: 72px;
  padding-top: 1rem;
}

.layout-wrapper.collapsed .sidebar-logo {
  justify-content: center;
  padding: 0 0 1rem;
}

.layout-wrapper.collapsed .sidebar-logo .logo-text,
.layout-wrapper.collapsed .sidebar-label,
.layout-wrapper.collapsed .sidebar-link .link-text,
.layout-wrapper.collapsed .sidebar-toggle .toggle-text {
  display: none;
}

.layout-wrapper.collapsed .sidebar-link {
  justify-content: center;
  padding: 0.75rem 0;
}

.layout-wrapper.collapsed .sidebar-icon .iconify {
  font-size: 1.6rem;
}

.layout-wrapper.collapsed .main-content {
  margin-left: 72px;
}

.layout-wrapper.collapsed .top-bar {
  left: 72px;
}

.layout-wrapper.collapsed .sidebar-link.active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.layout-wrapper.collapsed .sidebar-link.active .sidebar-icon .iconify {
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.4));
}

.layout-wrapper.collapsed .sidebar-toggle .iconify {
  transform: rotate(180deg);
}

@media (max-width: 600px) {
  .games-page,
  .game-template-page {
    padding: 4.5rem 1rem 3rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .player-chip {
    padding: 0.4rem 0.6rem;
  }

  .chip-label {
    display: none;
  }

  .user-greeting .greeting-text {
    display: none;
  }

  .user-greeting {
    padding: 0.4rem;
  }

  .featured-banner {
    padding: 1.25rem;
  }

  .sidebar-toggle {
    display: none;
  }
}

/* Admin Badges */
.admin-badges-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1rem;
}

.admin-badge-card {
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 90%, var(--badge-color, var(--accent))) 0%, var(--surface-2) 100%);
  border: 1px solid color-mix(in srgb, var(--badge-color, var(--accent)) 25%, var(--border));
  border-radius: 1.25rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.admin-badge-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--badge-color, var(--accent)), color-mix(in srgb, var(--badge-color, var(--accent)) 40%, transparent));
  opacity: 0.9;
}

.admin-badge-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.admin-badge-card:hover {
  border-color: color-mix(in srgb, var(--badge-color, var(--accent)) 60%, var(--border));
  box-shadow: 0 0 28px color-mix(in srgb, var(--badge-color, var(--accent)) 20%, transparent), 0 16px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(-4px) scale(1.005);
}

.admin-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--badge-color, var(--accent)) 45%, var(--surface-2)), color-mix(in srgb, var(--badge-color, var(--accent)) 15%, var(--surface-2)));
  border: 2px solid color-mix(in srgb, var(--badge-color, var(--accent)) 65%, var(--surface-2));
  border-radius: 50%;
  font-size: 2.1rem;
  color: var(--badge-color, var(--accent));
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--badge-color, var(--accent)) 15%, transparent), inset 0 2px 4px rgba(255, 255, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.admin-badge-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, transparent 50%);
  pointer-events: none;
}

.admin-badge-info {
  flex: 1;
  min-width: 0;
  padding-right: 0.5rem;
  position: relative;
  z-index: 1;
}

.admin-badge-info h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  word-break: break-word;
  overflow-wrap: break-word;
}

.admin-badge-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.admin-badge-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--badge-color, var(--accent)) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--badge-color, var(--accent)) 22%, var(--border));
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.admin-badge-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 0.5rem;
  align-self: stretch;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  min-width: 156px;
}

.admin-badge-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.45rem 0.4rem;
  border-radius: 0.6rem;
  white-space: nowrap;
}

.admin-badge-actions .btn .iconify {
  font-size: 0.95rem;
}

.custom-color-picker {
  position: relative;
  display: inline-block;
}

.color-swatch {
  width: 42px;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background-color: #3b82f6;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease, border-color 0.2s ease;
}

.color-swatch:hover {
  transform: scale(1.05);
  border-color: var(--text-muted);
}

.color-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 100;
  min-width: 200px;
}

.color-presets {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.color-preset {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease, border-color 0.2s ease;
}

.color-preset:hover {
  transform: scale(1.1);
  border-color: var(--text-muted);
}

.btn-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.6);
}

.admin-search-results {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.25rem;
  z-index: 20;
}

.admin-search-result-item {
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.admin-search-result-item:hover {
  background: var(--surface-2);
}

.admin-empty {
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* Public profile page */
.public-profile-page {
  padding-top: 2rem;
  max-width: 700px;
}

.public-profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.public-profile-banner {
  width: 100%;
  height: 160px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.public-profile-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-profile-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  margin-top: -48px;
}

.public-profile-avatar {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 4px solid var(--surface);
  border-radius: 50%;
  font-size: 3.5rem;
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;
}

.public-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-profile-meta {
  padding: 1rem 1.5rem 0.5rem;
}

.public-profile-meta h1 {
  display: inline;
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.public-profile-name-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.6rem;
  vertical-align: middle;
}

.public-profile-name-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: color-mix(in srgb, var(--badge-color, var(--accent)) 20%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--badge-color, var(--accent)) 45%, var(--surface-2));
  border-radius: 50%;
  color: var(--badge-color, var(--accent));
  font-size: 1rem;
  cursor: default;
}

.public-profile-name-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 10;
}

.public-profile-name-badge:hover::after {
  opacity: 1;
}

.public-profile-name-badge .iconify {
  pointer-events: none;
}

.public-profile-meta p {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
}

.public-profile-level {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

.public-profile-bio {
  padding: 0 1.5rem 1rem;
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.6;
}

.edit-profile-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0;
}

.public-profile-actions-top {
  padding-bottom: 0.5rem;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.upload-filename {
  display: inline-block;
  margin-left: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.upload-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  background: var(--surface-2);
  overflow: hidden;
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.upload-preview-wide {
  width: 100%;
  height: 120px;
  border-radius: var(--radius);
}

.public-profile-banner img {
  image-rendering: -webkit-optimize-contrast;
}

.public-profile-avatar img {
  image-rendering: auto;
}

.public-profile-banner {
  height: 220px;
}

.public-profile-avatar {
  width: 128px;
  height: 128px;
}

.public-profile-header {
  margin-top: -64px;
}

/* Announcement box */
.announcement-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 9999;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.announcement-content {
  display: flex;
  align-items: center;
  gap: 10px;
}
.announcement-text {
  white-space: nowrap;
}
.announcement-minimize, .announcement-expand {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
}
.announcement-minimize:hover, .announcement-expand:hover {
  color: var(--text);
}
.announcement-box.minimized .announcement-content {
  display: none;
}
.announcement-box.minimized .announcement-expand {
  display: block;
}
.announcement-expand {
  display: none;
}
