/* ===== Layout Styles =====
 * Главный CSS-файл проекта. Содержит:
 *  - Site layout (sidebar + mobile drawer + main grid)
 *  - Bootstrap 2.3.2 replacement (span3/span9/row-fluid scaffolding)
 *  - Modern UI components (.modern-btn-*, .modern-form-*, .modern-tab*)
 *  - Responsive design (1025+ desktop, 768-1024 tablet, ≤767 mobile)
 *  - YouTube-style video cards, club cards, photo grid, etc.
 *
 * Renamed from sidebar-modern.css 2026-06-18.
 * This file is now THE primary stylesheet (replaces bootstrap.min.css
 * + bootstrap-responsive.css that were deleted the same day).
 */

/* Sidebar column spacing so cards aren’t glued to the edge */
.sidebar-left {
  padding: 16px 8px 0;
}

/* Card container for each sidebar module */
.sidebar-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 16px;
  margin-bottom: 16px;
  transition: box-shadow 0.3s ease;
}
.sidebar-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
}

/* Flat card variant: removes outer border/shadow when inner content
   (e.g. nav-tabs.nav-stacked) already provides its own card chrome */
.sidebar-card-flat {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* Card title */
.sidebar-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Section labels inside a sidebar-card (e.g. "Ещё от автора", "Популярное сейчас")
   — soft uppercase label between groups of cards. */
.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  color: #8898aa;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 12px 0 8px 0;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.sidebar-section-label:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
/* Sub-label inside a section (smaller, no top border) */
.sidebar-section-label--sub {
  border-top: none;
  padding-top: 12px;
  margin-top: 0;
  color: #95a5a6;
}
/* Section grouping for author recommendations */
.sidebar-author-section {
  margin: 0;
}

/* Image grid for humor/photo-random */
.sidebar-img-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sidebar-img-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #eef1f5;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.sidebar-img-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sidebar-img-item img {
  width: 100%;
  height: 100%;
  max-width: 96px;
  max-height: 96px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s ease;
  border-radius: 8px;
}
.sidebar-img-item:hover img {
  transform: scale(1.12);
  filter: brightness(1.05);
}

/* Afisha / thumbnail cards inside sidebar */
.sidebar-thumbnail {
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 10px;
  transition: box-shadow 0.3s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.sidebar-thumbnail:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
}
.sidebar-thumbnail img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.sidebar-thumbnail:hover img {
  transform: scale(1.04);
}
.sidebar-thumbnail .caption {
  padding: 10px 12px 12px;
}
.sidebar-thumbnail .caption p {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.4;
  color: #444;
}
.sidebar-thumbnail .caption p b a {
  color: #1a6fc4;
  font-size: 13px;
}
.sidebar-thumbnail .caption p b a:hover {
  color: #0d4a8a;
}

/* Valute / info badges */
.sidebar-badge {
  display: inline-block;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  border: 1px solid rgba(21,101,192,0.10);
}

/* Login form inside sidebar */
.sidebar-login label {
  font-size: 12px;
  color: #555;
  margin-bottom: 2px;
}
.sidebar-login input[type="text"],
.sidebar-login input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  line-height: 20px;
  height: auto;
  min-height: 32px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sidebar-login input[type="text"]:focus,
.sidebar-login input[type="password"]:focus {
  border-color: #64b5f6;
  box-shadow: 0 0 0 3px rgba(100,181,246,0.15);
  outline: none;
}
.sidebar-login .btn-primary {
  background: var(--c-stihi-grad);
  border: none;
  text-shadow: none;
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
  transition: box-shadow 0.2s;
}
.sidebar-login .btn-primary:hover {
  box-shadow: 0 4px 12px rgba(30,136,229,0.35);
}

/* Reset Bootstrap .thumbnails inside sidebar */
.sidebar-card .thumbnails {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sidebar-card .thumbnails > li {
  margin-left: 0 !important;
}

/* Desktop: breathing room for main content */
.main-content {
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 15px;
  padding-bottom: 15px;
  box-sizing: border-box;
  min-width: 0;
  overflow-x: hidden;
}

/* Section titles inside main content */
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Desktop: cap sidebar width so it doesn't stretch on wide screens */
@media (min-width: 1025px) {
  .row-fluid.has-sidebar {
    display: flex;
    flex-wrap: nowrap;
  }
  .row-fluid.has-sidebar .span3.sidebar-left {
    flex: 0 0 30%;
    width: 30%;
    max-width: 320px;
    float: none;
  }
  .row-fluid.has-sidebar .span9.main-content {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    float: none;
    margin-left: 0;
  }
}

/* Wide screens: sidebar gets more room */
@media (min-width: 1400px) {
  .row-fluid.has-sidebar .span3.sidebar-left {
    max-width: 360px;
  }
}

/* 2K+: sidebar needs even more room */
@media (min-width: 1920px) {
  .row-fluid.has-sidebar .span3.sidebar-left {
    max-width: 400px;
  }
}

/* 4K+: max out sidebar width */
@media (min-width: 2560px) {
  .row-fluid.has-sidebar .span3.sidebar-left {
    max-width: 440px;
  }
}

/* Tablet: sidebar is too narrow at span3 (~23%). Widen to span4 (~32%) */
@media (max-width: 1024px) and (min-width: 768px) {
  .row-fluid.has-sidebar {
    display: flex;
    flex-wrap: nowrap;
  }
  .row-fluid.has-sidebar .span3.sidebar-left {
    flex: 0 0 31.914894%;
    width: 31.914894%;
    max-width: none;
    float: none;
  }
  .row-fluid.has-sidebar .span9.main-content {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    float: none;
    margin-left: 0;
  }
  .sidebar-left {
    padding: 16px 4px 0;
  }
  .sidebar-card {
    padding: 12px;
  }
  .sidebar-card-title {
    font-size: 12px;
  }
  .sidebar-author-row {
    gap: 8px;
    margin-bottom: 10px;
  }
  .sidebar-author-avatar img {
    width: 36px;
    height: 36px;
  }
  .sidebar-author-name a {
    font-size: 12px;
  }
  .sidebar-author-btn {
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
  }
  .sidebar-poem-list li a {
    font-size: 12px;
  }
}

/* Mobile adaptations */
@media (max-width: 767px) {
  /* Use .row-fluid prefix to override bootstrap-responsive [class*="span"].
     !important is required because .row-fluid [class*="span"] (later in the
     stylesheet) sets `display: block` and would otherwise win on equal
     specificity (both 0,0,2,0). Without it, aside.sidebar-left stays visible
     on mobile and the content below it is duplicated (once in the mobile
     drawer, once in the desktop aside). */
  .row-fluid .sidebar-left {
    display: none !important;
  }
  .row-fluid .main-content {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 0 12px;
    box-sizing: border-box;
  }
  .sidebar-card {
    padding: 12px;
    margin-bottom: 12px;
  }
  .sidebar-section-label {
    font-size: 10px;
    margin: 10px 0 6px 0;
    padding-top: 8px;
  }
  .sidebar-section-label--sub {
    padding-top: 10px;
  }
  .sidebar-img-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .sidebar-thumbnail img {
    height: 120px;
  }
  /* Disable hover lift on touch devices for performance */
  .sidebar-card:hover,
  .sidebar-thumbnail:hover {
    transform: none;
  }
}

/* ===== YouTube-style video cards ===== */
.yt-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.yt-video-card {
  display: flex;
  flex-direction: column;
}
.yt-video-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #eef1f5;
  aspect-ratio: 16 / 9;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease;
}
.yt-video-thumb:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.yt-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.yt-video-thumb:hover img {
  transform: scale(1.04);
}
.yt-video-meta {
  padding: 10px 4px 0;
}
.yt-video-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0d0d0d;
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 4px;
}
.yt-video-title:hover {
  color: #1a6fc4;
}
.yt-video-author {
  font-size: 13px;
  color: #606060;
  margin-bottom: 2px;
}
.yt-video-stats {
  font-size: 12px;
  color: #606060;
}

/* Sidebar video grid: single column */
.yt-video-grid-sidebar {
  grid-template-columns: 1fr;
  gap: 12px;
}
.yt-video-grid-sidebar .yt-video-thumb {
  border-radius: 8px;
}
.yt-video-grid-sidebar .yt-video-title {
  font-size: 13px;
  -webkit-line-clamp: 3;
  max-height: 4em;
}
.yt-video-grid-sidebar .yt-video-author {
  font-size: 12px;
}
.yt-video-grid-sidebar .yt-video-stats {
  font-size: 11px;
}

/* Responsive video grid */
@media (max-width: 979px) {
  .yt-video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .yt-video-grid-sidebar {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .yt-video-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .yt-video-grid-sidebar {
    grid-template-columns: 1fr;
  }
}

/* ===== Club cards ===== */
.club-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
}
.club-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.club-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.club-card-thumb {
  position: relative;
  overflow: hidden;
  background: #eef1f5;
  aspect-ratio: 16 / 9;
}
.club-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.club-card:hover .club-card-thumb img {
  transform: scale(1.04);
}
.club-card-meta {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.club-card-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
.club-card-title:hover {
  color: var(--c-stihi);
}
.club-card-desc {
  font-size: 13px;
  color: #606060;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: 2.9em;
}
.club-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
  color: #8898aa;
}
.club-card-footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.club-card-footer i {
  color: #f58500;
}

/* Sidebar club cards */
.club-grid-sidebar {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}
.club-grid-sidebar .club-card-thumb {
  border-radius: 0;
}
.club-grid-sidebar .club-card-title {
  font-size: 13px;
}
.club-grid-sidebar .club-card-meta {
  padding: 10px 12px;
}

/* Responsive club grid */
@media (max-width: 979px) {
  .club-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}
@media (max-width: 480px) {
  .club-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Photo-random inside main content (between video and music) */
.main-content .sidebar-card .sidebar-img-grid {
  max-width: 520px;
  margin: 0 auto;
}
.main-content .sidebar-img-item img {
  max-width: 156px;
  max-height: 156px;
}

/* Single-row photo strip: overflow hides what does not fit */
.sidebar-img-grid-single-row {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 8px;
}
/* Override the 520px limit from .main-content .sidebar-card .sidebar-img-grid */
.main-content .sidebar-card .sidebar-img-grid-single-row {
  max-width: none;
  margin: 0;
}
.sidebar-img-grid-single-row .sidebar-img-item {
  flex: 0 0 auto;
  width: 120px;
  height: 120px;
}
.sidebar-img-grid-single-row .sidebar-img-item img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

@media (max-width: 480px) {
  .sidebar-img-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .sidebar-img-grid-single-row .sidebar-img-item {
    width: 90px;
    height: 90px;
  }
}

/* ===== Music Author Grid (main page) ===== */
.music-author-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.music-author-card {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.2s ease;
}
.music-author-card:last-child {
  border-bottom: none;
}
.music-author-card:hover {
  background: rgba(0,0,0,0.01);
}
.music-author-visual {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.music-author-visual .author-thumb {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #eef1f5;
  aspect-ratio: 16 / 9;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease;
}
.music-author-visual .author-thumb:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.music-author-visual .author-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.music-author-visual .author-thumb:hover img {
  transform: scale(1.04);
}
.music-author-visual .author-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a6fc4;
  text-align: center;
}
.music-author-visual .author-name:hover {
  color: #0d4a8a;
}
.music-author-tracks {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* Track row with number + hover play */
.music-author-tracks .music-track {
  padding: 8px 10px;
  gap: 12px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}
.music-author-tracks .music-track:first-child {
  padding-top: 0;
}
.music-author-tracks .music-track:last-child {
  padding-bottom: 0;
}
.music-author-tracks .music-track:hover {
  background: rgba(0,0,0,0.03);
}

/* Track indicator wrapper */
.track-indicator {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.track-number,
.track-play-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}
.track-number {
  font-size: 13px;
  font-weight: 600;
  color: #999;
  opacity: 1;
  visibility: visible;
}
.track-play-btn {
  background: var(--c-stihi-grad);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9);
  padding: 0;
}
.track-play-btn i,
.track-play-btn .ico {
  font-size: 12px;
  line-height: 1;
  position: absolute;
  top: calc(50% - 1px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
}
.music-track:hover .track-number {
  opacity: 0;
  visibility: hidden;
}
.music-track:hover .track-play-btn {
  opacity: 0.7;
  visibility: visible;
  transform: scale(1);
}
.track-play-btn:hover {
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(30,136,229,0.35);
}

.music-author-tracks .music-track-artist {
  font-size: 12px;
}
.music-author-tracks .music-track-name {
  font-size: 11px;
}

@media (max-width: 767px) {
  .music-author-card {
    flex-direction: column;
    gap: 12px;
    padding: 12px 0;
  }
  .music-author-visual {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* ===== Modern Music Player ===== */
.music-player {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 16px;
  margin-bottom: 16px;
}
.modern-form-card .music-player {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0;
}
.music-player-title {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.music-track-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.music-track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.2s ease;
  border-radius: 8px;
  margin-bottom: 2px;
}
.music-track:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.music-track:hover {
  background: rgba(0,0,0,0.04);
}
.music-track-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-stihi-grad);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
}
.music-track-play:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(30,136,229,0.35);
}
.music-track-play i {
  font-size: 14px;
}
.music-track-info {
  flex: 1;
  min-width: 0;
}
.music-track-artist {
  font-size: 13px;
  font-weight: 600;
  color: #0d0d0d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-track-name {
  font-size: 12px;
  color: #606060;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-track-meta {
  font-size: 11px;
  color: #999;
  flex-shrink: 0;
  text-align: right;
}
.music-track-meta span {
  display: block;
}
.music-track-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #f39c12;
  font-size: 11px;
}

/* Audio element hidden */
#music-audio {
  display: none;
}

.music-player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f0f2f5;
  border-radius: 8px;
  margin-bottom: 12px;
}
.music-player-bar button {
  background: none;
  border: none;
  color: var(--c-stihi);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
}
.music-player-bar .progress {
  flex: 1;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}
.music-player-bar .progress-bar {
  height: 100%;
  background: var(--c-stihi-grad-h);
  width: 0%;
  transition: width 0.1s linear;
}
.music-player-bar .time {
  font-size: 11px;
  color: #666;
  min-width: 70px;
  text-align: right;
}

/* ===== Global Floating Music Player ===== */
.global-music-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.10);
  padding: 10px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.global-music-player.active {
  display: flex;
  transform: translateY(0);
}
.global-music-player .gmp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #eef1f5;
}
.global-music-player .gmp-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.global-music-player .gmp-title {
  font-size: 13px;
  font-weight: 600;
  color: #0d0d0d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-music-player .gmp-artist {
  font-size: 12px;
  color: #606060;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-music-player .gmp-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.global-music-player .gmp-controls button {
  background: none;
  border: none;
  color: var(--c-stihi);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.global-music-player .gmp-controls .gmp-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-stihi-grad);
  color: #fff;
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
  font-size: 18px;
}
.global-music-player .gmp-progress-wrap {
  flex: 1;
  min-width: 80px;
  cursor: pointer;
  padding: 8px 0;
}
.global-music-player .gmp-progress {
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  overflow: hidden;
}
.global-music-player .gmp-progress-bar {
  height: 100%;
  background: var(--c-stihi-grad-h);
  width: 0%;
  transition: width 0.1s linear;
}
.global-music-player .gmp-time {
  font-size: 11px;
  color: #666;
  min-width: 80px;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}
.global-music-player .gmp-close {
  color: #999;
  font-size: 16px;
  padding: 4px;
  cursor: pointer;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .global-music-player {
    gap: 8px;
    padding: 8px 10px;
  }
  .global-music-player .gmp-avatar {
    width: 36px;
    height: 36px;
  }
  .global-music-player .gmp-progress-wrap {
    display: none;
  }
  .global-music-player .gmp-time {
    min-width: auto;
  }
}

/* Music player SVG icon styles */
.music-track-play .ico,
.global-music-player .ico {
  width: 1em;
  height: 1em;
  fill: currentColor;
  stroke: none;
  vertical-align: middle;
}
.music-track-play .ico {
  width: 16px;
  height: 16px;
}
.global-music-player .gmp-controls button .ico {
  width: 18px;
  height: 18px;
}
.global-music-player .gmp-play .ico {
  width: 18px;
  height: 18px;
}
.global-music-player .gmp-close .ico {
  width: 14px;
  height: 14px;
}
.music-track-rating .ico {
  width: 12px;
  height: 12px;
  fill: #f39c12;
}
.music-track-actions .ico {
  width: 14px;
  height: 14px;
}

