@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;700;900&family=Manrope:wght@400;500;700;800&display=swap');

:root {
  --bg-dark: #0f111a;
  --bg-sidebar: #0a0b12; /* Сделал слегка посветлее, ближе к исходному макету */
  --bg-card: #161926;
  --bg-hover: #1e2235;
  --bg-active-nav: #1c1f26; /* Серый фон активного пункта */
  --text-main: #ffffff;
  --text-muted: #8b92a5;
  --accent-green: #b9f01b; /* Более яркий лаймовый */
  --accent-purple: #8e54ff;
  --border-color: rgba(255, 255, 255, 0.08);
  --sidebar-width: 260px;
  --topbar-height: 80px;
  
  --font-heading: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-main);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .logo-main, .logo-sub, .btn-create, .feed-tab, .challenge-pill {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: vt-fade-out 180ms ease both;
}

::view-transition-new(root) {
  animation: vt-fade-in 220ms ease both;
}

@keyframes vt-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes vt-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* LAYOUT */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 5px;
}

.logo-icon {
  background: var(--accent-green);
  color: #000;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon i {
  width: 22px;
  height: 22px;
  stroke-width: 3px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-main {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.logo-sub {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 11px;
  color: var(--accent-green);
  margin-top: 2px;
  letter-spacing: 0.05em;
}

.sidebar-divider {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 20px 0;
  width: 100%;
}

.btn-create {
  background: var(--accent-green);
  color: #000;
  padding: 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 25px;
  text-transform: uppercase;
}

.btn-create i {
  width: 20px;
  height: 20px;
  stroke-width: 3px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  color: #a0a0a0;
  font-size: 14px;
  font-weight: 500;
}

.side-nav a:hover {
  color: var(--text-main);
}

.side-nav a.active {
  background: var(--bg-active-nav);
  color: var(--text-main);
}

.side-nav a i {
  width: 20px;
  height: 20px;
  color: #a0a0a0;
}

.side-nav a.active i {
  color: var(--text-main);
}

/* USER BLOCK BOTTOM */
.sidebar-user-block {
  display: flex;
  flex-direction: column;
  padding: 5px;
}

.user-main-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-avatar-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.user-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-display-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.user-handle {
  font-size: 12px;
  color: var(--text-muted);
}

.user-rank {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.xp-bar-container {
  background: rgba(255, 255, 255, 0.1);
  height: 5px;
  border-radius: 3px;
  width: 100%;
  margin-bottom: 6px;
  overflow: hidden;
}

.xp-bar-fill {
  background: var(--accent-green);
  height: 100%;
  border-radius: 3px;
}

.xp-text-bottom {
  font-size: 11px;
  color: var(--text-main);
  font-weight: 500;
}

.sidebar-copyright {
  font-size: 12px;
  color: #505050;
  padding: 5px;
}

/* MAIN CONTENT */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-bar {
  height: 80px; /* Увеличил высоту */
  padding: 15px 20px 0 20px; /* Добавил отступ сверху */
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-dark);
  flex-shrink: 0; /* Чтобы не сжимался */
}

.search-wrapper {
  background: #1c1f26; /* Темно-серый фон инпута */
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 800px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-wrapper i {
  color: #6a6e7a;
  width: 18px;
  height: 18px;
}

.search-wrapper input {
  background: transparent;
  border: 0;
  color: #a0a0a0;
  width: 100%;
  outline: none;
  font-size: 14px;
}

.search-wrapper input::placeholder {
  color: #6a6e7a;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 20px;
}

.icon-btn {
  background: transparent;
  border: 0;
  color: #a0a0a0;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.icon-btn i {
  width: 22px;
  height: 22px;
}

.message-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  width: 40px;
  height: 40px;
}

.badge {
  background: #8e54ff; /* Фиолетовый бадж как на макете */
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  position: absolute;
  top: -6px;
  right: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-dark);
}

.user-dropdown {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1c1f26;
  padding: 6px 14px 6px 6px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.user-dropdown span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.user-dropdown i {
  width: 16px;
  height: 16px;
  color: #6a6e7a;
}

/* SCROLL AREA */
.content-scroll {
  flex-grow: 1;
  overflow-y: auto;
  padding: 32px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

/* HERO BANNER */
.hero-banner {
  background: #0f111a;
  border-radius: 24px;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 320px;
}

.hero-content {
  max-width: 55%;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.badge-active {
  background: rgba(142, 84, 255, 0.15);
  color: #c084fc;
  padding: 8px 14px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-content h1 {
  font-size: 42px;
  font-weight: 800;
  margin: 0 0 16px 0;
  line-height: 1.1;
  color: #fff;
}

.hero-content p {
  color: #8b92a5;
  font-size: 16px;
  margin-bottom: 32px;
  line-height: 1.5;
}

.hero-meta {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-top: auto;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.meta-item i {
  color: #8e54ff;
  width: 24px;
  height: 24px;
}

.meta-item small {
  display: block;
  color: #6a6e7a;
  font-size: 12px;
  margin-bottom: 2px;
}

.meta-item strong {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.btn-participate {
  background: var(--accent-green);
  color: #000;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  margin-left: auto;
  transition: 0.2s;
  text-transform: uppercase;
}

.btn-participate:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.hero-image {
  position: absolute;
  right: 0;
  top: 0;
  width: 60%; /* Увеличил ширину для лучшего наложения */
  height: 100%;
  background-image: var(--hero-cover, url('https://images.unsplash.com/photo-1614728263952-84ea256f9679?auto=format&fit=crop&q=80&w=1000'));
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
  mask-image: linear-gradient(to right, transparent 0%, black 40%);
}

.hero-image::after {
  display: none; /* Убираем старый метод градиента */
}

.placeholder-img-hero {
    width: 100%;
    height: 100%;
}

/* SECTIONS */
.section {
  margin-bottom: 40px;
}

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

.section-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.see-all {
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.submissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.submissions-slider {
  position: relative;
}

.submissions-track {
  --submissions-gap: 18px;
  --submissions-max: 3;
  --submissions-visible: 3;
  display: flex;
  gap: var(--submissions-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.submissions-track::-webkit-scrollbar {
  display: none;
}

.submissions-track .submission-card {
  flex: 0 0 calc((100% - (var(--submissions-gap) * (var(--submissions-visible) - 1))) / var(--submissions-visible));
  scroll-snap-align: start;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(20, 22, 30, 0.55);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease, background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  z-index: 3;
}

.slider-btn:hover:not(:disabled) {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.slider-btn:active:not(:disabled) {
  transform: translateY(-50%) scale(0.96);
}

.slider-btn:focus-visible:not(:disabled) {
  outline: none;
  box-shadow: 0 0 0 4px rgba(185, 240, 27, 0.10), 0 10px 30px rgba(0, 0, 0, 0.35);
  border-color: rgba(185, 240, 27, 0.55);
}

.slider-btn i {
  width: 18px;
  height: 18px;
}

.submissions-slider.is-overflowing .slider-btn {
  opacity: 1;
  pointer-events: auto;
}

.slider-btn:disabled {
  opacity: 0.25;
  pointer-events: none;
}

.slider-btn--prev {
  left: 8px;
}

.slider-btn--next {
  right: 8px;
}

.submission-card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.submission-card a {
  display: block;
}

.submission-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-green);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
}

.submission-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
}

.submission-info {
  padding: 14px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(12, 13, 18, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.author-link {
  cursor: pointer;
}

.author-link:hover span {
  color: var(--accent-green);
}

.author img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.likes {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

.likes i {
  width: 17px;
  height: 17px;
}

.like-form {
  display: inline-flex;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.2s;
  font: inherit;
}

.like-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

.like-btn.is-liked {
  color: var(--accent-green);
  cursor: default;
}

.like-btn:disabled {
  opacity: 1;
}

.vote-icon-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vote-icon-btn:hover {
  color: var(--accent-green);
  transform: scale(1.1);
}

.vote-icon-btn.is-liked {
  color: var(--accent-green);
}

.vote-icon-btn i {
  width: 24px;
  height: 24px;
}

.vote-icon-btn-mini {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.vote-icon-btn-mini:hover {
  color: var(--accent-green);
}

.vote-icon-btn-mini i {
  width: 16px;
  height: 16px;
}

.vote-icon-btn-mini.is-liked i {
  fill: var(--accent-green);
  color: var(--accent-green);
}

.vote-icon-btn-mini:hover i {
  transform: scale(1.15);
}

.challenge-container {
  max-width: 1200px;
}

.challenge-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 18px;
}

.challenge-hero-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.challenge-hero-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.challenge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
  font-size: 12px;
}

.challenge-pill i {
  width: 16px;
  height: 16px;
  color: var(--accent-green);
}

.challenge-pill.is-finished {
  border-color: rgba(255, 215, 0, 0.25);
  background: rgba(255, 215, 0, 0.10);
}

.challenge-pill.is-finished i {
  color: #ffd700;
}

.challenge-title {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  margin: 0;
}

.challenge-desc {
  color: rgba(255, 255, 255, 0.70);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.challenge-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.challenge-hero-cover {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.02);
  min-height: 220px;
  background-size: cover;
  background-position: center;
}

.challenge-hero-cover.is-empty {
  background: radial-gradient(circle at 30% 30%, rgba(185, 240, 27, 0.10), transparent 55%),
              radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.06), transparent 55%),
              rgba(255, 255, 255, 0.02);
}

.challenge-submit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 18px;
}

.challenge-submit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 18px;
  border: 1px dashed rgba(185, 240, 27, 0.25);
  background: rgba(185, 240, 27, 0.05);
  color: rgba(255, 255, 255, 0.80);
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s;
}

.file-drop input {
  display: none;
}

.file-drop i {
  width: 18px;
  height: 18px;
  color: var(--accent-green);
}

.file-drop-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.file-drop-title {
  font-weight: 900;
}

.file-drop-sub {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
  font-size: 12px;
}

.file-drop.is-dragover {
  background: rgba(185, 240, 27, 0.10);
  border-color: rgba(185, 240, 27, 0.45);
  transform: translateY(-1px);
}

.file-drop.has-file {
  border-style: solid;
  background: rgba(255, 255, 255, 0.03);
}

.upload-preview {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.upload-preview-media {
  width: 160px;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-preview-img,
.upload-preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upload-preview-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-preview-name {
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-preview-actions {
  display: flex;
  gap: 10px;
}

.challenge-textarea {
  min-height: 110px;
  padding-top: 12px;
}

.anon-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.65);
  font-weight: 800;
  font-size: 12px;
}

.anon-pill i {
  width: 16px;
  height: 16px;
}

.duel-container {
  max-width: 1200px;
}

.duel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.duel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.duel-media {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}

.duel-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #000;
  background: var(--accent-green);
  z-index: 2;
}

.duel-select-btn {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s;
}

.duel-select-btn i {
  width: 18px;
  height: 18px;
  color: var(--accent-green);
}

.duel-card:hover .duel-select-btn {
  background: rgba(185, 240, 27, 0.14);
  border-color: rgba(185, 240, 27, 0.35);
  color: var(--accent-green);
}

.duel-card:hover .duel-select-btn i {
  color: var(--accent-green);
}

.duel-toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(185, 240, 27, 0.10);
  border: 1px solid rgba(185, 240, 27, 0.25);
  color: var(--accent-green);
  font-weight: 900;
  margin-bottom: 14px;
}

.duel-toast i {
  width: 18px;
  height: 18px;
}

.duel-toast--error {
  background: rgba(255, 77, 77, 0.10);
  border-color: rgba(255, 77, 77, 0.25);
  color: #ff4d4d;
}

@media (max-width: 980px) {
  .challenge-hero {
    grid-template-columns: 1fr;
  }
  .duel-grid {
    grid-template-columns: 1fr;
  }
  .duel-media {
    height: 420px;
  }
}

@media (max-width: 560px) {
  .duel-media {
    height: 360px;
  }
}

.submission-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.points {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-green);
  cursor: help;
  outline: none;
}

.points i {
  width: 17px;
  height: 17px;
}

.points .tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 260px;
  background: rgba(12, 13, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: 12px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 5;
}

.points .tooltip i {
  width: 18px;
  height: 18px;
  color: var(--accent-green);
  flex-shrink: 0;
  margin-top: 2px;
}

.points .tooltip span {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.85);
}

.points:hover .tooltip,
.points:focus-visible .tooltip {
  opacity: 1;
  transform: translateY(0);
}

.has-tooltip {
  position: relative;
  overflow: visible;
}

.has-tooltip .tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 260px;
  background: rgba(12, 13, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: 12px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 6;
}

.has-tooltip .tooltip.tooltip--down {
  bottom: auto;
  top: calc(100% + 10px);
}

.has-tooltip .tooltip i {
  width: 18px;
  height: 18px;
  color: var(--accent-green);
  flex-shrink: 0;
  margin-top: 2px;
}

.has-tooltip .tooltip span {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.85);
}

.has-tooltip:hover .tooltip,
.has-tooltip:focus-visible .tooltip {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1200px) {
  .submissions-track {
    --submissions-max: 3;
  }
}

@media (max-width: 920px) {
  .submissions-track {
    --submissions-max: 2;
  }
}

@media (max-width: 640px) {
  .submissions-track {
    --submissions-max: 1;
  }
}

/* MINI CHALLENGES */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.challenge-card-mini {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: 0.3s ease;
  display: flex;
  flex-direction: column;
}

.challenge-card-mini:hover {
  transform: translateY(-5px);
  border-color: var(--accent-green);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.ch-preview-img {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 120px;
  height: 120px;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  filter: grayscale(1) brightness(2);
  pointer-events: none;
  z-index: 0;
  border-radius: 20px;
  transform: rotate(-15deg);
  transition: 0.5s ease;
}

.ch-preview-img[data-cover] {
  background-image: var(--cover-url);
}

.challenge-card-mini:hover .ch-preview-img {
  opacity: 0.3;
  transform: rotate(-5deg) scale(1.1);
}

.ch-badge {
  background: rgba(185, 240, 27, 0.1);
  color: var(--accent-green);
  padding: 6px 12px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.challenge-card-mini h3 {
  font-size: 18px;
  margin: 0 0 16px 0;
  position: relative;
  z-index: 1;
}

.ch-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.ch-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.ch-stat i {
  color: var(--accent-green);
}

/* RIGHT SIDEBAR */
.sidebar-section {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.sidebar-section h3 {
  font-size: 16px;
  margin: 0;
}

.active-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.active-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.active-img-mini {
  width: 48px;
  height: 48px;
  background: #252a3d;
  border-radius: 12px;
}

.active-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  background: #252a3d;
}

.active-info h4 {
  font-size: 13px;
  margin: 0 0 4px 0;
}

.time-left {
  font-size: 11px;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-authors-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.author-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  border-radius: 14px;
  padding: 10px 12px;
  transition: 0.2s;
}

.author-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.author-item:hover .author-name {
  color: var(--accent-green);
}

.rank {
  color: var(--text-muted);
  width: 20px;
}

.author-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.author-xp {
  margin-left: auto;
  color: var(--text-muted);
}

.btn-all-rating {
  background: rgba(255, 255, 255, 0.05);
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 12px;
  margin-top: 16px;
  font-size: 13px;
}

.notif-list-mini {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notif-item-mini {
  display: flex;
  gap: 12px;
}

.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon.challenge_place { background: rgba(209, 244, 64, 0.1); color: var(--accent-green); }
.notif-icon.vote_received { background: rgba(255, 77, 77, 0.1); color: #ff4d4d; }

.notif-text p {
  font-size: 12px;
  margin: 0 0 4px 0;
}

.notif-text small {
  color: var(--text-muted);
  font-size: 10px;
}

.notifications-container {
  max-width: 1100px;
}

.notif-readall {
  margin-left: auto;
}

.btn-notif-readall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s;
}

.btn-notif-readall i {
  width: 18px;
  height: 18px;
}

.btn-notif-readall:hover {
  background: rgba(185, 240, 27, 0.12);
  border-color: rgba(185, 240, 27, 0.35);
  color: var(--accent-green);
}

.notifications-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
}

.notifications-list {
  display: flex;
  flex-direction: column;
}

.notif-row {
  display: grid;
  grid-template-columns: 44px 1fr 20px;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.notif-row:last-child {
  border-bottom: 0;
}

.notif-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.notif-row.is-unread {
  background: rgba(185, 240, 27, 0.04);
}

.notif-row.is-unread:hover {
  background: rgba(185, 240, 27, 0.06);
}

.notif-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-message {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 700;
}

.notif-new {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(185, 240, 27, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(185, 240, 27, 0.30);
  font-size: 11px;
  font-weight: 900;
}

.notif-chevron {
  color: rgba(255, 255, 255, 0.40);
  display: flex;
  justify-content: flex-end;
}

.notif-chevron i {
  width: 18px;
  height: 18px;
}

.empty-state-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 20px;
  border-radius: 24px;
  border: 2px dashed var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.empty-state-inline i {
  width: 56px;
  height: 56px;
  color: var(--text-muted);
  opacity: 0.55;
  margin-bottom: 14px;
}

.empty-state-inline .empty-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.empty-state-inline .empty-text {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
  max-width: 520px;
}

.empty-state-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 12px;
  border-radius: 18px;
  border: 1px dashed var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.empty-state-mini i {
  width: 34px;
  height: 34px;
  color: var(--text-muted);
  opacity: 0.6;
  margin-bottom: 10px;
}

.empty-state-mini .empty-text {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* FEED PAGE */
.feed-container {
  max-width: 1400px;
  margin: 0 auto;
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  gap: 24px;
  flex-wrap: wrap;
}

.feed-title-block h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px 0;
}

.feed-title-block p {
  color: var(--text-muted);
  margin: 0;
  font-size: 15px;
}

.feed-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  gap: 4px;
}

.feed-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  transition: 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.feed-tab i {
  width: 18px;
  height: 18px;
}

.feed-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.feed-tab.active {
  background: var(--bg-active-nav);
  color: var(--accent-green);
}

.feed-container .submissions-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.empty-state i {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: 24px;
  opacity: 0.5;
}

.empty-state h2 {
  font-size: 24px;
  margin: 0 0 12px 0;
}

.empty-state p {
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: 32px;
}

.btn-primary {
  background: var(--accent-green);
  color: #000;
  padding: 14px 28px;
  border-radius: 14px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  transition: 0.2s;
  text-transform: uppercase;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 10px 20px rgba(185, 240, 27, 0.2);
}

/* FOOTER */
/* PROFILE PAGE */
.profile-container {
  max-width: 1100px;
  margin: 0 auto;
}

.profile-card {
  background: #161926;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 40px;
  position: relative;
}

.profile-cover {
  height: 240px;
  background: linear-gradient(135deg, #1e2235 0%, #0a0b12 100%);
  border-bottom: 1px solid var(--border-color);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.profile-cover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(15, 17, 26, 0.4));
}

.btn-upload-cover {
  background: rgba(15, 17, 26, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 16px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 600;
  z-index: 10;
  transition: 0.2s;
}

.btn-upload-cover:hover {
  background: rgba(15, 17, 26, 0.8);
  border-color: var(--accent-green);
}

.cover-upload-form {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.profile-main {
  padding: 0 40px 32px;
  display: flex;
  gap: 32px;
  position: relative;
  align-items: flex-start;
}

.profile-avatar-wrapper {
  margin-top: -60px;
  position: relative;
  flex-shrink: 0;
  z-index: 5;
}

.btn-avatar-edit {
  position: absolute;
  bottom: 20px;
  right: -10px;
  background: var(--accent-green);
  color: #000;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 5px solid #161926;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-avatar-edit:hover {
  transform: scale(1.1) rotate(5deg);
  filter: brightness(1.1);
}

.btn-avatar-edit i {
  width: 20px;
  height: 20px;
  stroke-width: 2.5px;
}

.profile-avatar-large {
  width: 160px;
  height: 160px;
  border-radius: 40px;
  border: 8px solid var(--bg-card);
  object-fit: cover;
  background: var(--bg-sidebar);
}

.profile-content-header {
  margin-top: 24px;
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.profile-info-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-edit-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}

.profile-edit-form {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

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

.profile-input-group label {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-left: 4px;
}

.username-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.username-wrapper .prefix {
  position: absolute;
  left: 14px;
  color: var(--accent-green);
  font-weight: 700;
  font-size: 14px;
  pointer-events: none;
}

.username-wrapper .profile-input {
  padding-left: 32px;
}

.profile-input {
  background: #1c1f26;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  outline: none;
  font-size: 14px;
  width: 200px;
  transition: 0.2s;
}

.profile-input:focus {
  border-color: var(--accent-green);
  background: #252a3d;
}

.profile-save-btn {
  background: var(--accent-green);
  border: 0;
  color: #000;
  font-family: var(--font-heading);
  font-weight: 800;
  border-radius: 12px;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 13px;
  transition: 0.2s;
  height: 45px;
  text-transform: uppercase;
}

/* NEW PREMIUM MODAL DESIGN */
.modal-lg {
  max-width: 1000px;
  width: 95%;
}

.modal-work-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  min-height: 600px;
  background: var(--bg-card);
}

.modal-work-media {
  background: #05060a;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.modal-work-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-work-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(185, 240, 27, 0.05) 0%, transparent 70%);
  z-index: 1;
}

.modal-work-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(22, 25, 38, 1) 0%, rgba(10, 11, 18, 1) 100%);
  border-left: 1px solid var(--border-color);
}

.modal-author-block {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-author-block .user-avatar-mini {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 2px solid rgba(185, 240, 27, 0.2);
}

.modal-author-block .author-display-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  display: block;
}

.modal-author-block .author-handle {
  font-size: 14px;
  color: var(--accent-green);
  font-weight: 600;
}

.modal-work-description {
  flex-grow: 1;
  margin-bottom: 32px;
}

.modal-work-description h4 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.modal-work-description p {
  color: #d0d0d0;
  font-size: 15px;
  line-height: 1.7;
  font-style: italic;
  opacity: 0.9;
}

.modal-work-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.modal-work-stats .m-stat {
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: 0.3s;
}

.modal-work-stats .m-stat:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(185, 240, 27, 0.2);
}

.modal-work-stats .m-stat i {
  width: 20px;
  height: 20px;
  color: var(--accent-purple);
}

.modal-work-stats .m-stat span {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.modal-work-stats .m-stat small {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.btn-full-view {
  background: var(--accent-green);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 900;
  width: 100%;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(185, 240, 27, 0.2);
}

.btn-full-view:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(185, 240, 27, 0.3);
  filter: brightness(1.1);
}

.btn-full-view i {
  width: 20px;
  height: 20px;
  stroke-width: 3px;
}

/* MODAL OVERRIDES */
.modal.is-open .modal-dialog {
  transform: scale(1);
  opacity: 1;
}

.modal-dialog {
  transform: scale(0.95);
  opacity: 0;
  transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  background: #161926;
  padding: 16px 40px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.modal-close {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  padding: 5px;
}

.modal-close:hover {
  color: #fff;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.btn-modal-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s;
  height: 45px;
}

.btn-modal-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
}

body.modal-open {
  overflow: hidden;
}

.profile-save-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.profile-names h1 {
  font-size: 32px;
  font-weight: 850;
  margin: 0 0 4px 0;
  letter-spacing: -0.5px;
}

.profile-handle {
  display: block;
  color: var(--accent-green);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}

.profile-date {
  color: var(--text-muted);
  font-size: 14px;
}

.profile-stats-row {
  display: flex;
  gap: 40px;
  margin-top: 8px;
}

.profile-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.profile-stat-item.accent .stat-value {
  color: var(--accent-green);
}

.empty-state {
  padding: 80px 0;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  border-radius: 24px;
  border: 2px dashed var(--border-color);
}

.empty-state i {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.main-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-nav {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ADMIN PANEL */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.admin-stat-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-stat-card i {
  width: 40px;
  height: 40px;
  color: var(--accent-green);
  background: rgba(209, 244, 64, 0.1);
  padding: 10px;
  border-radius: 12px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-info .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-info .value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

.admin-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
}

.admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-table-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.admin-table-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
}

.admin-table-wrap {
  width: 100%;
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-table thead th {
  text-align: left;
  padding: 14px 22px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-table tbody td {
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table .col-id {
  width: 90px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 800;
}

.admin-table .col-center {
  text-align: center;
  width: 110px;
}

.admin-table .col-right {
  text-align: right;
  width: 160px;
}

.admin-table--challenges .col-cover {
  width: 110px;
}

.admin-cover-thumb {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  display: block;
}

.admin-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
}

.admin-cover-placeholder i {
  width: 20px;
  height: 20px;
}

.admin-challenge-title {
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
}

.admin-challenge-title:hover {
  color: var(--accent-green);
}

.admin-actions-cell {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.file-input-hidden {
  display: none;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.admin-user-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-user-name {
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-handle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-container {
  position: fixed;
  top: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 400px;
  background: rgba(22, 25, 38, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-green);
}

.toast.error::before {
  background: #ff4d4d;
}

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(185, 240, 27, 0.1);
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast.error .toast-icon {
  background: rgba(255, 77, 77, 0.1);
  color: #ff4d4d;
}

.toast-icon i {
  width: 20px;
  height: 20px;
}

.toast-content {
  flex-grow: 1;
}

.toast-message {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.toast-out {
  animation: toast-out 0.4s ease forwards !important;
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
}

.admin-email {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.admin-muted {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.admin-badge--on {
  background: rgba(185, 240, 27, 0.10);
  color: var(--accent-green);
  border: 1px solid rgba(185, 240, 27, 0.25);
}

.admin-badge--off {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.xp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(185, 240, 27, 0.10);
  color: var(--accent-green);
  border: 1px solid rgba(185, 240, 27, 0.18);
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.xp-chip i {
  width: 16px;
  height: 16px;
}

.btn-admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.btn-admin-toggle i {
  width: 16px;
  height: 16px;
}

.btn-admin-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-admin-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn-admin-toggle--ok:hover {
  background: rgba(185, 240, 27, 0.12);
  border-color: rgba(185, 240, 27, 0.25);
}

.btn-admin-toggle--danger:hover {
  background: rgba(255, 71, 71, 0.10);
  border-color: rgba(255, 71, 71, 0.25);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 9999;
  padding: 18px;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 520px;
  background: rgba(12, 13, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-title {
  font-size: 16px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

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

.modal-close:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  background: rgba(255, 255, 255, 0.05);
}

.modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-text {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  line-height: 1.35;
}

.modal-target {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
}

.modal-actions {
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-admin-action {
  background: #1c1f26;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 16px 24px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  transition: 0.2s;
}

.work-view-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.work-main-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.work-media-card {
  background: var(--bg-card);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  line-height: 0;
}

.work-media-full {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: #05060a;
}

.work-description-card {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 32px;
  border: 1px solid var(--border-color);
}

.work-description-card h2 {
  font-size: 20px;
  margin: 0 0 16px 0;
}

.work-description-card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* COMMENTS */
.work-comments-section {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 32px;
  border: 1px solid var(--border-color);
}

.comments-header h3 {
  font-size: 18px;
  margin: 0 0 24px 0;
}

.comment-form {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  align-items: flex-start;
}

.comment-input-wrapper {
  flex-grow: 1;
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.comment-input-wrapper:focus-within {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(185, 240, 27, 0.3);
  box-shadow: 0 0 0 4px rgba(185, 240, 27, 0.05);
}

.comment-input-wrapper textarea {
  width: 100%;
  background: transparent;
  border: 0;
  color: #fff;
  outline: none;
  font-size: 14px;
  resize: none;
  min-height: 40px;
  padding: 10px 4px;
  line-height: 1.4;
}

.btn-send-comment {
  background: var(--accent-green);
  color: #000;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-left: 8px;
}

.btn-send-comment:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.btn-send-comment:active {
  transform: scale(0.95);
}

.btn-send-comment i {
  width: 18px;
  height: 18px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.comment-item {
  display: flex;
  gap: 16px;
}

.comment-content {
  flex-grow: 1;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 700;
  font-size: 14px;
}

.comment-date {
  font-size: 12px;
  color: var(--text-muted);
}

.comment-text {
  font-size: 14px;
  color: #d0d0d0;
  line-height: 1.5;
  margin: 0;
}

.empty-comments {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
}

.empty-comments i {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  opacity: 0.3;
}

/* SIDE COLUMN */
.work-author-card .author-info-main {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
}

.author-names {
  display: flex;
  flex-direction: column;
}

.author-display-name {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.author-display-name:hover {
  color: var(--accent-green);
}

.author-handle {
  font-size: 13px;
  color: var(--accent-green);
  font-weight: 600;
}

.author-stats-mini {
  display: flex;
  gap: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.a-stat {
  display: flex;
  flex-direction: column;
}

.a-stat .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.a-stat .value {
  font-size: 18px;
  font-weight: 800;
}

.a-stat .value.accent {
  color: var(--accent-green);
}

.work-stat-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}

.w-stat {
  display: flex;
  align-items: center;
  gap: 16px;
}

.w-stat i {
  color: var(--accent-purple);
  width: 20px;
  height: 20px;
}

.w-stat-info {
  display: flex;
  flex-direction: column;
}

.w-stat-info .value {
  font-size: 16px;
  font-weight: 700;
}

.w-stat-info .label {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-to-challenge {
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-to-challenge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color);
}

.comment-auth-notice {
  background: rgba(185, 240, 27, 0.05);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  border: 1px dashed rgba(185, 240, 27, 0.2);
  margin-bottom: 24px;
}

.comment-auth-notice a {
  color: var(--accent-green);
  font-weight: 700;
}

.btn-admin-action:hover {
  background: var(--bg-hover);
  border-color: var(--accent-green);
}

.btn-admin-action i {
  color: var(--accent-green);
}

.page-title h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 10px;
}

/* DATEPICKER CUSTOM */
.flatpickr-calendar {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
  border-radius: 20px !important;
  padding: 15px !important;
  animation: fp-fade-in 0.3s ease !important;
  width: 320px !important;
}

.flatpickr-innerContainer {
  display: block !important;
}

.flatpickr-rContainer {
  display: block !important;
  width: 100% !important;
}

.flatpickr-days {
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-around !important;
}

.dayContainer {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-around !important;
}

.flatpickr-day {
  color: #fff !important;
  border-radius: 12px !important;
  transition: 0.2s !important;
  flex-basis: 14.28% !important;
  max-width: 40px !important;
  height: 40px !important;
  line-height: 40px !important;
  margin: 0 !important;
}

.flatpickr-weekdays {
  width: 100% !important;
  display: flex !important;
  justify-content: space-around !important;
  height: 30px !important;
  align-items: center !important;
}

.flatpickr-weekdaycontainer {
  display: flex !important;
  width: 100% !important;
  justify-content: space-around !important;
}

.flatpickr-weekday {
  color: var(--text-muted) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}

.flatpickr-months {
  margin-bottom: 10px !important;
}

.flatpickr-month {
  height: 40px !important;
}

.flatpickr-current-month {
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  left: 0 !important;
  color: #fff !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #fff !important;
  font-weight: 800 !important;
  font-size: 18px !important;
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
}

.flatpickr-monthDropdown-month {
  background: var(--bg-card) !important;
  color: #fff !important;
}

.flatpickr-day:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.flatpickr-day.selected {
  background: var(--accent-green) !important;
  color: #000 !important;
  border-color: var(--accent-green) !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: rgba(255, 255, 255, 0.15) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: rgba(255, 255, 255, 0.1) !important;
  cursor: not-allowed !important;
  background: transparent !important;
}

@keyframes fp-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.flatpickr-calendar.open {
  display: block !important;
  z-index: 9999 !important;
}

.flatpickr-days {
  padding: 0 !important;
}

.flatpickr-innerContainer {
  padding: 0 !important;
}

.flatpickr-months .flatpickr-prev-month, 
.flatpickr-months .flatpickr-next-month {
  color: #fff !important;
  fill: #fff !important;
}

.flatpickr-months .flatpickr-prev-month:hover, 
.flatpickr-months .flatpickr-next-month:hover {
  color: var(--accent-green) !important;
}
/* RATING MEDALS */
.medal-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.medal-badge i {
  width: 20px;
  height: 20px;
  color: #000;
}

.medal-badge.gold {
  background: linear-gradient(135deg, #ffd700, #ffae00);
}

.medal-badge.silver {
  background: linear-gradient(135deg, #e0e0e0, #a0a0a0);
}

.medal-badge.bronze {
  background: linear-gradient(135deg, #cd7f32, #8b4513);
}

.medal-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.rating-container {
  max-width: 1100px;
}

.hall-container {
  max-width: 1100px;
}

.hall-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hall-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 18px;
}

.hall-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 4px 14px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}

.hall-card-title a {
  font-size: 18px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
}

.hall-card-title a:hover {
  color: var(--accent-green);
}

.hall-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.hall-card-meta i {
  width: 16px;
  height: 16px;
  color: var(--accent-green);
}

.hall-winners {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hall-winner-row {
  display: grid;
  grid-template-columns: 64px 1fr 90px 20px;
  gap: 12px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.hall-winner-row:hover {
  transform: translateY(-1px);
  border-color: rgba(185, 240, 27, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

.hall-place {
  font-weight: 900;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hall-place.place-1 {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.25);
  color: #ffd700;
}

.hall-place.place-2 {
  background: rgba(224, 224, 224, 0.12);
  border-color: rgba(224, 224, 224, 0.25);
  color: #e0e0e0;
}

.hall-place.place-3 {
  background: rgba(205, 127, 50, 0.14);
  border-color: rgba(205, 127, 50, 0.25);
  color: #cd7f32;
}

.hall-winner-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hall-work-link {
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hall-work-link:hover {
  color: var(--accent-green);
}

.hall-user-link {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hall-user-link:hover {
  color: rgba(255, 255, 255, 0.85);
}

.hall-votes {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.72);
}

.hall-votes i {
  width: 16px;
  height: 16px;
  color: #ff4d4d;
}

.hall-open {
  display: flex;
  justify-content: flex-end;
  color: rgba(255, 255, 255, 0.35);
}

.hall-open i {
  width: 18px;
  height: 18px;
}

.hall-winner-row:hover .hall-open {
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
  .work-view-container {
    grid-template-columns: 1fr;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .content-scroll {
    padding: 18px;
  }
  .hall-winner-row {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto;
  }
  .hall-votes {
    grid-column: 2;
  }
  .hall-open {
    display: none;
  }
}

.rating-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.podium-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.podium-card:hover {
  transform: translateY(-3px);
  border-color: rgba(185, 240, 27, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.podium-medal {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.podium-medal i {
  width: 20px;
  height: 20px;
  color: #000;
}

.podium-medal.medal-1 {
  background: linear-gradient(135deg, #ffd700, #ffae00);
}

.podium-medal.medal-2 {
  background: linear-gradient(135deg, #e0e0e0, #a0a0a0);
}

.podium-medal.medal-3 {
  background: linear-gradient(135deg, #cd7f32, #8b4513);
}

.podium-avatar {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.podium-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
}

.avatar-fallback i {
  width: 28px;
  height: 28px;
}

.podium-name {
  font-size: 16px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
}

.podium-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.podium-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
  border-radius: 12px;
}

.podium-stat i {
  width: 16px;
  height: 16px;
}

.podium-stat--xp {
  color: var(--accent-green);
}

.rating-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
}

.rating-list-header {
  display: grid;
  grid-template-columns: 120px 1fr 120px 120px;
  gap: 0;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.rating-list {
  display: flex;
  flex-direction: column;
}

.rating-row {
  display: grid;
  grid-template-columns: 120px 1fr 120px 120px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background-color 180ms ease;
}

.rating-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.rating-rank {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.rank-text {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 800;
  padding-left: 12px;
}

.rating-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.rating-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
}

.rating-user-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rating-user-name {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rating-user-handle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rating-works,
.rating-xp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  justify-content: flex-start;
}

.rating-works {
  color: rgba(255, 255, 255, 0.65);
}

.rating-xp {
  color: var(--accent-green);
  justify-content: flex-start;
}

.rating-works i,
.rating-xp i {
  width: 16px;
  height: 16px;
}

@media (max-width: 900px) {
  .rating-podium {
    grid-template-columns: 1fr;
  }
  .rating-list-header,
  .rating-row {
    grid-template-columns: 90px 1fr 90px 90px;
  }
}

@media (max-width: 640px) {
  .rating-list-header {
    display: none;
  }
  .rating-row {
    grid-template-columns: 80px 1fr;
    row-gap: 10px;
  }
  .rating-works,
  .rating-xp {
    grid-column: 2;
  }
}

/* AUTH PAGES */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top right, rgba(185, 240, 27, 0.05), transparent 400px),
              radial-gradient(circle at bottom left, rgba(142, 84, 255, 0.05), transparent 400px),
              var(--bg-dark);
  padding: 20px;
  overflow-y: auto;
}

.auth-card {
  background: var(--bg-card);
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
}

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

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

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: #6a6e7a;
  width: 18px;
  height: 18px;
  pointer-events: none;
  transition: 0.2s;
}

.auth-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 16px 14px 46px;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: 0.2s;
  width: 100%;
}

.auth-input:focus + .input-icon {
  color: var(--accent-green);
}

.password-toggle {
  position: absolute;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6a6e7a;
  cursor: pointer;
  transition: 0.2s;
  border: 0;
  background: transparent;
}

.password-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.auth-input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-green);
  box-shadow: 0 0 0 4px rgba(185, 240, 27, 0.1);
}

.btn-auth-submit {
  background: var(--accent-green);
  color: #000;
  padding: 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.2s;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 10px 20px rgba(185, 240, 27, 0.2);
}

.auth-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--accent-green);
  font-weight: 700;
}

.auth-error {
  background: rgba(255, 71, 71, 0.1);
  color: #ff4747;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 71, 71, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}