/* ===== Modern Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
  margin: 0;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.pagination p {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.pagination p a,
.pagination p span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.pagination p a {
  color: #1a6fc4;
  background: #f0f4f8;
  border: 1px solid rgba(0,0,0,0.04);
}
.pagination p a:hover {
  background: var(--c-stihi-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
}
.pagination p a:focus-visible {
  outline: 2px solid var(--c-stihi, #1e88e5);
  outline-offset: 2px;
  background: var(--c-stihi-grad);
  color: #fff;
}
.pagination p span {
  color: #fff;
  background: var(--c-stihi-grad);
  border: 1px solid transparent;
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
  cursor: default;
}
.pagination h4 {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin: 0;
  padding: 0;
  border: none;
  text-align: right;
  white-space: nowrap;
}

/* pagination() generates <ul><li> — style those too */
.pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.pagination li {
  display: inline-flex;
}
.pagination li a,
.pagination li span.current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.pagination li a {
  color: #1a6fc4;
  background: #f0f4f8;
  border: 1px solid rgba(0,0,0,0.04);
}
.pagination li a:hover {
  background: var(--c-stihi-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
}
.pagination li a:focus-visible {
  outline: 2px solid var(--c-stihi, #1e88e5);
  outline-offset: 2px;
  background: var(--c-stihi-grad);
  color: #fff;
}
.pagination li.disabled a {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.pagination li span.current {
  color: #fff;
  background: var(--c-stihi-grad);
  border: 1px solid transparent;
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
}

/* ===== User Cards (modern replacement for table layout) ===== */
.user-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
}

.user-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 12px;
  text-align: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  overflow: hidden;
  box-sizing: border-box;
}
.user-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}

/* Override get_user_html fixed width */
.user-card > div {
  width: auto !important;
  min-width: 0;
}

/* Photo wrapper — no inner shadow; parent .user-card already casts the shadow */
.user-card .img_border,
.user-card .img_hb {
  display: block;
  width: 100%;
  max-width: 128px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 auto 8px;
  padding: 0;
  border: none;
  background: #eef1f5;
}
.user-card .img_hb {
  box-shadow: 0 0 0 2px #4caf50; /* online ring only — no extra drop-shadow */
}

/* Remove mod-box-gradient decorative frame inside main content */
.main-content .mod-box-gradient .box-1,
.main-content .mod-box-gradient .box-2,
.main-content .mod-box-gradient .box-3,
.main-content .mod-box-gradient .box-t1,
.main-content .mod-box-gradient .box-t2,
.main-content .mod-box-gradient .box-t3,
.main-content .mod-box-gradient .box-b1,
.main-content .mod-box-gradient .box-b2,
.main-content .mod-box-gradient .box-b3 {
  background: none !important;
  border: none !important;
  padding: 0 !important;
}
.main-content .mod-box-gradient .box-3 {
  background: transparent !important;
}

/* Status icon row */
.user-card a[href="help/status"] {
  display: inline-block;
  margin: 4px 0;
}
.user-card a[href="help/status"] img {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.user-card a[href="help/status"] img[src*="vip"] {
  filter: drop-shadow(0 0 4px rgba(255,193,7,0.6));
  animation: vip-pulse 2s ease-in-out infinite;
}
.user-card a[href="help/status"] img[src*="star"] {
  filter: drop-shadow(0 0 3px rgba(244,67,54,0.5));
}

@keyframes vip-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(255,193,7,0.6)); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 8px rgba(255,193,7,0.9)); }
}

/* Online indicator */
.user-card .user_online {
  display: inline-block;
  margin: 2px 0;
}
.user-card .user_online img {
  width: 12px;
  height: 12px;
  vertical-align: middle;
}

/* User name */
.user-card .user_name {
  font-size: 13px;
  font-weight: 600;
  color: #1a6fc4;
  margin: 6px 0 2px;
  line-height: 1.3;
  word-break: break-word;
}
.user-card .user_name a {
  color: #1a6fc4;
  text-decoration: none;
}
.user-card .user_name a:hover {
  color: #0d4a8a;
}

/* Country / city */
.user-card .user_country {
  font-size: 11px;
  color: #888;
  margin: 0;
  line-height: 1.3;
  word-break: break-word;
}

/* Gift icon */
.user-card #gift_0 {
  margin: 4px 0;
}
.user-card #gift_0 img {
  width: 28px;
  height: 28px;
  vertical-align: middle;
}

/* Balloon/comment (marquee area) */
.user-card #ballon {
  display: none; /* Hide old marquee on cards, too noisy */
}

/* Responsive grid */
@media (max-width: 767px) {
  .user-card-grid {
    gap: 12px;
  }
  .user-card {
    padding: 10px;
  }
}
@media (max-width: 480px) {
  .user-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .user-card {
    padding: 8px;
    border-radius: 8px;
  }
  .user-card .user_name {
    font-size: 12px;
  }
  .user-card .user_country {
    font-size: 10px;
  }
}

/* 5 columns for mid-wide: 40 cards = 8 full rows */
@media (min-width: 1100px) and (max-width: 1919px) {
  .user-card-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }
}

/* ===== Ultra-wide / 2K+ desktop ===== */
@media (min-width: 1920px) {
  .yt-video-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
  }
  .yt-video-grid-sidebar {
    grid-template-columns: 1fr;
  }
  .user-card-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 18px;
  }
  .music-author-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 24px;
  }
  .music-author-card {
    padding: 20px 0;
  }
  .sidebar-img-grid {
    grid-template-columns: repeat(9, 1fr);
    gap: 10px;
  }
  .main-content .sidebar-card .sidebar-img-grid {
    max-width: none;
    margin: 0;
  }
  .main-content .sidebar-img-item img {
    max-width: none;
    max-height: none;
  }
}

@media (min-width: 2560px) {
  .yt-video-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }
  .yt-video-grid-sidebar {
    grid-template-columns: 1fr;
  }
  .user-card-grid {
    gap: 20px;
  }
  .music-author-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 28px;
  }
}

/* ===== Modern Forms (login / registration) ===== */
.modern-form-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 36px 40px;
  max-width: 520px;
  margin: 0 auto 24px;
  box-sizing: border-box;
}

.modern-form-card.modern-form-wide {
  max-width: 720px;
}

/* Terms card on profile pages: left-aligned, wider on large screens */
.modern-form-card.modern-form-card--terms {
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}
.modern-form-card.modern-form-card--terms h4 {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin: 20px 0 12px 0;
}
.modern-form-card.modern-form-card--terms ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}
.modern-form-card.modern-form-card--terms ul li {
  margin-bottom: 10px;
}
.modern-form-card.modern-form-card--terms ul li:last-child {
  margin-bottom: 0;
}

/* Wide left-aligned card (profile edit, settings, photo forms) */
.modern-form-card.modern-form-card--wide-left {
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.modern-form-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 24px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.modern-form-card p.lead {
  font-size: 14px;
  color: #555;
  margin: 0 0 24px 0;
  line-height: 1.6;
}

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

.modern-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modern-form-group.half {
  flex: 1 1 0;
  min-width: 0;
}
.modern-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.modern-form-row.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.modern-form-label {
  font-size: 14px;
  font-weight: 500;
  color: #444;
}
input.modern-form-input,
select.modern-form-select,
textarea.modern-form-input {
  padding: 10px 14px;
  font-size: 14px;
  color: #333;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box;
  width: 100%;
}
input.modern-form-input,
select.modern-form-select {
  height: 44px;
}
textarea.modern-form-input {
  height: auto;
  resize: vertical;
  line-height: 1.5;
}

/* input-append used by datetimepicker inside modern forms */
.modern-form-group .input-append {
  display: flex;
  width: 100%;
}
.form_datetime {
  position: relative;
}
.modern-form-group .input-append input.modern-form-input {
  flex: 1;
  border-radius: 8px 0 0 8px;
  width: auto;
}
.modern-form-group .input-append .add-on {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 44px;
  padding: 0;
  background: #f5f5f5;
  border: 1px solid rgba(0,0,0,0.12);
  border-left: none;
  color: #777;
  cursor: pointer;
  font-size: 14px;
  box-sizing: border-box;
}
.modern-form-group .input-append .add-on:last-child {
  border-radius: 0 8px 8px 0;
}
.modern-form-group .input-append .add-on:hover {
  background: #ececec;
}

input.modern-form-input:focus,
select.modern-form-select:focus,
textarea.modern-form-input:focus {
  border-color: var(--c-stihi-light);
  box-shadow: 0 0 0 3px rgba(66,165,245,0.15), inset 0 1px 2px rgba(0,0,0,0.03);
}

.modern-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.modern-form-checkbox {
  display: block;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  line-height: 1.5;
}
.modern-form-checkbox input[type="checkbox"] {
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  accent-color: var(--c-stihi-light);
  cursor: pointer;
}

.modern-form-error {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  border: 1px solid rgba(244,67,54,0.25);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #c62828;
  margin-bottom: 16px;
}

.modern-form-success {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 1px solid rgba(76,175,80,0.25);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #2e7d32;
  margin-bottom: 16px;
}

.modern-form-section {
  font-size: 15px;
  font-weight: 600;
  color: #444;
  margin: 24px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.modern-form-help {
  font-size: 13px;
  color: #888;
  margin-top: 6px;
  font-style: italic;
}

input.modern-btn-primary,
a.modern-btn-primary,
button.modern-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--c-stihi-grad);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
input.modern-btn-primary:hover,
a.modern-btn-primary:hover,
button.modern-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30,136,229,0.35);
}
input.modern-btn-primary:focus,
input.modern-btn-primary:focus-visible,
a.modern-btn-primary:focus,
a.modern-btn-primary:focus-visible,
button.modern-btn-primary:focus,
button.modern-btn-primary:focus-visible {
  outline: 2px solid #1a6fc4;
  outline-offset: 2px;
  box-shadow: 0 4px 12px rgba(30,136,229,0.35);
}

input.modern-btn-secondary,
a.modern-btn-secondary,
button.modern-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-stihi);
  background: #fff;
  border: 1px solid rgba(30,136,229,0.25);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
input.modern-btn-secondary:hover,
a.modern-btn-secondary:hover,
button.modern-btn-secondary:hover {
  background: rgba(66,165,245,0.08);
  border-color: rgba(30,136,229,0.4);
}
input.modern-btn-secondary:focus,
input.modern-btn-secondary:focus-visible,
a.modern-btn-secondary:focus,
a.modern-btn-secondary:focus-visible,
button.modern-btn-secondary:focus,
button.modern-btn-secondary:focus-visible {
  outline: 2px solid #1a6fc4;
  outline-offset: 2px;
}

/* Modern tabs — reusable for any page */
.modern-tabs,
.tabbable .nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 20px;
  list-style: none;
  padding-left: 0;
}

.modern-tabs > li,
.tabbable .nav-tabs > li {
  display: inline-flex;
}

.modern-tab,
.modern-tabs > a,
.tabbable .nav-tabs > li > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  border-radius: 8px 8px 0 0;
  border: none;
  background: none;
  transition: all 0.2s ease;
  position: relative;
}

.modern-tab:hover,
.modern-tabs > a:hover,
.tabbable .nav-tabs > li > a:hover {
  color: var(--c-stihi);
  background: rgba(66,165,245,0.04);
}
.modern-tab:focus-visible,
.modern-tabs > a:focus-visible,
.tabbable .nav-tabs > li > a:focus-visible {
  outline: 2px solid var(--c-stihi-light, #42a5f5);
  outline-offset: -2px;
  color: var(--c-stihi);
  background: rgba(66,165,245,0.04);
}

.modern-tab.active,
.modern-tabs > a.active,
.tabbable .nav-tabs > li.active > a {
  color: var(--c-stihi);
  background: rgba(66,165,245,0.06);
}

.modern-tab.active::after,
.modern-tabs > a.active::after,
.tabbable .nav-tabs > li.active > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--c-stihi);
  border-radius: 2px 2px 0 0;
}

.modern-tab-count,
.tabbable .nav-tabs .modern-tab-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,0.05);
  padding: 2px 8px;
  border-radius: 10px;
  color: #888;
}

.modern-tab.active .modern-tab-count,
.tabbable .nav-tabs > li.active > a .modern-tab-count {
  background: rgba(30,136,229,0.12);
  color: var(--c-stihi);
}

input.modern-btn-outline,
a.modern-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
input.modern-btn-outline:hover,
a.modern-btn-outline:hover {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.2);
}
input.modern-btn-outline:focus,
input.modern-btn-outline:focus-visible,
a.modern-btn-outline:focus,
a.modern-btn-outline:focus-visible {
  outline: 2px solid #5b9dd9;
  outline-offset: 2px;
  border-color: rgba(0,0,0,0.32);
}

.modern-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.modern-form-actions--split {
  justify-content: space-between;
}

.modern-form-group--inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.modern-form-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #444;
  cursor: pointer;
  line-height: 1.4;
}
.modern-form-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--c-stihi);
  flex-shrink: 0;
  cursor: pointer;
}

.modern-form-divider {
  height: 1px;
  background: rgba(0,0,0,0.06);
  margin: 12px 0;
}

/* Drag & Drop upload zone */
.modern-dropzone {
  border: 2px dashed rgba(0,0,0,0.15);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  background: #fafbfc;
  transition: all 0.2s ease;
  cursor: pointer;
}

.modern-dropzone:hover {
  border-color: rgba(66,165,245,0.5);
  background: #f0f7ff;
}

.modern-dropzone.drop-active {
  border-color: var(--c-stihi-light);
  background: #e3f2fd;
}

.modern-dropzone-icon {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}

.modern-dropzone-text {
  font-size: 14px;
  color: #777;
}

.modern-dropzone-current {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

.modern-dropzone img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin: 0 auto;
  display: block;
}

/* Info card alongside form */
.modern-info-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 32px 36px;
  max-width: 520px;
  margin: 0 auto 24px;
  box-sizing: border-box;
}
.modern-info-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 12px 0;
}
.modern-info-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0 0 14px 0;
}
.modern-info-card p:last-child {
  margin-bottom: 0;
}

/* Sticky footer: all pages */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
/* .row-fluid is the real content wrapper (it sits outside .container due to an
   unmatched </div> in header output). Give flex-grow to .row-fluid so the
   footer stays at the bottom on short pages. */
body > .container {
  flex: 0 0 auto;
}
body > .row-fluid {
  flex: 1 0 auto;
}
#footer,
.footer {
  flex-shrink: 0;
}

/* Auth pages: center the form card vertically on screen */
body.login .row-fluid,
body.registration .row-fluid,
body.remember .row-fluid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}
/* Hide Bootstrap clearfix pseudo-elements so they don't become empty flex items */
body.login .row-fluid::before,
body.login .row-fluid::after,
body.registration .row-fluid::before,
body.registration .row-fluid::after,
body.remember .row-fluid::before,
body.remember .row-fluid::after {
  display: none;
}
/* Make main-content a flex column that centers its child card */
body.login .row-fluid .main-content,
body.registration .row-fluid .main-content,
body.remember .row-fluid .main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  float: none;
  width: 100%;
  margin-left: 0;
}
/* Remove bottom margin from cards so they center precisely */
body.login .modern-form-card,
body.registration .modern-form-card,
body.registration .modern-info-card,
body.remember .modern-form-card {
  margin: 0 auto;
}
/* Add spacing between stacked cards on registration */
body.registration .main-content {
  gap: 24px;
}

/* Mobile: auth pages should use full width without side padding/borders */
@media (max-width: 767px) {
  .modern-form-card,
  .modern-info-card {
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 24px 16px;
    margin: 0 auto;
    box-shadow: none;
    background: #fff;
  }
  .modern-form-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 10px;
  }
  .modern-form-card p.lead {
    font-size: 13px;
    margin-bottom: 16px;
  }
  .modern-form {
    gap: 16px;
  }
  .modern-form-actions {
    gap: 10px;
  }
  input.modern-btn-primary,
  a.modern-btn-primary,
  button.modern-btn-primary,
  input.modern-btn-secondary,
  a.modern-btn-secondary,
  button.modern-btn-secondary {
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
  }
  input.modern-btn-outline,
  a.modern-btn-outline {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
  }
  .modern-info-card h4 {
    font-size: 15px;
  }
  .modern-info-card p {
    font-size: 13px;
    margin-bottom: 10px;
  }
  /* Remove extra auth centering offsets on mobile */
  body.login .modern-form-card,
  body.registration .modern-form-card,
  body.registration .modern-info-card,
  body.remember .modern-form-card {
    margin: 0 auto;
  }
}

/* Large screens: double the width of wide-left and terms cards */
@media (min-width: 1200px) {
  .modern-form-card.modern-form-card--wide-left,
  .modern-form-card.modern-form-card--terms {
    max-width: 1040px;
  }
}

/* ===== Afisha Page Styles ===== */
.afisha-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.afisha-btn {
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  text-shadow: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.afisha-btn-success {
  background: #5bb75b;
  border-color: #51a351;
  color: #fff;
}

.afisha-btn-success:hover {
  background: #51a351;
  color: #fff;
}

.afisha-btn-primary {
  background: #006dcc;
  border-color: #0044cc;
  color: #fff;
}

.afisha-btn-primary:hover {
  background: #0044cc;
  color: #fff;
}

.afisha-btn-outline {
  background: #fff;
  color: #555;
  border-color: rgba(0,0,0,0.15);
}

.afisha-btn-outline:hover {
  background: #f5f5f5;
  color: #333;
  border-color: rgba(0,0,0,0.25);
}

.afisha-section {
  margin-bottom: 32px;
}

.afisha-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
  .afisha-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .afisha-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .afisha-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1600px) {
  .afisha-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 2560px) {
  .afisha-grid {
    grid-template-columns: repeat(10, 1fr);
  }
}

.afisha-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.afisha-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-3px);
}

.afisha-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef1f5;
}

.afisha-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* No 2x afisha source exists (256x256 is the only resize),
     so let the browser do its best with bicubic scaling on retina. */
  image-rendering: auto;
}

.afisha-card:hover .afisha-card-img-wrap img {
  transform: scale(1.08);
}

.afisha-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.afisha-badge-hot {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.afisha-badge-soon {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.afisha-badge-past {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.afisha-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.afisha-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.afisha-card-title a {
  color: #2c3e50;
  text-decoration: none;
}

.afisha-card-title a:hover {
  color: #3498db;
}

.afisha-card-meta {
  font-size: 11px;
  color: #7f8c8d;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}

.afisha-card-meta i {
  margin-right: 4px;
  opacity: 0.7;
}

.afisha-card-city {
  font-size: 11px;
  color: #7f8c8d;
  margin-bottom: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.afisha-card-city i {
  margin-right: 4px;
  opacity: 0.7;
}

.afisha-card-cost {
  font-size: 13px;
  font-weight: 600;
  color: #27ae60;
  margin-top: auto;
  padding-top: 8px;
}

/* Empty state for upcoming events */
.afisha-empty {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px dashed rgba(52, 152, 219, 0.25);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.afisha-empty-icon {
  font-size: 80px;
  color: #3498db;
  margin-bottom: 20px;
  padding-top: 16px;
  line-height: 1.2;
}

.afisha-empty-text {
  font-size: 18px;
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 20px;
  line-height: 1.5;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.afisha-empty .btn-large {
  padding: 10px 28px;
  font-size: 15px;
  border-radius: 8px;
  line-height: 1.4;
}

.afisha-empty .btn-large i {
  vertical-align: middle;
  margin-top: -2px;
}

/* ===== Games Grid ===== */
.games-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) {
  .games-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .games-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1600px) {
  .games-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.game-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.game-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-3px);
}

.game-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef1f5;
}

.game-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.game-card:hover .game-card-thumb img {
  transform: scale(1.08);
}

.game-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 8px 0;
  line-height: 1.3;
  word-break: break-word;
}

.game-card-meta {
  font-size: 11px;
  color: #7f8c8d;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: auto;
}

.game-card-badge {
  display: inline-block;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(21,101,192,0.10);
}

.game-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* Games filter chips */
.games-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  align-items: center;
}

.games-chip,
.games-chip-active {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.games-chip {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  color: #555;
  border-color: rgba(0,0,0,0.08);
}

.games-chip:hover {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  border-color: rgba(21,101,192,0.15);
  text-decoration: none;
}

.games-chip-active {
  background: var(--c-stihi-grad);
  color: #fff;
  border-color: rgba(30,136,229,0.25);
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
}

/* Game player page */
.game-meta-header {
  margin-bottom: 16px;
}

.game-back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--c-stihi);
  text-decoration: none;
  margin-bottom: 8px;
  font-weight: 600;
}

.game-back-link:hover {
  color: #0d4a8a;
  text-decoration: none;
}

.game-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.game-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.game-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 80vh;
  background: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  margin-bottom: 12px;
}

.game-player-wrap embed,
.game-player-wrap object,
.game-player-wrap ruffle-embed,
.game-player-wrap ruffle-object,
.game-player-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.game-player-fullscreen {
  aspect-ratio: auto !important;
  max-height: none !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
}

.game-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.game-description {
  margin-top: 8px;
}

/* Sidebar random games */
.game-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-sidebar-item {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.game-sidebar-item:hover {
  background: rgba(0,0,0,0.04);
  text-decoration: none;
}

.game-sidebar-thumb-wrap {
  flex: 0 0 64px;
  width: 64px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #eef1f5;
}

.game-sidebar-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-sidebar-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-sidebar-title {
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-sidebar-type {
  font-size: 11px;
  color: #7f8c8d;
}

/* Modern button helpers (games page) */
.modern-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  color: #555;
  border: 1px solid rgba(0,0,0,0.10);
  transition: all 0.2s ease;
  cursor: pointer;
}

.modern-btn-outline:hover {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  border-color: rgba(21,101,192,0.15);
  text-decoration: none;
}

/* Empty state for poet stihi */
.stihi-empty {
  text-align: center;
  padding: 32px 24px;
  margin: 16px 0;
}

.stihi-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  line-height: 1.2;
}

.stihi-empty-text {
  font-size: 18px;
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 24px;
  line-height: 1.5;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Section titles */
.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(52, 152, 219, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Afisha Detail Page ===== */
.afisha-detail {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 24px;
}

.afisha-detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef1f5;
}

.afisha-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.afisha-detail-hero:hover img {
  transform: scale(1.04);
}

.afisha-detail-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.afisha-detail-badge-upcoming {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.afisha-detail-badge-past {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.afisha-detail-body {
  padding: 28px 32px 32px;
}

.afisha-detail-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.afisha-detail-desc {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 24px;
  white-space: pre-line;
}

.afisha-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
  margin-bottom: 28px;
}

.afisha-detail-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.afisha-detail-meta-label {
  font-size: 12px;
  font-weight: 600;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.afisha-detail-meta-label i {
  font-size: 14px;
  opacity: 0.7;
}

.afisha-detail-meta-value {
  font-size: 15px;
  font-weight: 500;
  color: #2c3e50;
}

.afisha-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.afisha-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.afisha-detail-btn:hover {
  background: #f5f7fa;
  border-color: rgba(0,0,0,0.18);
  color: #333;
}

.afisha-detail-btn i {
  font-size: 13px;
  opacity: 0.8;
}

.afisha-detail-btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
}

.afisha-detail-btn-primary {
  background: var(--c-stihi-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
}

.afisha-detail-btn-primary:hover {
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(30,136,229,0.35);
}

.afisha-detail-btn-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 6px rgba(230,126,34,0.25);
}

.afisha-detail-btn-warning:hover {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(230,126,34,0.35);
}

.afisha-detail-btn-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 6px rgba(192,57,43,0.25);
}

.afisha-detail-btn-danger:hover {
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(192,57,43,0.35);
}

.afisha-detail-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.afisha-detail-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.afisha-detail-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.afisha-detail-author-action {
  font-size: 14px;
  color: #555;
}

.afisha-detail-author-action a {
  color: #1a6fc4;
  font-weight: 600;
  text-decoration: none;
}

.afisha-detail-author-action a:hover {
  color: #0d4a8a;
}

.afisha-detail-author-date {
  font-size: 12px;
  color: #999;
}

/* Mobile detail page */
@media (max-width: 767px) {
  .afisha-detail-body {
    padding: 20px 18px 24px;
  }
  .afisha-detail-title {
    font-size: 20px;
  }
  .afisha-detail-desc {
    font-size: 14px;
    margin-bottom: 20px;
  }
  .afisha-detail-meta {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 22px;
  }
  .afisha-detail-meta-value {
    font-size: 14px;
  }
  .afisha-detail-actions {
    gap: 8px;
    margin-bottom: 22px;
    padding-bottom: 22px;
  }
  .afisha-detail-btn {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }
  .afisha-detail-author img {
    width: 40px;
    height: 40px;
  }
  .afisha-detail-author-action {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .afisha-detail-hero {
    aspect-ratio: 4 / 3;
  }
  .afisha-detail-title {
    font-size: 18px;
  }
}

/* Wide-screen: compact centered layout (most posters are horizontal) */
@media (min-width: 1200px) {
  .afisha-detail {
    max-width: 780px;
    margin: 0 auto;
  }
  .afisha-detail-hero {
    max-height: 360px;
    border-radius: 14px 14px 0 0;
  }
  .afisha-detail-meta {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1600px) {
  .afisha-detail {
    max-width: 900px;
  }
  .afisha-detail-hero {
    max-height: 420px;
  }
}

@media (min-width: 1920px) {
  .afisha-detail {
    max-width: 960px;
  }
  .afisha-detail-hero {
    max-height: 460px;
  }
}

@media (min-width: 2560px) {
  .afisha-detail {
    max-width: 1020px;
  }
  .afisha-detail-hero {
    max-height: 500px;
  }
  .afisha-detail-title {
    font-size: 26px;
  }
}

/* ===== Comment Composer ===== */
.comments-wrapper {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 20px;
  margin-top: 24px;
  margin-bottom: 24px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
.comment-composer {
  position: relative;
  margin-bottom: 20px;
}
.comment-composer form {
  position: relative;
}
.comment-composer-editor {
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: text;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.comment-composer-editor:focus {
  border-color: var(--c-stihi-light);
  box-shadow: 0 0 0 3px rgba(66,165,245,0.15), inset 0 1px 2px rgba(0,0,0,0.03);
  outline: none;
}
.comment-composer-editor:empty::before {
  content: attr(data-placeholder);
  color: #999;
  pointer-events: none;
}
.comment-composer-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}
.comment-smile-toggle {
  background: transparent;
  border: none;
  padding: 4px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s, box-shadow 0.2s;
}
.comment-smile-toggle:hover {
  background: rgba(66,165,245,0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Smile picker grid inside comment composer */
.comment-smile-grid {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  margin-top: 0;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.smile-grid-fadeout {
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
}
.comment-smile-grid .smile-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.comment-smile-grid .smile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
}
.comment-smile-grid .smile-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.comment-smile-grid .smile-grid a:hover {
  background: rgba(66,165,245,0.1);
}
.comment-smile-grid .smile-grid img {
  width: 32px;
  height: 32px;
}
.smile-inline {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin: 0 1px;
  display: inline;
}

/* ===== Comment List ===== */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.comment-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.comment-avatar-link {
  flex-shrink: 0;
}
.comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.comment-bubble {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease;
}
.comment-card:hover .comment-bubble {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.comment-author {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
  text-decoration: none;
}
.comment-author:hover {
  color: var(--c-stihi);
}
.comment-time {
  font-size: 12px;
  color: #95a5a6;
  margin-left: auto;
}
.comment-delete {
  font-size: 18px;
  color: #e74c3c;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.2s;
  margin-left: 8px;
  line-height: 1;
}
.comment-delete svg {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}
.comment-card:hover .comment-delete {
  opacity: 1;
}
.comment-body {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  word-break: break-word;
}
.comment-body img[src*="/smiles/"] {
  vertical-align: middle;
  margin: 0 1px;
}

@media (max-width: 767px) {
  .comment-card {
    gap: 10px;
  }
  .comment-avatar {
    width: 40px;
    height: 40px;
  }
  .comment-bubble {
    padding: 12px 14px;
  }
  .comment-composer-actions {
    justify-content: space-between;
  }
  .comment-smile-grid {
    max-height: 200px;
    padding: 10px;
  }
  .comment-delete {
    opacity: 1;
  }
}

/* ===== panel.coments (generic comment list) ===== */
.panel-coments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
}
.panel-coment-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--c-border, #e8e8e8);
  border-radius: var(--r-md, 10px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease;
}
.panel-coment-item:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.panel-coment-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-coment-avatar-link {
  flex: 0 0 auto;
  display: block;
  line-height: 0;
}
.panel-coment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-surface-2, #f0f2f5);
  display: block;
}
.panel-coment-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text, #2c3e50);
  text-decoration: none;
  line-height: 1.2;
}
.panel-coment-username:hover {
  color: var(--c-primary, #4a90d9);
}
.panel-coment-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-text, #2c3e50);
  word-break: break-word;
}
.panel-coment-body img[src*="/smiles/"] {
  vertical-align: middle;
  margin: 0 1px;
}
.panel-coment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--c-text-3, #6c7a89);
  margin-top: 2px;
}
.panel-coment-date {
  color: var(--c-text-3, #6c7a89);
}
.panel-coment-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--c-text-3, #6c7a89);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  margin-left: auto;
}
.panel-coment-delete svg {
  width: 14px;
  height: 14px;
}
.panel-coment-delete:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}
.panel-coment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.panel-coment-textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  box-sizing: border-box;
}
.panel-coment-submit {
  align-self: flex-end;
}

@media (max-width: 767px) {
  .panel-coment-avatar {
    width: 40px;
    height: 40px;
  }
  .panel-coment-item {
    padding: 10px 12px;
  }
}

/* ===== Friends birthdays grid (panel.friends mode=hb) ===== */
.friends-hb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  width: 100%;
}
.friends-hb-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px;
  border-radius: var(--r-md, 10px);
  transition: background 0.15s ease;
}
.friends-hb-cell:hover {
  background: var(--c-surface-2, #f0f2f5);
}

/* ===== Online users grid (mod_page_online, mod_page_stars_reg) ===== */
/* Replaces <table border="0"> with auto-fill columns. Adapts to viewport:
   2 cols on 320px, 3 on 480px, 4+ on desktop. */
.online-grid,
.stars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px 12px;
  width: 100%;
  margin: 12px 0;
}
.online-cell,
.stars-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 6px;
  border-radius: var(--r-md, 10px);
  transition: background 0.15s ease, transform 0.1s ease;
}
.online-cell:hover,
.stars-cell:hover {
  background: var(--c-surface-2, #f0f2f5);
  transform: translateY(-1px);
}
@media (max-width: 479px) {
  .online-grid,
  .stars-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 8px;
  }
}

/* ===== Poet / Stihi Modern Styles ===== */
.poem-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 20px 24px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.poem-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}
.poem-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 8px;
  line-height: 1.3;
}
.poem-card-title a {
  color: #2c3e50;
  text-decoration: none;
}
.poem-card-title a:hover {
  color: var(--c-stihi);
}
.poem-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  margin: 0 0 14px;
}
.poem-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.poem-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #444;
}
.poem-card-author img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.poem-card-author span {
  font-size: 13px;
  font-weight: 500;
}
.poem-card-date {
  font-size: 12px;
  color: #95a5a6;
  margin-left: auto;
}
.poem-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.poem-card-actions .modern-btn-primary,
.poem-card-actions .modern-btn-secondary,
.poem-card-actions .modern-btn-outline {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

/* Poem Detail */
.poem-detail-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.poem-detail-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 16px;
  line-height: 1.3;
}
.poem-detail-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.poem-detail-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.poem-detail-author-name {
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
}
.poem-detail-author-name a {
  color: #2c3e50;
  text-decoration: none;
}
.poem-detail-author-name a:hover {
  color: var(--c-stihi);
}
.poem-detail-author-date {
  font-size: 12px;
  color: #95a5a6;
}
.poem-detail-text {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 20px;
}
.poem-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* Modern Tabs for Stihi */
.stihi-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  padding: 4px;
  background: rgba(0,0,0,0.03);
  border-radius: 10px;
  width: fit-content;
}
.stihi-tabs a {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.stihi-tabs a:hover {
  color: var(--c-stihi);
  background: rgba(66,165,245,0.08);
}
.stihi-tabs a.active {
  color: #fff;
  background: var(--c-stihi-grad);
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
}

/* Club tabs with icons */
.club-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.club-tabs a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}
.club-tabs a:hover svg {
  opacity: 1;
}
.club-tabs a.active svg {
  opacity: 1;
}

/* Profile tabs with icons */
.profile-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.profile-tabs a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}
.profile-tabs a:hover svg {
  opacity: 1;
}
.profile-tabs a.active svg {
  opacity: 1;
}
.profile-tabs a .tab-text {
  display: inline;
}

@media (max-width: 767px) {
  .profile-tabs a {
    padding: 8px 10px;
  }
  .profile-tabs a .tab-text {
    display: none;
  }
}

/* Miniheader active button highlight */
#miniheader .btn-group .btn.active {
  background: var(--c-stihi);
  color: #fff;
  border-color: var(--c-stihi);
}

/* Modern Form Card for Stihi */
.stihi-form-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 28px 32px;
  max-width: 720px;
}
.stihi-form-card .modern-form-group {
  margin-bottom: 16px;
}
/* ===== Mobile Sidebar Drawer ===== */
.sidebar-mobile-toggle {
  display: none;
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 28px;
  height: 72px;
  border-radius: 0 8px 8px 0;
  background: var(--c-stihi-grad);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2);
  z-index: 1002;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: transform 0.3s ease;
}
/* ===== Poet Authors Grid ===== */
.author-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 1200px) {
  .author-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 992px) {
  .author-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .author-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.author-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.author-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.author-card-avatar-link {
  display: block;
  margin-bottom: 12px;
}
.author-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.author-card-name a {
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  text-decoration: none;
}
.author-card-name a:hover {
  color: var(--c-stihi);
}
.author-card-count {
  font-size: 13px;
  color: #95a5a6;
  margin: 4px 0 14px 0;
}
@media (max-width: 480px) {
  .author-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .author-card {
    padding: 16px;
  }
  .author-card-avatar {
    width: 64px;
    height: 64px;
  }
}

/* ===== Sidebar Poem List ===== */
.sidebar-poem-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-poem-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.2s ease;
  line-height: 1.45;
}
.sidebar-poem-list li:last-child {
  border-bottom: none;
}
.sidebar-poem-list li:hover {
  background: rgba(0,0,0,0.02);
  border-radius: 6px;
  padding-left: 6px;
  padding-right: 6px;
  margin-left: -6px;
  margin-right: -6px;
}
.sidebar-poem-num {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #95a5a6;
  min-width: 18px;
  text-align: right;
}
.sidebar-poem-list li a {
  font-size: 13px;
  color: #444;
  text-decoration: none;
  word-break: break-word;
}
.sidebar-poem-list li a:hover {
  color: var(--c-stihi);
}

/* ===== Sidebar Author Row ===== */
.sidebar-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.sidebar-author-avatar {
  flex-shrink: 0;
  display: block;
}
.sidebar-author-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  display: block;
}
.sidebar-author-info {
  min-width: 0;
  flex: 1;
}
.sidebar-author-name {
  margin-bottom: 4px;
}
.sidebar-author-name a {
  font-size: 13px;
  font-weight: 500;
  color: #2c3e50;
  text-decoration: none;
}
.sidebar-author-name a:hover {
  color: var(--c-stihi);
}
.sidebar-author-btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
}

/* ===== Full-width sidebar button ===== */
.sidebar-btn-full {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 12px;
  box-sizing: border-box;
  padding: 0;
}

/* ===== Authors page header ===== */
.author-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.author-page-title {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.author-page-pagination {
  flex-shrink: 0;
}
.author-page-pagination.pagination {
  border-top: none;
  padding: 0;
}

/* ===== Poem list header (count + pagination) ===== */
.poem-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.poem-list-count {
  font-size: 13px;
  color: #95a5a6;
  font-weight: 500;
}

.sidebar-mobile-drawer {
  display: none;
}
.sidebar-mobile-backdrop {
  display: none;
}

@media (max-width: 767px) {
  .sidebar-mobile-toggle {
    display: flex;
  }
  .sidebar-mobile-drawer {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #fff;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    padding: 16px;
  }
  .sidebar-mobile-drawer.active {
    transform: translateX(0);
  }
  .sidebar-mobile-drawer.active ~ #sidebar-mobile-toggle {
    transform: translateY(-50%) translateX(280px);
  }
  .sidebar-mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }
  .sidebar-mobile-drawer-header span {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
  }
  .sidebar-mobile-drawer-header button {
    background: none;
    border: none;
    font-size: 24px;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sidebar-mobile-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }
  .sidebar-mobile-backdrop.active {
    opacity: 1;
    visibility: visible;
  }
}

/* ===== Lucky Game ("О, Счастливчик!") ===== */
.lucky-game {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  border-radius: 14px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.lucky-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.lucky-ladder {
  flex: 0 0 160px;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  padding: 12px;
}
.lucky-ladder-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #f7ba37;
  text-align: center;
  margin-bottom: 8px;
}
.lucky-ladder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.lucky-ladder-row {
  color: #cfd8dc;
}
.lucky-ladder-nb {
  color: #fff;
  font-weight: 600;
}
.lucky-ladder-current {
  background: rgba(247,186,55,0.2);
  color: #f7ba37;
  font-weight: 700;
  border-radius: 4px;
}
.lucky-ladder-passed {
  color: #81c784;
}
.lucky-ladder-num {
  text-align: right;
  padding: 2px 6px;
  width: 20px;
}
.lucky-ladder-diamond {
  text-align: center;
  width: 18px;
}
.lucky-ladder-prize {
  text-align: right;
  padding: 2px 4px;
}
.lucky-diamond {
  color: #f7ba37;
  font-size: 10px;
}
.lucky-center {
  flex: 1 1 auto;
  min-width: 0;
}
.lucky-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.lucky-timer {
  position: relative;
  width: 200px;
  height: 24px;
  background: rgba(0,0,0,0.35);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.lucky-timer-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #43a047, #f7ba37, #e53935);
  border-radius: 12px;
  transition: width 1s linear;
}
.lucky-timer-text {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  z-index: 1;
}
.lucky-helps {
  display: flex;
  gap: 8px;
}
.lucky-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e88e5 0%, #0d47a1 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.15);
  transition: all 0.2s ease;
  cursor: pointer;
}
.lucky-help-btn:hover {
  background: linear-gradient(135deg, #42a5f5 0%, #1565c0 100%);
  transform: scale(1.05);
  text-decoration: none;
  color: #fff;
}
.lucky-help-used {
  background: #455a64 !important;
  color: #90a4ae !important;
  border-color: rgba(255,255,255,0.05) !important;
  pointer-events: none;
}
.lucky-hint-bubble {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #fff;
}
.lucky-hint-auditory {
  padding: 12px 14px;
}
.lucky-auditory-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.lucky-auditory-label {
  width: 20px;
  font-weight: 700;
  color: #f7ba37;
}
.lucky-auditory-bar {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.15);
  border-radius: 5px;
  overflow: hidden;
}
.lucky-auditory-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--w, 0%);
  background: linear-gradient(90deg, #43a047, #f7ba37);
  border-radius: 5px;
}
.lucky-auditory-pct {
  width: 36px;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  color: #cfd8dc;
}
.lucky-screen {
  text-align: center;
  padding: 40px 20px;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  margin-bottom: 16px;
}
.lucky-screen-win {
  background: rgba(46,125,50,0.25);
  border: 1px solid rgba(129,199,132,0.3);
}
.lucky-screen-lose {
  background: rgba(183,28,28,0.25);
  border: 1px solid rgba(239,83,80,0.3);
}
.lucky-screen-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}
.lucky-screen-msg {
  font-size: 16px;
  margin-bottom: 24px;
  color: #e0e0e0;
}
.lucky-question-wrap {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lucky-question {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  color: #fff;
}
.lucky-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.lucky-answer {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 14px 16px;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.lucky-answer:hover {
  background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  text-decoration: none;
  color: #fff;
}
.lucky-answer-hidden {
  opacity: 0.25;
  pointer-events: none;
  background: #37474f !important;
}
.lucky-answer-letter {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  font-size: 13px;
  font-weight: 700;
  color: #f7ba37;
}
.lucky-answer-text {
  font-size: 14px;
  line-height: 1.4;
}
.lucky-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.lucky-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(135deg, #f7ba37 0%, #f57f17 100%);
  color: #1a1a2e;
  border: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.lucky-btn-primary:hover {
  background: linear-gradient(135deg, #ffd54f 0%, #ff8f00 100%);
  transform: translateY(-1px);
  text-decoration: none;
  color: #1a1a2e;
}
.lucky-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s ease;
}
.lucky-btn-outline:hover {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
  color: #fff;
}
.lucky-level-badge {
  font-size: 12px;
  font-weight: 600;
  color: #90a4ae;
  background: rgba(0,0,0,0.25);
  padding: 4px 10px;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .lucky-layout {
    flex-direction: column;
  }
  .lucky-ladder {
    flex: 1 1 auto;
    width: 100%;
    order: 2;
  }
  .lucky-ladder-table {
    font-size: 11px;
  }
  .lucky-center {
    order: 1;
  }
  .lucky-answers {
    grid-template-columns: 1fr;
  }
  .lucky-question {
    font-size: 15px;
  }
}

/* --- Lucky game animations & states --- */
@keyframes lucky-timer-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,57,53,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(229,57,53,0); }
}
.lucky-timer-urgent {
  animation: lucky-timer-pulse 1s infinite;
  border: 2px solid #e53935;
}

@keyframes lucky-correct {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); box-shadow: 0 0 20px rgba(67,160,71,0.6); }
  100% { transform: scale(1); }
}
.lucky-answer-correct {
  background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%) !important;
  animation: lucky-correct 0.5s ease;
  box-shadow: 0 0 16px rgba(67,160,71,0.5);
  border-color: #81c784 !important;
}

@keyframes lucky-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.lucky-answer-wrong {
  background: linear-gradient(135deg, #b71c1c 0%, #e53935 100%) !important;
  animation: lucky-shake 0.5s ease;
  box-shadow: 0 0 16px rgba(229,57,53,0.5);
  border-color: #ef5350 !important;
}

.lucky-answer-active {
  transform: scale(0.97) !important;
  filter: brightness(1.1);
}

@keyframes lucky-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lucky-fade-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}
.lucky-fade-in {
  animation: lucky-fade-in 0.3s ease forwards;
}
.lucky-fade-out {
  animation: lucky-fade-out 0.25s ease forwards;
}

@keyframes lucky-ladder-flash {
  0% { background: rgba(247,186,55,0.2); }
  50% { background: rgba(247,186,55,0.6); }
  100% { background: rgba(247,186,55,0.2); }
}
.lucky-ladder-current {
  animation: lucky-ladder-flash 2s infinite;
}

/* ===== Humor / Photobomb / Anecdote / Demotivators ===== */

/* Photo grids */
.humor-photo-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 480px) {
  .humor-photo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .humor-photo-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .humor-photo-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1600px) {
  .humor-photo-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1920px) {
  .humor-photo-grid { grid-template-columns: repeat(7, 1fr); }
}

.humor-photo-card {
  display: block;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  color: inherit;
}
.humor-photo-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-3px);
}
.humor-photo-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eef1f5;
}
.humor-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.humor-photo-card:hover .humor-photo-thumb img {
  transform: scale(1.08);
}

/* Photo detail page */
.humor-photo-detail {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.humor-photo-hero {
  position: relative;
  width: 100%;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.humor-photo-hero img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}
.humor-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
  cursor: pointer;
  border: none;
}
.humor-nav-arrow:hover {
  background: rgba(0,0,0,0.55);
  transform: translateY(-50%) scale(1.08);
  text-decoration: none;
  color: #fff;
}
.humor-nav-arrow.prev { left: 16px; }
.humor-nav-arrow.next { right: 16px; }

.humor-photo-meta {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.humor-photo-meta-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.humor-photo-meta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.humor-photo-meta-author {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  text-decoration: none;
}
.humor-photo-meta-author:hover { color: var(--c-stihi); }
.humor-photo-meta-date {
  font-size: 12px;
  color: #95a5a6;
}
.humor-photo-meta-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Anecdote cards */
@keyframes humor-fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.humor-anecdote-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 24px 28px;
  margin-bottom: 20px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  animation: humor-fade-in-up 0.4s ease both;
}
.humor-anecdote-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.humor-anecdote-text {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 16px;
  white-space: pre-line;
  word-break: break-word;
}
.humor-anecdote-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #7f8c8d;
}
.humor-anecdote-meta a {
  color: #1a6fc4;
  font-weight: 600;
  text-decoration: none;
}
.humor-anecdote-meta a:hover { color: #0d4a8a; }

/* Sidebar navigation chips */
.humor-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.humor-sidebar-chip,
a.humor-sidebar-chip {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #555;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}
.humor-sidebar-chip:hover {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  border-color: rgba(21,101,192,0.15);
  text-decoration: none;
}
.humor-sidebar-chip.active {
  background: var(--c-stihi-grad);
  color: #fff;
  border-color: rgba(30,136,229,0.25);
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
}
.humor-sidebar-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,0.05);
  padding: 2px 8px;
  border-radius: 10px;
  color: #888;
}
.humor-sidebar-chip.active .humor-sidebar-count {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

/* Add photo form */
.humor-add-form {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 24px 28px;
  margin-bottom: 24px;
  max-width: 520px;
}
.humor-add-form .modern-form-group {
  margin-bottom: 16px;
}

/* Empty state */
.humor-empty {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px dashed rgba(52, 152, 219, 0.25);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.humor-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  line-height: 1.2;
}
.humor-empty-text {
  font-size: 16px;
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 20px;
}

/* ===== Modern Stacked Tabs (Sidebar User Menu) ===== */
.nav-tabs.nav-stacked {
  border-bottom: none;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  padding: 0;
  margin: 0 0 16px 0;
  list-style: none;
}

.nav-tabs.nav-stacked > li {
  float: none;
  margin: 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.nav-tabs.nav-stacked > li:last-child {
  border-bottom: none;
}

.nav-tabs.nav-stacked > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  border: none;
  border-radius: 0;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.nav-tabs.nav-stacked > li:first-child > a {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.nav-tabs.nav-stacked > li:last-child > a {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.nav-tabs.nav-stacked > li > a:hover,
.nav-tabs.nav-stacked > li > a:focus {
  background: rgba(66,165,245,0.08);
  color: var(--c-stihi);
  border-color: transparent;
  padding-left: 20px;
}

.nav-tabs.nav-stacked > .active > a,
.nav-tabs.nav-stacked > .active > a:hover,
.nav-tabs.nav-stacked > .active > a:focus {
  background: var(--c-stihi-grad);
  color: #fff;
  border-color: transparent;
  padding-left: 16px;
  box-shadow: inset 4px 0 0 rgba(255,255,255,0.3);
}

/* Optional count badge inside stacked tab */
.nav-tabs.nav-stacked > li > a .badge,
.nav-tabs.nav-stacked > li > a .modern-tab-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,0.05);
  color: #888;
  padding: 2px 8px;
  border-radius: 10px;
  line-height: 1;
}
.nav-tabs.nav-stacked > .active > a .badge,
.nav-tabs.nav-stacked > .active > a .modern-tab-count {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

/* Icon spacing inside stacked tabs */
.nav-tabs.nav-stacked > li > a > img,
.nav-tabs.nav-stacked > li > a > i,
.nav-tabs.nav-stacked > li > a > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.nav-tabs.nav-stacked > li > a:hover > img,
.nav-tabs.nav-stacked > li > a:hover > i,
.nav-tabs.nav-stacked > li > a:hover > svg,
.nav-tabs.nav-stacked > .active > a > img,
.nav-tabs.nav-stacked > .active > a > i,
.nav-tabs.nav-stacked > .active > a > svg {
  opacity: 1;
}

/* Nested submenu inside stacked tabs (club categories etc.) */
.nav-tabs.nav-stacked > li > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  background: rgba(0,0,0,0.02);
  border-top: 1px solid rgba(0,0,0,0.04);
}
.nav-tabs.nav-stacked > li > ul > li {
  border-bottom: 1px solid rgba(0,0,0,0.03);
}
.nav-tabs.nav-stacked > li > ul > li:last-child {
  border-bottom: none;
}
.nav-tabs.nav-stacked > li > ul > li > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 44px;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
.nav-tabs.nav-stacked > li > ul > li > a:hover {
  background: rgba(66,165,245,0.06);
  color: var(--c-stihi);
  padding-left: 48px;
}
.nav-tabs.nav-stacked > li > ul > li.active > a {
  background: rgba(66,165,245,0.10);
  color: var(--c-stihi);
}
.nav-tabs.nav-stacked > li > ul > li > a .modern-tab-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,0.05);
  color: #888;
  padding: 2px 8px;
  border-radius: 10px;
  line-height: 1;
}

/* Club sidebar: "Show all" toggle button inside nested list */
.nav-tabs.nav-stacked > li > ul > li.clubs-cat-toggle-li {
  border-bottom: none;
}
.nav-tabs.nav-stacked > li > ul > li.clubs-cat-toggle-li > a {
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  color: var(--c-stihi);
  font-weight: 600;
  font-size: 12px;
}
.nav-tabs.nav-stacked > li > ul > li.clubs-cat-toggle-li > a:hover {
  background: rgba(66,165,245,0.10);
  padding-left: 44px;
}
.nav-tabs.nav-stacked > li > ul > li.clubs-cat-toggle-li > a svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

/* Club sidebar: extra categories list hidden by default */
.nav-tabs.nav-stacked > li > ul.clubs-cat-more {
  background: rgba(0,0,0,0.02);
  border-top: 1px solid rgba(0,0,0,0.04);
}

/* Vanilla transition for the height-toggle JS in
 * modules/public/clubs/sidebar.clubs-cat/main.php. The original
 * jQuery code animated the inline height from 0 → scrollHeight;
 * CSS now owns the easing. */
.clubs-cat-list,
.clubs-cat-more {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
}

/* ===== Universal Breadcrumbs ===== */
#breadcrumbs.breadcrumbs-nav {
  margin: 10px 0 12px 0;
  padding: 8px 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
}
#breadcrumbs.breadcrumbs-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}
#breadcrumbs.breadcrumbs-nav ol li {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
#breadcrumbs.breadcrumbs-nav ol li:not(:last-child)::after {
  content: '›';
  margin: 0 8px;
  color: #bbb;
  font-size: 14px;
  line-height: 1;
}
#breadcrumbs.breadcrumbs-nav ol li a.breadcrumbs-nav__link {
  color: var(--c-stihi);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}
#breadcrumbs.breadcrumbs-nav ol li a.breadcrumbs-nav__link:hover {
  color: #1565c0;
  text-decoration: underline;
}
#breadcrumbs.breadcrumbs-nav ol li.breadcrumbs-nav__current {
  color: #555;
  font-weight: 600;
  cursor: default;
}

/* Inside mobile drawer: remove card chrome so it merges with the drawer */
.sidebar-mobile-drawer .nav-tabs.nav-stacked {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0 -16px;
}
.sidebar-mobile-drawer .nav-tabs.nav-stacked > li:first-child > a,
.sidebar-mobile-drawer .nav-tabs.nav-stacked > li:last-child > a {
  border-radius: 0;
}
.sidebar-mobile-drawer .nav-tabs.nav-stacked > li > a {
  padding-left: 16px;
  padding-right: 16px;
}
.sidebar-mobile-drawer .nav-tabs.nav-stacked > li > a:hover {
  padding-left: 20px;
}

/* Mobile */
@media (max-width: 767px) {
  .humor-photo-detail {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .humor-photo-meta {
    padding: 16px;
  }
  .humor-nav-arrow {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  .humor-nav-arrow.prev { left: 8px; }
  .humor-nav-arrow.next { right: 8px; }
  .humor-anecdote-card {
    padding: 18px 16px;
    border-radius: 10px;
  }
  .humor-anecdote-text {
    font-size: 15px;
  }
}

/* ===== Modern Popup Baloon ===== */
#popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 65530;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#popup-backdrop.active {
  opacity: 1;
  visibility: visible;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background: rgba(0,0,0,0.45);
}
#popup-backdrop.nested {
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#popup_baloon {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 640px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  background: #fff;
  border: none;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  padding: 52px 24px 24px 24px;
  z-index: 65535;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  box-sizing: border-box;
}
#popup_baloon.popup-active {
  display: flex;
  flex-direction: column;
}

#popup_baloon .close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  color: #7f8c8d;
  text-decoration: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  opacity: 1;
}
#popup_baloon .close:hover {
  background: #fff;
  color: #e74c3c;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transform: scale(1.05);
}

#popup_content {
  min-width: 0;
  flex: 1;
}

/* Smile panel inside popup */
#popup_smiles {
  position: relative;
  margin-top: 12px;
  max-height: 240px;
  overflow-y: auto;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 12px;
  display: none;
  flex-shrink: 0;
}
#popup_smiles .comment-smile-grid {
  position: static;
  max-height: 220px;
  box-shadow: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  overflow-y: auto;
}
#popup_smiles .smile-grid {
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 6px;
}
#popup_smiles .smile-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

/* Gift grid inside popup */
#gift-popup-grid {
  max-height: 320px;
  overflow-y: auto;
}
.gift-item {
  cursor: pointer;
  text-align: center;
  padding: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.gift-item:hover {
  border-color: rgba(66,165,245,0.4);
  background: rgba(66,165,245,0.04);
  transform: translateY(-2px);
}
.gift-item img {
  max-height: 60px;
  display: block;
  margin: 0 auto;
}
.gift-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.gift-pick-cell {
  text-align: center;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 8px;
  padding: 6px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.gift-pick-cell:hover {
  border-color: rgba(66,165,245,0.4);
  background: rgba(66,165,245,0.04);
  transform: translateY(-2px);
}
.gift-pick-cell img {
  max-height: 56px;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}
#gift-form {
  margin-top: 12px;
}
#gift-message {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}

/* ===== Language picker page (?show=lang) ===== */
/* Replaces legacy <table> with a CSS Grid list: flag | native | English.
   Each row is a clickable <a> with hover/focus/active states. Uses design
   tokens (--c-text, --c-text-muted, --c-surface-2) for auto dark-mode flip. */
.lang-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}
.lang-list-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--c-text, #222);
  background: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
  line-height: 1.3;
}
.lang-list-item:hover,
.lang-list-item:focus {
  background: var(--c-surface-2, #f0f2f5);
  text-decoration: none;
  color: var(--c-text, #222);
}
.lang-list-item:active {
  transform: scale(0.99);
}
.lang-list-item:focus-visible {
  outline: 2px solid var(--c-stihi-light, #42a5f5);
  outline-offset: -2px;
}
.lang-list-flag {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  display: block;
}
.lang-list-flag--empty {
  background: var(--c-surface-2, #f0f2f5);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.lang-list-native {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text, #222);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.lang-list-en {
  font-size: 13px;
  color: var(--c-text-muted, #777);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  min-width: 0;
}

@media (max-width: 479px) {
  .lang-list-item {
    grid-template-columns: 28px 1fr;
    gap: 4px 10px;
    padding: 8px 10px;
  }
  .lang-list-en {
    grid-column: 2;
    text-align: left;
    font-size: 12px;
  }
}

/* ===== News catalog sidebar list (?show=news sidebar) ===== */
/* Replaces legacy <table width="100%"> with a flex list: name (left) | count (right). */
.news-cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
.news-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--c-text, #222);
  transition: background 0.15s ease;
}
.news-cat-item:hover,
.news-cat-item:focus {
  background: var(--c-surface-2, #f0f2f5);
  text-decoration: none;
  color: var(--c-text, #222);
}
.news-cat-item-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Popup button styles — match afisha comment composer */
#popup_baloon .btn-group {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
}
#popup_baloon .btn,
#popup_baloon input[type="submit"].btn,
#popup_baloon button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  line-height: 1;
  text-decoration: none;
}
#popup_baloon .btn-primary,
#popup_baloon input[type="submit"].btn-primary,
#popup_baloon button.btn-primary {
  background: var(--c-stihi-grad);
  color: #fff;
  box-shadow: 0 2px 6px rgba(30,136,229,0.25);
}
#popup_baloon .btn-primary:hover,
#popup_baloon input[type="submit"].btn-primary:hover,
#popup_baloon button.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30,136,229,0.35);
}
#popup_baloon .btn:not(.btn-primary),
#popup_baloon button.btn:not(.btn-primary),
#popup_baloon input[type="button"].btn:not(.btn-primary) {
  background: #fff;
  color: #555;
  border: 1px solid rgba(0,0,0,0.15);
}
#popup_baloon .btn:not(.btn-primary):hover,
#popup_baloon button.btn:not(.btn-primary):hover {
  background: #f5f5f5;
  border-color: rgba(0,0,0,0.25);
}
#popup_baloon .btn-group .btn:not(.btn-primary) {
  padding: 0 12px;
  font-size: 20px;
  line-height: 1;
}

/* ===== Photo Uploader (shared component) ===== */
.pu-dropzone {
  border: 2px dashed #b0b0b0;
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  color: #666;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  margin-bottom: 15px;
  background: #fafafa;
}
.pu-dropzone:hover { border-color: #7a9cd0; }
.pu-dropzone.dragover {
  border-color: #4a7ac2;
  background: #eef4fc;
}
.pu-dropzone-text { font-size: 15px; }
.pu-dropzone small { display: block; margin-top: 6px; color: #888; font-size: 12px; }
.pu-queue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 15px;
}
.pu-item {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  position: relative;
}
.pu-canvas-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f5f5f5;
  border-radius: 4px;
}
.pu-canvas-wrap canvas { max-width: 100%; max-height: 100%; display: block; }
.pu-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  pointer-events: none;
}
.pu-overlay.active { display: block; }
.pu-overlay .sel {
  position: absolute;
  border: 2px dashed #fff;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.35);
  display: none;
  pointer-events: none;
}
.pu-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255,255,255,0.95);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-weight: bold;
  color: #c00;
  line-height: 1;
  font-size: 16px;
  z-index: 2;
}
.pu-tools {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
  justify-content: center;
}
.pu-tools button {
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f8f8f8;
  color: #444;
}
.pu-tools button:hover { background: #eee; }
.pu-desc {
  width: 100%;
  margin-top: 8px;
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
  box-sizing: border-box;
}
.pu-progress {
  height: 5px;
  background: #e8e8e8;
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
.pu-progress > div {
  height: 100%;
  width: 0%;
  background: #4a7ac2;
  transition: width 0.15s;
}
.pu-status {
  font-size: 11px;
  margin-top: 5px;
  color: #555;
  text-align: center;
  min-height: 14px;
}
.pu-error { color: #c00; font-weight: bold; }
.pu-success { color: #2a2; font-weight: bold; }
.pu-limit-alert {
  padding: 14px;
  background: #fff0f0;
  border: 1px solid #e0a0a0;
  border-radius: 6px;
  color: #800;
  margin-bottom: 12px;
}

/* Fixed smile panel above message editor in popup */
#popup-msg-smile-grid {
  position: fixed;
  z-index: 65536;
  max-height: 240px;
  overflow-y: auto;
}

/* Message editor inside popup */
#msg-editor {
  width: 100%;
  box-sizing: border-box;
  min-height: 80px;
  padding: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  background: #fff;
  overflow: auto;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}
#msg-editor:focus {
  border-color: #64b5f6;
  box-shadow: 0 0 0 3px rgba(100,181,246,0.15);
}

/* Mobile popup */
@media (max-width: 767px) {
  #popup_baloon {
    width: auto;
    left: 8px;
    right: 8px;
    top: 56px;
    bottom: 56px;
    transform: none;
    padding: 48px 16px 16px 16px;
    max-height: none;
    border-radius: 12px;
    margin: 0;
  }
  #popup_baloon .close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
  #popup_smiles .smile-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
  }
  #gift-popup-grid {
    max-height: none;
  }
}

/* ===== Top Photos Rating Page ===== */
.top-photos-page {
  padding: 8px 0 24px;
}
.top-photos-page h3 {
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.top-empty {
  padding: 24px;
  text-align: center;
  color: #888;
  font-size: 15px;
  background: #f8f9fa;
  border-radius: 12px;
}
.top-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.top-tabs a {
  padding: 8px 18px;
  border-radius: 20px;
  background: #f0f0f0;
  color: #555;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.top-tabs a:hover {
  background: #e0e0e0;
}
.top-tabs a.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

/* Photo wrap for badge anchoring */
.top-photo-wrap {
  position: relative;
  display: inline-block;
}

/* Rank badges */
.top-rank-badge {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.rank-1 { background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%); color: #5a3d00; }
.rank-2 { background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%); color: #333; }
.rank-3 { background: linear-gradient(135deg, #cd7f32 0%, #b86e28 100%); color: #fff; }
.rank-4, .rank-5, .rank-6, .rank-7, .rank-8, .rank-9, .rank-10,
.rank-11, .rank-12, .rank-13, .rank-14, .rank-15, .rank-16, .rank-17, .rank-18, .rank-19, .rank-20,
.rank-21, .rank-22, .rank-23, .rank-24, .rank-25, .rank-26, .rank-27, .rank-28, .rank-29, .rank-30,
.rank-31, .rank-32, .rank-33, .rank-34, .rank-35, .rank-36, .rank-37, .rank-38, .rank-39, .rank-40,
.rank-41, .rank-42, .rank-43, .rank-44, .rank-45, .rank-46, .rank-47, .rank-48, .rank-49, .rank-50 {
  background: linear-gradient(135deg, #7a9cd0 0%, #4a7ac2 100%);
  color: #fff;
}

/* Leader (1st place) */
.top-leader {
  text-align: center;
  margin-bottom: 32px;
}
.top-leader-img {
  max-width: 100%;
  width: auto;
  max-height: 520px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}
.top-leader-img:hover {
  transform: scale(1.01);
}
.top-leader-meta {
  margin-top: 16px;
}
.top-leader-stars {
  font-size: 22px;
  margin-bottom: 8px;
}
.top-leader-score {
  font-size: 16px;
  color: #555;
  margin-bottom: 10px;
}
.top-leader-score strong {
  font-size: 28px;
  color: #2c3e50;
  margin-right: 10px;
}
.top-leader-score span {
  color: #888;
  font-size: 14px;
}

/* Podium (2nd & 3rd) */
.top-podium {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
.top-podium-item {
  text-align: center;
}
.top-podium-img {
  max-width: 100%;
  width: auto;
  max-height: 380px;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transition: transform 0.2s;
}
.top-podium-img:hover {
  transform: scale(1.01);
}
.top-podium-meta {
  margin-top: 14px;
}
.top-podium-stars {
  font-size: 18px;
  margin-bottom: 6px;
}
.top-podium-score {
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
}
.top-podium-score strong {
  font-size: 22px;
  color: #2c3e50;
  margin-right: 8px;
}
.top-podium-score span {
  color: #888;
  font-size: 13px;
}

/* Grid (4th+) */
.top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  justify-content: center;
}
.top-grid-item {
  text-align: center;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}
.top-grid-item:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.top-grid-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.top-grid-meta {
  margin-top: 10px;
}
.top-grid-stars {
  font-size: 14px;
  margin-bottom: 4px;
}
.top-grid-score {
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}
.top-grid-score strong {
  font-size: 18px;
  color: #2c3e50;
  margin-right: 6px;
}
.top-grid-score span {
  color: #888;
  font-size: 12px;
}

/* Stars color classes */
.top-stars { display: inline-flex; gap: 2px; }
.top-stars.star-gray  { color: #b0b0b0; }
.top-stars.star-lime  { color: #cddc39; }
.top-stars.star-yellow{ color: #ffc107; }
.top-stars.star-orange{ color: #ff9800; }
.top-stars.star-gold  { color: #e6b800; }

/* Mini user under photo */
.top-user-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #444;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f5f5f5;
  transition: background 0.2s;
}
.top-user-mini:hover {
  background: #e8e8e8;
}
.top-user-mini img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* Mobile */
@media (max-width: 767px) {
  .top-photos-page {
    padding: 8px 0 20px;
  }
  .top-podium {
    grid-template-columns: 1fr;
  }
  .top-leader-img {
    max-height: 360px;
  }
  .top-podium-img {
    max-height: 300px;
  }
  .top-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .top-grid-img {
    height: 160px;
  }
}

/* ===== Random Games Sidebar ===== */
.sidebar-card--games {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.sidebar-card--games .sidebar-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 14px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-card--games .sidebar-card-title i {
  color: #667eea;
  font-size: 16px;
}

.game-random-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.game-random-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, transform 0.15s;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.04);
}
.game-random-item:hover {
  background: #f5f7ff;
  transform: translateX(3px);
  border-color: rgba(102,126,234,0.15);
}
.game-random-thumb-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-random-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-random-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.game-random-title {
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-random-type {
  font-size: 11px;
  color: #888;
}

/* ===== Club Sidebar Members ===== */
.sidebar-card--club-members {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.sidebar-card--club-members .sidebar-card__title {
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 14px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.club-sidebar-members {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.club-sidebar-member {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #444;
  padding: 6px 8px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}
.club-sidebar-member:hover {
  background: rgba(66,165,245,0.08);
  color: var(--c-stihi);
}
.club-sidebar-member-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.club-sidebar-member-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.club-sidebar-member-online {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #2ecc71;
  border: 2px solid #fff;
  border-radius: 50%;
}
.club-sidebar-member-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.club-sidebar-more {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-stihi);
  text-decoration: none;
  text-align: center;
  transition: color 0.2s ease;
}
.club-sidebar-more:hover {
  color: #1565c0;
}

.club-sidebar-empty {
  text-align: center;
  padding: 8px 4px;
}
.club-sidebar-empty-text {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.5;
}
.club-sidebar-friends {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.club-sidebar-friend {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0,0,0,0.06);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.club-sidebar-friend:hover {
  border-color: var(--c-stihi);
  transform: scale(1.05);
}
.club-sidebar-friend img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  display: block;
}

/* ===== Club News ===== */
.club-news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.club-news-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease;
}
.club-news-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}
.club-news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.club-news-date {
  font-size: 12px;
  font-weight: 600;
  color: #8898aa;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.club-news-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.club-news-actions a {
  color: #8898aa;
  font-size: 13px;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
.club-news-actions a:hover {
  background: rgba(66,165,245,0.08);
  color: var(--c-stihi);
}
.club-news-actions a:last-child:hover {
  background: rgba(231,76,60,0.08);
  color: #e74c3c;
}
.club-news-body {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  word-break: break-word;
}
.club-news-body img[src*="/smiles/"] {
  vertical-align: middle;
  margin: 0 1px;
}
.club-news-body p {
  margin: 0 0 10px;
}
.club-news-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .club-news-card {
    padding: 14px 16px;
  }
  .club-news-meta {
    flex-wrap: wrap;
  }
}

/* ===== Club Forum Topics ===== */
.forum-topic-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.forum-topic-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.forum-topic-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.forum-topic-main {
  flex: 1;
  min-width: 0;
}
.forum-topic-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.forum-topic-link:hover .forum-topic-title {
  color: var(--c-stihi);
}
.forum-topic-title {
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
  line-height: 1.35;
}
.forum-topic-desc {
  font-size: 13px;
  color: #606060;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.forum-topic-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  min-width: 140px;
}
.forum-topic-count {
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  background: rgba(30,136,229,0.08);
  padding: 4px 10px;
  border-radius: 10px;
}
.forum-topic-last {
  font-size: 12px;
  color: #8898aa;
  text-align: right;
  line-height: 1.4;
}
.forum-topic-last a {
  color: var(--c-stihi);
  text-decoration: none;
}
.forum-topic-last a:hover {
  text-decoration: underline;
}
.forum-topic-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.forum-topic-delete {
  font-size: 12px;
  color: #e74c3c;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(231,76,60,0.2);
  transition: background 0.2s ease;
}
.forum-topic-delete:hover {
  background: rgba(231,76,60,0.08);
}

/* ===== Club Forum Messages ===== */
.forum-message-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.forum-message-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.forum-message-avatar {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
}
.forum-message-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.forum-message-bubble {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.forum-message-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.forum-message-author {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
  text-decoration: none;
}
.forum-message-author:hover {
  color: var(--c-stihi);
}
.forum-message-time {
  font-size: 12px;
  color: #95a5a6;
  margin-left: auto;
}
.forum-message-delete {
  font-size: 12px;
  color: #e74c3c;
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(231,76,60,0.2);
  transition: background 0.2s ease;
}
.forum-message-delete:hover {
  background: rgba(231,76,60,0.08);
}
.forum-message-body {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  word-break: break-word;
}
.forum-message-body img[src*="/smiles/"] {
  vertical-align: middle;
  margin: 0 1px;
}

@media (max-width: 767px) {
  .forum-topic-card {
    flex-direction: column;
    gap: 10px;
  }
  .forum-topic-meta {
    align-items: flex-start;
    flex-direction: row;
    gap: 12px;
  }
  .forum-message-card {
    gap: 10px;
  }
  .forum-message-avatar {
    width: 48px;
  }
  .forum-message-avatar img {
    width: 40px;
    height: 40px;
  }
}

/* ===== Club Header Card ===== */
.club-header-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 24px;
  margin-bottom: 24px;
}

.club-header-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.club-header-photo a {
  display: block;
  width: 100%;
}

.club-header-photo img {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  display: block;
  margin: 0 auto;
}

.club-header-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.club-header-name {
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  line-height: 1.3;
  word-break: break-word;
}

.club-header-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0;
  word-break: break-word;
}

.club-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.club-action-form {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

/* ===== Video Grid (user profile panels) ===== */
.video-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.video-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.video-card-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef1f5;
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.video-card:hover .video-card-thumb img {
  transform: scale(1.05);
}

.video-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(30,136,229,0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, background 0.2s ease;
}

.video-card:hover .video-card-play {
  opacity: 1;
  visibility: visible;
  background: rgba(30,136,229,1);
}

.video-card-body {
  padding: 10px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.video-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.4;
  text-decoration: none;
  word-break: break-word;
}

.video-card-title:hover {
  color: #3498db;
}

.video-card-date {
  font-size: 11px;
  color: #95a5a6;
}

/* Responsive: stack on narrow screens */
@media (max-width: 767px) {
  .club-header-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .club-header-photo img {
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }
  .club-header-name {
    font-size: 18px;
  }
}

/* ===== Album Grid (photo.album panels) ===== */
.album-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.album-card {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.album-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.album-card-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef1f5;
}

.album-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.album-card:hover .album-card-cover img {
  transform: scale(1.05);
}

.album-card-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, background 0.2s ease;
}

.album-card:hover .album-card-delete {
  opacity: 1;
  visibility: visible;
}

.album-card-delete:hover {
  background: rgba(231,76,60,0.9);
}

/* Vanilla replacement for the jQuery $.fadeOut(500) on delete
 * success. JS adds .is-removing, CSS owns the 500ms opacity
 * transition, then JS removes the node from the DOM. */
.album-card.is-removing {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 500ms ease, transform 500ms ease;
}

.album-card-body {
  padding: 10px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.album-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.35;
  text-decoration: none;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card-title:hover {
  color: #3498db;
}

.album-card-desc {
  font-size: 12px;
  color: #777;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: 2.8em;
}

.album-card-meta {
  font-size: 11px;
  color: #95a5a6;
  margin-top: auto;
  padding-top: 4px;
}

/* ===== Poetry list (profile panel) ===== */
.poem-list {
  display: flex;
  flex-direction: column;
  gap: 6px; /* visual separation between rows (each row has its own padding) */
}
.poem-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.2s ease;
}
.poem-row:last-child {
  border-bottom: none;
}
.poem-row:hover {
  background: rgba(0,0,0,0.02);
}
.poem-date {
  font-size: 12px;
  color: #95a5a6;
  flex-shrink: 0;
  min-width: 80px;
}
.poem-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a6fc4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poem-row:hover .poem-name {
  color: #0d4a8a;
}

/* ===== Photo marks list (profile panel) ===== */
.mark-list {
  display: flex;
  flex-direction: column;
  gap: 6px; /* visual separation between rows (each row has its own padding) */
}
.mark-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.2s ease;
}
.mark-row:last-child {
  border-bottom: none;
}
.mark-row:hover {
  background: rgba(0,0,0,0.02);
}
.mark-sender {
  flex: 1;
  min-width: 0;
}
.mark-sender a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.mark-sender img,
.mark-sender-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #eef1f5;
}
.mark-sender span {
  font-size: 13px;
  font-weight: 500;
  color: #1a6fc4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mark-sender a:hover span {
  color: #0d4a8a;
}
.mark-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.mark-rating img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.mark-rating span {
  font-size: 12px;
  color: #95a5a6;
}
.mark-photo {
  flex-shrink: 0;
}
.mark-photo a {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef1f5;
}
.mark-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.mark-photo a:hover img {
  transform: scale(1.08);
}
.mark-delete {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}
.mark-delete button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.06);
  color: #888;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.mark-delete button:hover {
  background: rgba(231,76,60,0.15);
  color: #c0392b;
}


/* =============================================================
   SIDEBAR TOP PHOTOS (popular photos list, ex-<table>)
   Заменено с <table> на flex grid 2×5. Mobile: вёрстка через full
   width ячеек; desktop (≥768px): 2 cols × 5 rows в 280px сайдбаре.
   ============================================================= */
.sidebar-top-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-top-photos-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  background: var(--c-surface-2, #f1f3f6);
  transition: transform var(--dur-fast, 150ms) var(--ease, ease);
}

.sidebar-top-photos-item:hover {
  transform: scale(1.04);
}

.sidebar-top-photos-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none !important;
  padding: 0 !important;
  margin: 0;
  border-radius: 8px;
}


/* =============================================================
   PANEL USER PHOTOS (profile sidebar module)
   Заменено с <table> на CSS Grid. 4 ячейки в ряд на desktop,
   2×2 на мобиле (auto-fill minmax(80px, 1fr) — не прибито к 4).
   ============================================================= */
.user-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}

.user-photos-cell {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  background: var(--c-surface-2, #f1f3f6);
  transition: transform var(--dur-fast, 150ms) var(--ease, ease),
              box-shadow 0.2s ease;
}

.user-photos-cell:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.user-photos-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none !important;
  padding: 0 !important;
  margin: 0;
  border-radius: 8px;
}


/* =============================================================
   PANEL FILMS LIST (homepage video news)
   Заменено с <img align="left" style="width:96px;float:left"> +
   <div style="clear:both"> на CSS Grid (poster + body cells).
   ============================================================= */
.films-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 8px 12px 12px;
  width: 100%;
  box-sizing: border-box;
}

.films-list-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
  padding: 8px;
  border-radius: 10px;
  text-decoration: none !important;
  color: inherit;
  transition: background 0.2s ease, transform 0.2s ease;
}

.films-list-item:hover {
  background: var(--c-surface-2, #f1f3f6);
  transform: translateX(2px);
}

.films-list-poster {
  position: relative;
  width: 96px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--c-surface-2, #eef1f5);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.films-list-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.films-list-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.films-list-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-text, #1a1a1a);
  text-decoration: none;
}

.films-list-item:hover .films-list-title {
  color: var(--c-primary, #4a90d9);
}

.films-list-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--c-text-muted, #666);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* =============================================================
   PHOTO EDIT FORM (mod_page_photo_edit)
   Заменено с <table class="nobrd"> + style="width:400px" на CSS Grid.
   Mobile: 1 col (preview + textarea stacked); desktop ≥600px: 2 cols.
   ============================================================= */
.photo-edit-form {
  margin: 0;
  padding: 0;
}

.photo-edit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  padding: 12px 0;
}

@media (min-width: 600px) {
  .photo-edit-grid {
    grid-template-columns: 144px 1fr;
    gap: 20px;
  }
}

.photo-edit-preview {
  width: 100%;
  max-width: 144px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--c-surface-2, #eef1f5);
}

.photo-edit-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none !important;
  padding: 0;
  margin: 0;
  border-radius: 10px;
}

.photo-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.photo-edit-textarea {
  width: 100%;
  min-height: 88px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-border, #e0e3e8);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  background: var(--c-bg-elevated, #fff);
  color: var(--c-text, #1a1a1a);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.photo-edit-textarea:focus {
  outline: none;
  border-color: var(--c-primary, #4a90d9);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}


/* =============================================================
   MUSIC RANDOM SIDEBAR (sidebar.music-random)
   Replaces inline-styled <ul class="yt-video-grid-sidebar"> with
   a dedicated square-thumb grid + retina avatars.
   ============================================================= */
.music-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 480px) {
  .music-grid {
    grid-template-columns: 1fr;
  }
}

.music-grid-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.music-grid-thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--c-surface-2, #eef1f5);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.music-grid-thumb:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.music-grid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.music-grid-thumb:hover img {
  transform: scale(1.04);
}

.music-grid-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.music-grid-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text, #0d0d0d);
  line-height: 1.3;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-grid-name:hover {
  color: var(--c-primary, #4a90d9);
}

.music-grid-count {
  font-size: 11px;
  color: var(--c-text-muted, #606060);
}


/* =============================================================
   AFISHA ATTENDEES (panel.users)
   Replaces Bootstrap 2 <ul class="thumbnails"><li class="span3">
   with a CSS Grid + retina srcset avatars.
   ============================================================= */
.afisha-attendees-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.afisha-attendee {
  min-width: 0;
}

.afisha-attendee a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.afisha-attendee a:hover {
  background: var(--c-surface-2, #eef1f5);
}

.afisha-attendee-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.afisha-attendee-name {
  font-size: 12px;
  color: var(--c-text, #0d0d0d);
  text-align: center;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}


/* =============================================================
   LINKS CATALOG & PANEL (sidebar.catalog, panel.links)
   Replaces Bootstrap 2 <div class="well"> + <table border="0">
   + span2/span10 + icon-home (FA) with modern cards, CSS Grid,
   and inline SVG icons.
   ============================================================= */

/* ===== Sidebar catalog card ===== */
.links-catalog-card {
  background: var(--c-bg-elevated, #fff);
  border-radius: var(--r-md, 10px);
  box-shadow: var(--sh-1, 0 1px 4px rgba(0, 0, 0, 0.06));
  padding: 12px 14px;
}

.links-catalog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.links-catalog-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.links-catalog-icon {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--c-surface-2, #eef1f5);
}

.links-catalog-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.links-catalog-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.links-catalog-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text, #0d0d0d);
  text-decoration: none;
  line-height: 1.3;
}

.links-catalog-name:hover {
  color: var(--c-primary, #4a90d9);
}

.links-catalog-sub {
  font-size: 12px;
  color: var(--c-text-muted, #606060);
  line-height: 1.4;
}

.links-catalog-sub a {
  color: var(--c-text-muted, #606060);
  text-decoration: none;
  transition: color 0.15s ease;
}

.links-catalog-sub a:hover {
  color: var(--c-primary, #4a90d9);
}

.links-catalog-more {
  margin-left: 4px;
  font-weight: 600;
}

/* ===== Main links panel ===== */
.links-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.links-panel-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.links-panel-pagination {
  display: flex;
  justify-content: flex-end;
}

.links-breadcrumb {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 13px;
  color: var(--c-text-muted, #606060);
}

.links-breadcrumb li:not(:last-child)::after {
  content: '›';
  margin-left: 8px;
  color: var(--c-text-muted, #999);
}

.links-breadcrumb a {
  color: var(--c-primary, #4a90d9);
  text-decoration: none;
}

.links-breadcrumb a:hover {
  text-decoration: underline;
}

.links-breadcrumb-active a {
  color: var(--c-text, #0d0d0d);
  font-weight: 600;
}

.links-catalog-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.links-catalog-pills > li > a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  background: var(--c-surface-2, #eef1f5);
  color: var(--c-text, #0d0d0d);
  border-radius: 16px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.links-catalog-pills > li > a:hover {
  background: var(--c-primary, #4a90d9);
  color: #fff;
}

.links-catalog-dropdown {
  position: relative;
}

.links-catalog-toggle {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  background: var(--c-surface-2, #eef1f5);
  color: var(--c-text, #0d0d0d);
  border-radius: 16px;
  text-decoration: none;
}

.links-catalog-submenu {
  list-style: none;
  margin: 6px 0 0;
  padding: 8px 0;
  background: var(--c-bg-elevated, #fff);
  border: 1px solid var(--c-border, #e0e3e8);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  min-width: 180px;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
}

.links-catalog-submenu li > a {
  display: block;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--c-text, #0d0d0d);
  text-decoration: none;
}

.links-catalog-submenu li > a:hover {
  background: var(--c-surface-2, #eef1f5);
}

.links-catalog-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--c-border, #e0e3e8);
  list-style: none;
}

.links-empty {
  padding: 24px;
  text-align: center;
  color: var(--c-text-muted, #606060);
  background: var(--c-surface-2, #eef1f5);
  border-radius: var(--r-md, 10px);
}

/* ===== Links card (each site in panel) ===== */
.links-card {
  background: var(--c-bg-elevated, #fff);
  border-radius: var(--r-md, 10px);
  box-shadow: var(--sh-1, 0 1px 4px rgba(0, 0, 0, 0.06));
  padding: 18px 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.links-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.links-card-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.links-card-title-link {
  color: var(--c-text, #0d0d0d);
  text-decoration: none;
}

.links-card-title-link:hover {
  color: var(--c-primary, #4a90d9);
}

.links-card-body {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 600px) {
  .links-card-body {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .links-card {
    padding: 14px 14px;
  }
}

.links-card-thumb {
  display: block;
  width: 96px;
  height: 128px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--c-surface-2, #eef1f5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.links-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.links-card-thumb:hover img {
  transform: scale(1.05);
}

.links-card-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.links-card-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-text, #0d0d0d);
}

.links-card-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 8px;
  border-top: 1px solid var(--c-border, #e0e3e8);
  font-size: 13px;
  color: var(--c-text-muted, #606060);
}

.links-card-contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.links-card-icon {
  width: 14px;
  height: 14px;
  color: var(--c-text-muted, #606060);
  flex-shrink: 0;
}

.links-card-admin {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--c-border, #e0e3e8);
  font-size: 12px;
}

.links-card-admin-url {
  color: var(--c-text-muted, #606060);
  word-break: break-all;
}

.links-card-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}


/* =============================================================
   PROFILE MINI HEADER (profile.mini)
   Replaces Bootstrap 2 <div class="well well-small"> +
   pull-left/pull-right + 7 FontAwesome icon buttons with a
   modern flexbox bar + inline SVG icons + retina avatar.
   ============================================================= */
.profile-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 16px;
}

.profile-mini-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

.profile-mini-avatar {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-surface-2, #eef1f5);
  flex-shrink: 0;
}

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

.profile-mini-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.profile-mini-name {
  font-size: 14px;
  color: var(--c-text, #0d0d0d);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.profile-mini-name:hover {
  color: var(--c-primary, #4a90d9);
}

.profile-mini-goto {
  font-size: 12px;
  color: var(--c-text-muted, #606060);
  text-decoration: none;
}

.profile-mini-goto:hover {
  color: var(--c-primary, #4a90d9);
  text-decoration: underline;
}

.profile-mini-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}

.profile-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  color: #666;
  background: transparent;
  border-radius: 0;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1;
}

.profile-mini-btn:hover {
  color: var(--c-stihi);
  background: var(--c-stihi-soft);
}

.profile-mini-btn.active {
  color: #fff;
  background: var(--c-stihi-grad);
  box-shadow: var(--c-stihi-shadow);
}

.profile-mini-btn.active:hover {
  background: var(--c-stihi-grad);
  color: #fff;
}

.profile-mini-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: currentColor;
}

/* On narrow viewports (mobile), compact layout */
@media (max-width: 720px) {
  .profile-mini {
    flex-wrap: wrap;
    padding: 4px;
  }
  .profile-mini-info {
    min-width: 0;
    flex: 1 1 0;
    overflow: hidden;
  }
  .profile-mini-name {
    max-width: 100%;
  }
  .profile-mini-goto {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .profile-mini-user {
    gap: 8px;
    flex: 1 1 0;
    min-width: 0;
  }
  .profile-mini-nav {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .profile-mini-btn {
    padding: 8px 10px;
  }
  .profile-mini-label {
    display: none;
  }
}

@media (max-width: 400px) {
  .profile-mini-nav {
    gap: 2px;
  }
  .profile-mini-btn {
    padding: 6px 8px;
  }
}

/* Humor / Photobomb categories (was nav nav-tabs nav-stacked) */
.sidebar-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-category-item {
  margin: 0;
}

.sidebar-category-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--c-text, #2a2a2a);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.sidebar-category-item a:hover {
  background: var(--c-surface-2, #f0f2f5);
  color: var(--c-primary, #4a90d9);
}

.sidebar-category-item.is-active a,
.sidebar-category-item.active a {
  background: var(--c-primary, #4a90d9);
  color: #fff;
  font-weight: 500;
}

.sidebar-category-item.is-active a:hover,
.sidebar-category-item.active a:hover {
  background: var(--c-primary-hover, #3a7bc8);
  color: #fff;
}

.sidebar-category-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-category-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted, #6b7280);
}

.sidebar-category-item a:hover .sidebar-category-icon {
  color: var(--c-primary, #4a90d9);
}

.sidebar-category-item.is-active .sidebar-category-icon,
.sidebar-category-item.active .sidebar-category-icon {
  color: #fff;
}

.sidebar-category-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sidebar-category-count {
  flex: 0 0 auto;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--c-surface-2, #f0f2f5);
  color: var(--c-text-muted, #6b7280);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}
.sidebar-category-new {
  flex: 0 0 auto;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(21,101,192,0.15);
}

.sidebar-category-item.is-active .sidebar-category-count,
.sidebar-category-item.active .sidebar-category-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* Nested sublist (e.g. clubs categories) */
.sidebar-category-sublist {
  list-style: none;
  margin: 4px 0 4px 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--c-border, #e8e8e8);
  padding-left: 8px;
}
.sidebar-category-subitem {
  margin: 0;
}
.sidebar-category-subitem a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--c-text, #2a2a2a);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.sidebar-category-subitem a:hover {
  background: var(--c-surface-2, #f0f2f5);
  color: var(--c-primary, #4a90d9);
}
.sidebar-category-subitem.active a {
  background: var(--c-primary, #4a90d9);
  color: #fff;
  font-weight: 500;
}
.sidebar-category-subitem.active a:hover {
  background: var(--c-primary-hover, #3a7bc8);
}
.clubs-cat-toggle-li a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--c-text-muted, #6b7280);
  cursor: pointer;
  text-decoration: none;
}
.clubs-cat-toggle-li a:hover {
  color: var(--c-primary, #4a90d9);
}
.clubs-cat-toggle svg {
  width: 14px;
  height: 14px;
}

/* ===== News Sidebar Sections (modern-form-card style) ===== */
.news-sidebar-section {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.news-sidebar-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.news-sidebar-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.news-sidebar-author:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.news-sidebar-author:first-child {
  padding-top: 0;
}
.news-sidebar-author-poster {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}
.news-sidebar-author-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-sidebar-author-info {
  flex: 1;
  min-width: 0;
}
.news-sidebar-author--gold {
  background: linear-gradient(135deg, rgba(255,215,0,0.08) 0%, rgba(255,193,7,0.04) 100%);
  border-radius: 10px;
  padding: 10px;
  margin: 4px -10px;
  border: 1px solid rgba(255,215,0,0.2);
  box-shadow: 0 0 12px rgba(255,215,0,0.1);
}
.news-sidebar-author--gold .news-sidebar-author-poster {
  box-shadow: 0 0 8px rgba(255,215,0,0.3);
}
.news-sidebar-author-name {
  font-weight: 600;
  font-size: 14px;
  color: #1a2332;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-sidebar-author-name:hover {
  color: #4a90d9;
}
.news-sidebar-author-count {
  color: #8898aa;
  font-size: 12px;
  margin-top: 2px;
}
.news-sidebar-tag {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(74, 144, 217, 0.08);
  color: #4a90d9;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  margin: 3px 2px;
  transition: all 0.2s ease;
}
.news-sidebar-tag:hover {
  background: rgba(74, 144, 217, 0.15);
  color: #3a7bc8;
}
.news-sidebar-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 2px;
}
.news-sidebar-cat:hover {
  background: rgba(0,0,0,0.03);
}
.news-sidebar-cat-name {
  font-size: 13px;
  font-weight: 500;
  color: #1a2332;
}
.news-sidebar-cat-count {
  font-size: 12px;
  color: #8898aa;
  background: rgba(0,0,0,0.04);
  padding: 2px 8px;
  border-radius: 10px;
}
.news-sidebar-cat.active {
  background: rgba(74, 144, 217, 0.1);
  border: 1px solid rgba(74, 144, 217, 0.3);
}
.news-sidebar-cat.active .news-sidebar-cat-name {
  color: #4a90d9;
}

/* Mobile: no shadows/borders for sidebar */
@media (max-width: 979px) {
  .news-sidebar-section {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 16px 0;
    margin-bottom: 0;
  }
  .news-sidebar-section h3 {
    font-size: 14px;
    padding-bottom: 8px;
    margin-bottom: 12px;
  }
}



/* ===== Bootstrap 2 font icon → inline SVG ===== */
/* These override .icon-* classes that previously came from a font (FontAwesome / Bootstrap 2
   icons). Using data URIs avoids extra HTTP requests and font dependency.
   All icons are 16x16 SVG, currentColor for theme adaptation. */
[class*="icon-"] {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 0;
  vertical-align: -2px;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  font-style: normal;
}
.icon-calendar { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M11 1.5v1h2.5A1.5 1.5 0 0 1 15 4v9.5A1.5 1.5 0 0 1 13.5 15h-11A1.5 1.5 0 0 1 1 13.5V4a1.5 1.5 0 0 1 1.5-1.5H5v-1A.5.5 0 0 1 6 0a.5.5 0 0 1 .5.5v1h3v-1A.5.5 0 0 1 10 0a.5.5 0 0 1 .5.5v1zM14 6H2v7.5a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5V6z'/></svg>") !important; }
.icon-check { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M13.485 3.515a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06 0l-3.5-3.5a.75.75 0 0 1 1.06-1.06L5.5 10.44l6.97-6.97a.75.75 0 0 1 1.06 0z'/></svg>") !important; }
.icon-comment { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M14 1H2a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h3l3 3v-3h6a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z'/></svg>") !important; }
.icon-download { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M8 11.5l-4-4h2.5V1h3v6.5H12l-4 4zM2 13h12v2H2v-2z'/></svg>") !important; }
.icon-edit { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M12.146 1.146a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1 0 .708l-9.5 9.5a.5.5 0 0 1-.224.131l-3.5 1a.5.5 0 0 1-.617-.617l1-3.5a.5.5 0 0 1 .131-.224l9.5-9.5zM11.207 3L13 4.793 14.293 3.5 12.5 1.707 11.207 3z'/></svg>") !important; }
.icon-envelope { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2zm13 2.383l-4.708 2.825L15 7.383V13a1 1 0 0 0 1-1V5.383zM1 13V7.383l4.708 2.617L1 13z'/></svg>") !important; }
.icon-external { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M10 1v1.5h2.44L6.72 8.22l1.06 1.06L13.5 3.56V6H15V1h-5zM2 3h5v1.5H3.5v8.5h8.5V9H13v4.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 1 13.5v-9A1.5 1.5 0 0 1 2.5 3z'/></svg>") !important; }
.icon-eye-open { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M8 3C4 3 1 7 0 8c1 1 4 5 8 5s7-4 8-5c-1-1-4-5-8-5zm0 8.5A3.5 3.5 0 1 1 8 4.5a3.5 3.5 0 0 1 0 7zm0-5.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4z'/></svg>") !important; }
.icon-file { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M9 1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V5L9 1zm0 1.5L12.5 6H9V2.5z'/></svg>") !important; }
.icon-folder { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M0 3.5A1.5 1.5 0 0 1 1.5 2h3.379a1.5 1.5 0 0 1 1.06.44L7 3.5h7.5A1.5 1.5 0 0 1 16 5v8a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 13V3.5z'/></svg>") !important; }
.icon-gift { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M3 2.5A2.5 2.5 0 0 1 5.5 0h.55a2.5 2.5 0 0 1 2.45 2H8.5A2.5 2.5 0 0 1 11 0h.5a2.5 2.5 0 0 1 0 5H13v.5h.5a1.5 1.5 0 0 1 0 3H13v.5h2a.5.5 0 0 1 0 1H10v4a.5.5 0 0 1-1 0v-4H1a.5.5 0 0 1 0-1h2V9H2.5a1.5 1.5 0 0 1 0-3H3V5h-.5A2.5 2.5 0 0 1 0 2.5 2.5 2.5 0 0 1 2.5 0H3a2.5 2.5 0 0 1 .55 2H3.5A2.5 2.5 0 0 0 1 2.5V3h2.5A2.5 2.5 0 0 1 6 .5V0h-.5A2.5 2.5 0 0 0 3 2.5zM5.5 1a1.5 1.5 0 0 0 0 3H6V1H5.5zM10 1v3h.5a1.5 1.5 0 0 0 0-3H10z'/></svg>") !important; }
.icon-home { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M8 1l-7 6v8h5v-5h4v5h5V7L8 1z'/></svg>") !important; }
.icon-list { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z'/></svg>") !important; }
.icon-list-alt { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M1 3h14v3H1V3zm0 4h14v6H1V7zM2 4.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1zm0 4a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z'/></svg>") !important; }
.icon-map-marker { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M8 0a5 5 0 0 0-5 5c0 4 5 11 5 11s5-7 5-11a5 5 0 0 0-5-5zm0 7.5A2.5 2.5 0 1 1 8 2.5a2.5 2.5 0 0 1 0 5z'/></svg>") !important; }
.icon-minus-sign { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M3.5 6.5A.5.5 0 0 1 4 6h8a.5.5 0 0 1 0 1H4a.5.5 0 0 1-.5-.5zM2 1a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2zm12 1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h12z'/></svg>") !important; }
.icon-pdf { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M9 1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V5L9 1zm0 1.5L12.5 6H9V2.5zM5 9h1.5a1 1 0 0 1 0 2H6v1H5V9zm3 0h1.5a1 1 0 1 1 0 2H9v1H8V9z'/></svg>") !important; }
.icon-pencil { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M12.146 1.146a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1 0 .708l-9.5 9.5a.5.5 0 0 1-.224.131l-3.5 1a.5.5 0 0 1-.617-.617l1-3.5a.5.5 0 0 1 .131-.224l9.5-9.5zM11.207 3L13 4.793 14.293 3.5 12.5 1.707 11.207 3z'/></svg>") !important; }
.icon-plus { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2z'/></svg>") !important; }
.icon-road { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M5 0h6l-2 5h2L8 16 5 11h2L5 0z'/></svg>") !important; }
.icon-search { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M11.5 7a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0zm-.82 4.74a6 6 0 1 1 1.06-1.06l3.04 3.04a.75.75 0 1 1-1.06 1.06l-3.04-3.04z'/></svg>") !important; }
.icon-star { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z'/></svg>") !important; }
.icon-star-empty { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z'/></svg>") !important; opacity: 0.5; }
.icon-tag { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M7.5 1H1v6.5L8.5 15l6-6L7.5 1zM3 5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z'/></svg>") !important; }
.icon-remove { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6zM14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4H.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1z'/></svg>") !important; }
.icon-thumbs-up { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M5 6v10h7.5a2.5 2.5 0 0 0 2.45-1.97l.79-4.5A2 2 0 0 0 13.79 7H11V3.5a2 2 0 0 0-2-2 1 1 0 0 0-1 .76L6.85 5H5zm-2 0h-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h1V6z'/></svg>") !important; }
.icon-thumbs-down { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M11 10V0H3.5a2.5 2.5 0 0 0-2.45 1.97l-.79 4.5A2 2 0 0 0 2.21 9H5v3.5a2 2 0 0 0 2 2 1 1 0 0 0 1-.76L9.15 11H11zm2 0h1a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1h-1v10z'/></svg>") !important; }
.icon-trash { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6zM14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4H.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1z'/></svg>") !important; }
.icon-user { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'><path d='M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 1c-2.5 0-7 1.5-7 4.5V15h14v-1.5C15 10.5 10.5 9 8 9z'/></svg>") !important; }

/* White variants for icons inside .btn-primary/.btn-success/etc dark buttons */
/* Default fallback: invisible 1x1 SVG (no PNG sprite request). All real icon-white
   usages are specifically overridden below with their own SVG data URIs. */
.icon-white { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'/>") !important; }
.btn .icon-plus.icon-white, .btn-primary .icon-plus.icon-white, .btn-success .icon-plus.icon-white, .btn-warning .icon-plus.icon-white, .btn-danger .icon-plus.icon-white {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'><path d='M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2z'/></svg>") !important;
}
.btn .icon-list.icon-white, .btn-primary .icon-list.icon-white, .btn-success .icon-list.icon-white {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'><path d='M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z'/></svg>") !important;
}
.btn .icon-thumbs-up.icon-white, .btn-primary .icon-thumbs-up.icon-white, .btn-success .icon-thumbs-up.icon-white {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'><path d='M5 6v10h7.5a2.5 2.5 0 0 0 2.45-1.97l.79-4.5A2 2 0 0 0 13.79 7H11V3.5a2 2 0 0 0-2-2 1 1 0 0 0-1 .76L6.85 5H5zm-2 0h-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h1V6z'/></svg>") !important;
}
.btn .icon-thumbs-down.icon-white, .btn-primary .icon-thumbs-down.icon-white, .btn-warning .icon-thumbs-down.icon-white {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'><path d='M11 10V0H3.5a2.5 2.5 0 0 0-2.45 1.97l-.79 4.5A2 2 0 0 0 2.21 9H5v3.5a2 2 0 0 0 2 2 1 1 0 0 0 1-.76L9.15 11H11zm2 0h1a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1h-1v10z'/></svg>") !important;
}
.btn .icon-user.icon-white, .btn-primary .icon-user.icon-white {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'><path d='M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 1c-2.5 0-7 1.5-7 4.5V15h14v-1.5C15 10.5 10.5 9 8 9z'/></svg>") !important;
}
.btn .icon-envelope.icon-white, .btn-primary .icon-envelope.icon-white, .btn-success .icon-envelope.icon-white, .btn-info .icon-envelope.icon-white {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'><path d='M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2zm13 2.383l-4.708 2.825L15 7.383V13a1 1 0 0 0 1-1V5.383zM1 13V7.383l4.708 2.617L1 13z'/></svg>") !important;
}
.btn .icon-remove.icon-white, .btn-primary .icon-remove.icon-white, .btn-danger .icon-remove.icon-white, .afisha-detail-btn-danger .icon-remove.icon-white {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'><path d='M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6zM14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4H.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1z'/></svg>") !important;
}

/* ===== access.denied ===== */
.access-denied-wrapper {
  max-width: 600px;
  margin: 40px auto;
  padding: 24px;
  text-align: center;
}
.access-denied-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.access-denied-illustration img {
  display: block;
  max-width: 100%;
  height: auto;
}
.access-denied-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--c-text, #2a2a2a);
  margin: 0;
  line-height: 1.2;
}
.access-denied-divider {
  border: 0;
  border-top: 1px solid var(--c-border, #e8e8e8);
  margin: 24px 0;
}
.access-denied-message {
  font-size: 18px;
  color: var(--c-text, #2a2a2a);
  margin: 0;
}
@media (max-width: 600px) {
  .access-denied-title {
    font-size: 22px;
  }
  .access-denied-card {
    gap: 16px;
  }
}

/* ===== modern-alert (replaces Bootstrap 2 .alert.alert-info) ===== */
.modern-alert {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  border-radius: var(--r-md, 10px);
  background: #e7f3ff;
  border: 1px solid #b3daff;
  color: #004085;
  font-size: 14px;
  line-height: 1.5;
}
.modern-alert strong {
  font-weight: 600;
  color: #003366;
}
.modern-alert-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.modern-alert-info {
  background: #e7f3ff;
  border-color: #b3daff;
  color: #004085;
}
.modern-alert-info strong { color: #003366; }
.modern-alert-warning {
  background: #fff3cd;
  border-color: #ffe69c;
  color: #664d03;
}
.modern-alert-warning strong { color: #4d3902; }
.modern-alert-error {
  background: #f8d7da;
  border-color: #f1aeb5;
  color: #842029;
}
.modern-alert-error strong { color: #58151c; }
.modern-alert-success {
  background: #d1e7dd;
  border-color: #a3cfbb;
  color: #0a3622;
}
.modern-alert-success strong { color: #051b11; }

/* ===== user.gifts-my: modern gifts list ===== */
.gifts-my-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gifts-my-item {
  background: #fff;
  border: 1px solid var(--c-border, #e8e8e8);
  border-radius: var(--r-md, 10px);
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease;
}
.gifts-my-item:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.gifts-my-date {
  font-size: 12px;
  color: var(--c-text-muted, #6b7280);
  margin-bottom: 8px;
}
.gifts-my-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.gifts-my-sender {
  flex: 0 0 160px;
  display: flex;
  justify-content: center;
}
.gifts-my-gift {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
.gifts-my-text {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--c-text, #2a2a2a);
  font-style: italic;
}
.gifts-my-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}
.gifts-my-delete {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--c-text-muted, #6b7280);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.gifts-my-delete:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}
@media (max-width: 600px) {
  .gifts-my-body {
    flex-direction: column;
    align-items: stretch;
  }
  .gifts-my-sender {
    flex: 0 0 auto;
  }
}

/*=== adv list / cards ======================================================*/
.adv-balance-actions {
  margin: 12px 0 24px;
}
.adv-balance-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.adv-balance-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--r-md, 10px);
  background: var(--c-surface-2, #f0f2f5);
  color: var(--c-text, #2a2a2a);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--c-border, #e8e8e8);
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.adv-balance-link:hover {
  background: var(--c-primary, #4a90d9);
  border-color: var(--c-primary, #4a90d9);
  color: #fff;
  transform: translateY(-1px);
}

.adv-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.adv-card {
  background: #fff;
  border: 1px solid var(--c-border, #e8e8e8);
  border-radius: var(--r-md, 10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}
.adv-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
.adv-card-active {
  border-left: 3px solid #22c55e;
}
.adv-card-inactive {
  border-left: 3px solid #f59e0b;
  opacity: 0.92;
}

.adv-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--c-surface-2, #f7f8fa);
  border-bottom: 1px solid var(--c-border, #e8e8e8);
}
.adv-card-id {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text, #2a2a2a);
  font-variant-numeric: tabular-nums;
}
.adv-card-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.adv-card-status-live {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.adv-card-status-paused {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.adv-card-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #fafafa;
  min-height: 100px;
}
.adv-card-banner img {
  max-width: 100%;
  max-height: 200px;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.adv-card-body {
  padding: 14px 16px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.adv-card-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px 12px;
}
.adv-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.adv-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--c-text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.adv-stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text, #2a2a2a);
  word-break: break-word;
}
.adv-stat-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--c-primary, #4a90d9);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: -6px;
  transition: background 0.15s;
}
.adv-stat-link:hover {
  background: rgba(74, 144, 217, 0.1);
  color: var(--c-primary-hover, #3a7bc8);
}
.adv-stat-link svg {
  flex-shrink: 0;
}

.adv-card-url {
  padding-top: 8px;
  border-top: 1px dashed var(--c-border, #e8e8e8);
  font-size: 12px;
  word-break: break-all;
}
.adv-card-url a {
  color: var(--c-primary, #4a90d9);
  text-decoration: none;
}
.adv-card-url a:hover {
  text-decoration: underline;
}

.adv-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--c-border, #e8e8e8);
  background: var(--c-surface-2, #f7f8fa);
  flex-wrap: wrap;
}
.adv-card-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.adv-card-action svg {
  flex-shrink: 0;
}
.adv-card-action-primary {
  background: var(--c-primary, #4a90d9);
  color: #fff;
  border-color: var(--c-primary, #4a90d9);
}
.adv-card-action-primary:hover {
  background: var(--c-primary-hover, #3a7bc8);
  border-color: var(--c-primary-hover, #3a7bc8);
}
.adv-card-action-secondary {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.3);
}
.adv-card-action-secondary:hover {
  background: rgba(245, 158, 11, 0.22);
  color: #92400e;
}
.adv-card-action-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  justify-content: center;
  color: var(--c-text-muted, #6b7280);
  background: #fff;
  border-color: var(--c-border, #e8e8e8);
  margin-left: auto;
}
.adv-card-action-icon:first-of-type {
  margin-left: 0;
}
.adv-card-action-icon:hover {
  color: var(--c-text, #2a2a2a);
  background: #fff;
  border-color: var(--c-text-muted, #6b7280);
}
.adv-card-action-icon.adv-card-action-danger {
  color: #dc3545;
  border-color: rgba(220, 53, 69, 0.3);
}
.adv-card-action-icon.adv-card-action-danger:hover {
  background: rgba(220, 53, 69, 0.1);
  border-color: #dc3545;
  color: #b91c1c;
}

@media (max-width: 600px) {
  .adv-list {
    grid-template-columns: 1fr;
  }
  .adv-card-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/*=== shop / store (mod_page_shop) ==========================================*/
.shop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.shop-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--c-border, #e8e8e8);
  border-radius: var(--r-md, 10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.18s, transform 0.18s;
}
.shop-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
.shop-card-pending {
  border-left: 3px solid #f59e0b;
}
.shop-card-image {
  display: block;
  width: 140px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f2f5;
}
.shop-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.shop-card-status {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}
.shop-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.shop-card-title a {
  color: var(--c-text, #2a2a2a);
  text-decoration: none;
}
.shop-card-title a:hover {
  color: var(--c-primary, #4a90d9);
}
.shop-card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--c-text-muted, #6b7280);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--c-border, #e8e8e8);
  border-radius: var(--r-md, 10px);
  padding: 20px;
  margin: 16px 0;
}
.shop-detail-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.shop-detail-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.shop-detail-name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}
.shop-detail-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text, #2a2a2a);
}
.shop-detail-row {
  display: flex;
  gap: 12px;
  font-size: 14px;
  align-items: baseline;
}
.shop-detail-label {
  color: var(--c-text-muted, #6b7280);
  font-weight: 500;
  min-width: 200px;
}
.shop-detail-value {
  color: var(--c-text, #2a2a2a);
}

/* Cart */
.cart-form {
  margin: 16px 0;
}
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}
.cart-item {
  display: grid;
  grid-template-columns: 32px 80px 1fr auto auto auto 28px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--c-border, #e8e8e8);
  border-radius: var(--r-md, 10px);
  transition: box-shadow 0.15s;
}
.cart-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.cart-item-num {
  font-size: 13px;
  color: var(--c-text-muted, #6b7280);
  font-weight: 600;
  text-align: right;
}
.cart-item-image {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f2f5;
}
.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text, #2a2a2a);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-cost,
.cart-item-total {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text, #2a2a2a);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cart-item-qty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.cart-item-label {
  display: none;
  font-size: 10px;
  color: var(--c-text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cart-item-remove {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.cart-item-remove:hover {
  background: rgba(220, 53, 69, 0.1);
  border-color: #dc3545;
  color: #b91c1c;
}
.cart-grand-total {
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  margin: 16px 0;
  color: var(--c-text, #2a2a2a);
}
.cart-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.cart-actions .modern-btn-primary,
.cart-actions .modern-btn-secondary {
  min-width: 200px;
}

@media (max-width: 720px) {
  .cart-item {
    grid-template-columns: 32px 1fr;
    grid-template-areas:
      "num name"
      "img img"
      "cost qty"
      "total remove";
    row-gap: 8px;
  }
  .cart-item-num { grid-area: num; }
  .cart-item-image { grid-area: img; width: 100%; height: 120px; }
  .cart-item-name { grid-area: name; }
  .cart-item-cost { grid-area: cost; text-align: left; }
  .cart-item-qty { grid-area: qty; align-items: flex-end; }
  .cart-item-total { grid-area: total; text-align: left; }
  .cart-item-remove { grid-area: remove; }
  .cart-item-label { display: block; }
}

/* Phones (3-row phone entry) */
.phones-block {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.phones-header {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr 1fr;
  gap: 8px;
  font-size: 12px;
  color: var(--c-text-muted, #6b7280);
  padding: 0 4px;
}
.phones-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr 1fr;
  gap: 8px;
  align-items: stretch;
}
.phones-row select,
.phones-row input {
  font-size: 13px;
}
@media (max-width: 600px) {
  .phones-header { display: none; }
  .phones-row {
    grid-template-columns: 1fr 1fr;
    padding: 8px;
    border: 1px solid var(--c-border, #e8e8e8);
    border-radius: 8px;
    background: #fafafa;
  }
}

/* Address block */
.address-block {
  max-width: 720px;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.address-house-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
@media (max-width: 600px) {
  .address-house-row {
    grid-template-columns: 1fr;
  }
}

/* Modern form row (side-by-side form groups) */
.modern-form-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.modern-form-row .modern-form-group {
  flex: 1 1 200px;
  min-width: 0;
}
.modern-form-flex {
  flex: 1 1 200px;
}

@media (max-width: 720px) {
  .shop-detail {
    grid-template-columns: 1fr;
  }
  .shop-list {
    grid-template-columns: 1fr;
  }
  .shop-card {
    grid-template-columns: 100px 1fr;
    gap: 12px;
  }
  .shop-card-image {
    width: 100px;
    height: 80px;
  }
}

/* =============================================================
   FRIEND LINKS (projects/panel.links) — replaces <table> layout
   ============================================================= */
.friend-link-card {
  display: flex;
  gap: 16px;
  padding: 12px;
}
.friend-link-thumb {
  flex: 0 0 130px;
}
.friend-link-thumb img {
  max-width: 128px;
  height: auto;
  border-radius: 6px;
}
.friend-link-body {
  flex: 1;
  min-width: 0;
}
.friend-link-details {
  padding: 2px 0;
  color: #666;
}
.friend-link-details a {
  color: #1a6fc4;
}
@media (max-width: 480px) {
  .friend-link-card {
    flex-direction: column;
    gap: 8px;
  }
}

/* =============================================================
   ADV SEL INFO (online/adv/adv_sel_info) — replaces <table> layout
   ============================================================= */
.adv-sel-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 0;
}

/* =============================================================
   USERS LIST GRID (members/panel.users-list) — replaces <table> layout
   ============================================================= */
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.user-grid > div {
  text-align: center;
}

/* =============================================================
   BOOTSTRAP 2 REPLACEMENT — minimal rules for classes still used
   in non-admin modules.  Kept here so we never have to load the
   128KB bootstrap.min.css + bootstrap-responsive.css (removed
   2026-06-18 — see .remember/today-2026-06-18.md for audit).
   Now lives in layout.css (this file) instead of sidebar-modern.css.
   ============================================================= */

/* --- Grid: .container / .row-fluid / .span* --- */
/* Exact reproduction of Bootstrap 2.3.2 grid behavior */
.container {
  margin-left: auto;
  margin-right: auto;
  *zoom: 1;
  box-sizing: border-box;
}
.container::before,
.container::after {
  display: table;
  line-height: 0;
  content: "";
}
.container::after {
  clear: both;
}
.row-fluid {
  width: 100%;
  *zoom: 1;
  box-sizing: border-box;
  margin-bottom: 16px;
}
.row-fluid::before,
.row-fluid::after {
  display: table;
  line-height: 0;
  content: "";
}
.row-fluid::after {
  clear: both;
}
.row-fluid [class*="span"] {
  display: block;
  float: left;
  width: 100%;
  min-height: 1px;
  margin-left: 2.127659574%;
  *margin-left: 2.0744680846%;
  box-sizing: border-box;
}
.row-fluid [class*="span"]:first-child {
  margin-left: 0;
}
.row-fluid .span12 { width: 100%; }
.row-fluid .span9  { width: 74.468085106%; }
.row-fluid .span8  { width: 65.957446807%; }
.row-fluid .span6  { width: 48.93617021%; }
.row-fluid .span4  { width: 31.914893615%; }
.row-fluid .span3  { width: 23.404255317%; }

@media (max-width: 767px) {
  .row-fluid [class*="span"] {
    width: 100%;
    float: none;
    margin-left: 0;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #333;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  background: #e6e6e6;
  border-color: #adadad;
  text-decoration: none;
  color: #333;
}
/* Keyboard focus indicator (accessibility) */
.btn:focus-visible {
  outline: 2px solid #5b9dd9;
  outline-offset: 2px;
}
.btn-primary:focus-visible {
  outline-color: #1a6fc4;
}
.btn-primary {
  color: #fff;
  background: #3276b1;
  border-color: #2a6496;
}
.btn-primary:hover {
  color: #fff;
  background: #285e8e;
  border-color: #1f4d78;
}
.btn-danger {
  color: #fff;
  background: #d9534f;
  border-color: #d43f3a;
}
.btn-danger:hover {
  color: #fff;
  background: #c9302c;
  border-color: #ac2925;
}
.btn-info {
  color: #fff;
  background: #5bc0de;
  border-color: #46b8da;
}
.btn-info:hover {
  color: #fff;
  background: #39b3d7;
  border-color: #269abc;
}
.btn-success {
  color: #fff;
  background: #5cb85c;
  border-color: #4cae4c;
}
.btn-success:hover {
  color: #fff;
  background: #47a447;
  border-color: #398439;
}
.btn-warning {
  color: #fff;
  background: #f0ad4e;
  border-color: #eea236;
}
.btn-warning:hover {
  color: #fff;
  background: #ed9c28;
  border-color: #d58512;
}
.btn-mini {
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.4;
}
.btn-small {
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.5;
}
.btn-large {
  padding: 10px 20px;
  font-size: 16px;
  line-height: 1.33;
}
.btn-block {
  display: block;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* --- Float utilities --- */
.pull-right { float: right; }
.pull-left  { float: left; }

/* --- Label component --- */
.label {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 3px;
  background: #999;
}
.label-warning {
  background: #f89406;
}
.label-important {
  background: #b94a48;
}
.label-success {
  background: #468847;
}
.label-info {
  background: #3a87ad;
}

/* --- Badge component --- */
.badge {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 10px;
  background: #999;
}
.badge-info    { background: #3a87ad; }
.badge-success { background: #468847; }

/* --- Nav tabs (base) --- */
.nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav > li {
  position: relative;
  display: block;
}
.nav > li > a {
  display: block;
  padding: 8px 14px;
  color: #333;
  text-decoration: none;
}
.nav > li > a:hover {
  background: #eee;
}
.nav-tabs {
  border-bottom: 1px solid #ddd;
}
.nav-tabs > li {
  float: left;
  margin-bottom: -1px;
}
.nav-tabs > li > a {
  margin-right: 2px;
  border: 1px solid transparent;
  border-radius: 4px 4px 0 0;
  color: #08c;
}
.nav-tabs > li > a:hover {
  border-color: #eee #eee #ddd;
}
.nav-tabs > .active > a,
.nav-tabs > .active > a:hover {
  color: #555;
  cursor: default;
  background: #fff;
  border: 1px solid #ddd;
  border-bottom-color: transparent;
}

/* --- Pagination (base, supplements existing .pagination rules) --- */
.pagination-right {
  text-align: right;
}

/* --- iOS Safari SVG safety net for inline <svg viewBox="0 0 N N"> ---
   These classes appear in pages that don't always load a per-page CSS
   (e.g. clubs/functions.php emits .action-icon and
   .member-portrait-placeholder-svg but panel.clubs_control doesn't
   import users-list2/css/main.css). iOS Safari defaults <svg> to
   300x150 px when viewBox is set but no width/height is given,
   so provide a sensible default here. */
.action-icon {
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.member-portrait-placeholder-svg {
  display: block;
  width: 70%;
  height: auto;
  margin: 0 auto;
}
