/* ==========================================
   ARCHIVE PAGE - NEON STYLE
   ========================================== */

/* Prevent horizontal scrollbar on page */
  body.page-concurs-arhiva {
    overflow-x: hidden;
  }
  
  /* Content should sit below header/dropdowns */
  body.page-concurs-arhiva main.site-main,
  body.page-concurs-arhiva .site-main {
    position: relative;
    z-index: 1;
  }
  
  /* Header: not sticky on this page, must be positioned so z-index works */
  body.page-concurs-arhiva header,
  body.page-concurs-arhiva #gamfi-header,
  body.page-concurs-arhiva .gamfi-header-section,
  body.page-concurs-arhiva .transparent-header,
  body.page-concurs-arhiva .menu-area {
    position: relative !important;
    z-index: 100;
    /* backdrop-filter creates a GPU compositing layer that traps children.
       Removing it lets the dropdown overflow correctly above page content. */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  /* Header dropdowns / mega menus — must be above header z-index and all page content */
  body.page-concurs-arhiva .header-menu .sub-menu,
  body.page-concurs-arhiva .menu-area .sub-menu,
  body.page-concurs-arhiva .nav-menu li > .sub-menu,
  body.page-concurs-arhiva .gamfi_mega_menu_sect,
  body.page-concurs-arhiva .gamfi_mega_menu,
  body.page-concurs-arhiva .mega_menu_hov .gamfi_mega_menu_sect {
    position: absolute;
    z-index: 999;
  }
  
  /* Container should NOT create stacking context */
  body.page-concurs-arhiva .container { z-index: auto; }
  
  /* Theme Likes - Cool Neon Red Heart */
  .archive-theme-likes {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(255, 0, 100, 0.15) 0%, rgba(255, 50, 120, 0.1) 100%);
    border: 3px solid #ff0064;
    border-radius: 50px;
    padding: 12px 28px;
    box-shadow:
      0 0 20px rgba(255, 0, 100, 0.5),
      0 0 40px rgba(255, 0, 100, 0.3),
      inset 0 0 15px rgba(255, 0, 100, 0.1);
    animation: heartPulse 2s ease-in-out infinite;
  }
  
  .likes-heart {
    font-size: 32px;
    color: #ff0064;
    filter: drop-shadow(0 0 8px rgba(255, 0, 100, 0.8));
    animation: heartBeat 1.5s ease-in-out infinite;
  }
  
  .likes-count {
    font-size: 28px;
    font-weight: 900;
    color: #ff0064;
    text-shadow:
      0 0 10px rgba(255, 0, 100, 0.8),
      0 0 20px rgba(255, 0, 100, 0.5);
    letter-spacing: 1px;
  }
  
  @keyframes heartPulse {
    0%, 100% {
      box-shadow:
        0 0 20px rgba(255, 0, 100, 0.5),
        0 0 40px rgba(255, 0, 100, 0.3),
        inset 0 0 15px rgba(255, 0, 100, 0.1);
    }
    50% {
      box-shadow:
        0 0 30px rgba(255, 0, 100, 0.7),
        0 0 60px rgba(255, 0, 100, 0.5),
        inset 0 0 20px rgba(255, 0, 100, 0.2);
    }
  }
  
  @keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(1); }
  }
  
  body.page-concurs-arhiva .container {
    max-width: 1200px !important;
    overflow-x: hidden;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Navigation */
  .archive-nav {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
  }
  
  .archive-nav-btn {
    flex: 1;
    max-width: 250px;
    min-width: 180px;
    font-weight: 700;
    padding: 14px 24px;
    background: rgba(22, 241, 211, 0.1);
    border: 2px solid #16f1d3;
    color: #16f1d3;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 17px;
    text-align: center;
    box-shadow: 0 0 15px rgba(22, 241, 211, 0.3);
  }
  
  .archive-nav-btn:hover {
    background: rgba(22, 241, 211, 0.2);
    box-shadow: 0 0 25px rgba(22, 241, 211, 0.6);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
  }
  
  /* Theme Title */
  .archive-theme-title {
    font-size: clamp(28px, 5vw, 48px);
    color: rgba(22, 241, 211, 0.7);
    text-shadow: 0 0 8px rgba(22, 241, 211, 0.4);
    font-weight: 800;
    letter-spacing: 1px;
  }
  
  .archive-date {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
  }
  
  /* Winner Card */
  .archive-winner-card {
    background: rgba(22, 241, 211, 0.05);
    border: 2px solid rgba(22, 241, 211, 0.3) !important;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(22, 241, 211, 0.2);
  }
  
  .archive-winner-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border: 3px solid #16f1d3;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(22, 241, 211, 0.5);
  }
  
  /* Ranking Table */
  .card {
    background: linear-gradient(135deg, rgba(10, 15, 20, 0.95) 0%, rgba(15, 20, 30, 0.95) 100%);
    border: 2px solid rgba(22, 241, 211, 0.3) !important;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  }
  
  .archive-ranking-table {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
  }
  
  .archive-ranking-table thead {
    background: linear-gradient(135deg, rgba(22, 241, 211, 0.2) 0%, rgba(13, 207, 184, 0.15) 100%);
  }
  
  .archive-ranking-table th {
    background-color: transparent;
    border-bottom: 3px solid #16f1d3 !important;
    color: #16f1d3;
    font-weight: 800;
    padding: 18px 15px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(22, 241, 211, 0.5);
  }
  
  .archive-ranking-table td {
    padding: 16px 15px;
    border-bottom: 1px solid rgba(22, 241, 211, 0.15);
    vertical-align: middle;
    font-weight: 500;
    background: transparent !important;
    color: #ffffff !important;
  }
  
  .archive-ranking-table tbody tr,
  .archive-ranking-row,
  tr.archive-ranking-row {
    transition: all 0.3s ease;
    background: #1a2332 !important;
    background-color: #1a2332 !important;
    border-left: 3px solid transparent;
  }
  
  .archive-ranking-table tbody tr:nth-child(even),
  .archive-ranking-row:nth-child(even),
  tr.archive-ranking-row:nth-child(even) {
    background: #212b3d !important;
    background-color: #212b3d !important;
  }
  
  .archive-ranking-row:hover {
    background: linear-gradient(90deg, rgba(22, 241, 211, 0.15) 0%, rgba(13, 207, 184, 0.1) 100%) !important;
    border-left: 3px solid #16f1d3;
    box-shadow: 0 0 20px rgba(22, 241, 211, 0.3);
    transform: translateX(5px);
  }
  
  /* Position number styling */
  .archive-ranking-table td:first-child {
    font-weight: 800;
    font-size: 20px;
    color: #16f1d3;
    text-shadow: 0 0 10px rgba(22, 241, 211, 0.5);
  }
  
  /* Username styling */
  .archive-ranking-table .ranking-user { color: #fff; font-weight: 700; }
  
  /* Song title styling */
  .archive-ranking-table .ranking-song {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
  }
  .archive-ranking-table .ranking-song:hover { color: #0dcfb8; }
  
  /* Votes and Points badges */
  .archive-ranking-table .badge-votes,
  .archive-ranking-table .badge-points {
    font-weight: 700;
    font-size: 15px;
  }
  
  /* Play Button */
  .ranking-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #16f1d3 0%, #0dcfb8 100%);
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 16px;
    font-weight: 900;
    text-decoration: none;
    box-shadow:
      0 4px 15px rgba(22, 241, 211, 0.5),
      0 0 20px rgba(22, 241, 211, 0.3),
      inset 0 -2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
  }
  .ranking-play-btn::before {
    content: '▶';
    display: block;
    margin-left: 3px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  }
  .ranking-play-btn:hover {
    transform: scale(1.15);
    box-shadow:
      0 6px 25px rgba(22, 241, 211, 0.7),
      0 0 35px rgba(22, 241, 211, 0.5),
      inset 0 -2px 8px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #1ffde3 0%, #16f1d3 100%);
  }
  .ranking-play-btn:active { transform: scale(1.05); }
  
  .archive-hidden { display: none; }
  
  /* Show More Button */
  #showMoreRankings {
    background: rgba(22, 241, 211, 0.1);
    border: 2px solid #16f1d3;
    color: #16f1d3;
    font-weight: 600;
    padding: 10px 30px;
    border-radius: 8px;
    transition: all 0.3s;
  }
  #showMoreRankings:hover {
    background: rgba(22, 241, 211, 0.2);
    box-shadow: 0 0 20px rgba(22, 241, 211, 0.5);
    color: #fff;
    transform: translateY(-2px);
  }
  
  /* Poster Carousel */
  .archive-poster-carousel-wrapper {
    background: rgba(22, 241, 211, 0.03);
    border: 1px solid rgba(22, 241, 211, 0.15);
    border-radius: 12px;
    padding: 20px;
  }
  .archive-poster-carousel-container {
    position: relative;
  }
  .archive-poster-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    cursor: grab;
    user-select: none;
    align-items: center;

  }
  .archive-poster-carousel.active { cursor: grabbing; }
  .archive-poster-carousel::-webkit-scrollbar { height: 8px; }
  .archive-poster-carousel::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
  }
  .archive-poster-carousel::-webkit-scrollbar-thumb {
    background: #16f1d3;
    border-radius: 10px;
  }
  .archive-poster-item { flex: 0 0 auto; width: 200px; height: 200px; position: relative; }
  .archive-poster-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
  }
  .archive-poster-link:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 24px rgba(22, 241, 211, 0.4);
  }
  .archive-poster-img { width: 100%; height: 100%; object-fit: cover; }
  .archive-poster-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
  }
  .archive-poster-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 15px 10px 10px;
    color: white;
    font-size: 12px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
  }
  .archive-poster-link:hover .archive-poster-overlay { opacity: 1; }
  
  /* Diamond Play Button */
  .archive-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, rgba(22, 241, 211, 0.15) 0%, rgba(22, 241, 211, 0.05) 100%);
    border: 3px solid #16f1d3;
    border-radius: 8px;
    color: #16f1d3;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    box-shadow:
      0 0 20px rgba(22, 241, 211, 0.4),
      inset 0 0 20px rgba(22, 241, 211, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  .archive-play-btn::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #16f1d3, #0dcfb8, #16f1d3);
    z-index: -1;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .archive-play-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
      0 0 30px rgba(22, 241, 211, 0.6),
      0 8px 30px rgba(22, 241, 211, 0.4),
      inset 0 0 30px rgba(22, 241, 211, 0.2);
    color: #fff;
  }
  .archive-play-btn:hover::before { opacity: 1; }
  .archive-play-btn .play-icon { font-size: 24px; text-shadow: 0 0 10px #16f1d3; }
  .archive-play-btn .play-text { text-shadow: 0 0 10px rgba(22, 241, 211, 0.5); }
  
  /* ==========================================
     RESPONSIVE - MOBILE & TABLET
     ========================================== */
  
  /* Tablets (768px - 991px) */
  @media (max-width: 991px) {
    body.page-concurs-arhiva .container { padding-left: 20px; padding-right: 20px; }
    .archive-theme-title { font-size: 32px; }
    .archive-nav { flex-wrap: wrap; gap: 12px; }
    .archive-nav-btn { flex: 1 1 calc(50% - 6px); min-width: 150px; }
    .archive-winner-card .d-flex { flex-direction: column !important; text-align: center; }
    .archive-winner-photo { width: 150px; height: 150px; margin: 0 auto 20px; }
    .archive-ranking-table { font-size: 14px; }
    .archive-ranking-table th,
    .archive-ranking-table td { padding: 12px 8px; }
  }
  
  /* Mobile (max 768px) */
  @media (max-width: 768px) {
    body.page-concurs-arhiva .container { padding-left: 15px; padding-right: 15px; }
    .archive-theme-title { font-size: 24px; line-height: 1.3; }
    .archive-date { font-size: 16px; }
    .archive-theme-likes { padding: 10px 20px; gap: 8px; }
    .likes-heart { font-size: 24px; }
    .likes-count { font-size: 20px; }
    .archive-nav { flex-direction: column; gap: 10px; }
    .archive-nav-btn { width: 100%; max-width: none; padding: 12px 20px; font-size: 15px; }
    .archive-winner-card { padding: 20px !important; }
    .archive-winner-card .d-flex { flex-direction: column !important; align-items: center !important; text-align: center; }
    .archive-winner-photo { width: 120px; height: 120px; margin-bottom: 20px; }
    .archive-winner-card h3 { font-size: 20px !important; }
    .archive-winner-card p { font-size: 16px !important; }
    .archive-winner-card .d-flex.gap-3 { flex-direction: column !important; gap: 10px !important; width: 100%; }
    .archive-winner-card .badge { font-size: 13px !important; padding: 6px 12px !important; }
    .archive-play-btn { padding: 12px 24px; font-size: 16px; width: 100%; justify-content: center; }
    .archive-play-btn .play-icon { font-size: 20px; }
    .archive-ranking-table { font-size: 13px; }
    .archive-ranking-table th,
    .archive-ranking-table td { padding: 10px 5px; font-size: 12px; }
    .archive-ranking-table th { font-size: 11px; }
    /* FORCE Voturi column (4th column) to be visible on mobile */
    .archive-ranking-table th:nth-child(4),
    .archive-ranking-table td:nth-child(4) { display: table-cell !important; }
    .archive-ranking-table .badge-votes,
    .archive-ranking-table .badge-points { font-size: 12px; }
    .ranking-play-btn { width: 36px; height: 36px; font-size: 14px; }
    .archive-poster-item { width: 150px; height: 150px; }
    #showMoreRankings { width: 100%; padding: 12px 20px; }
  }
  
  /* Small Mobile (max 576px) */
  @media (max-width: 576px) {
    .archive-theme-title { font-size: 20px; }
    .archive-date { font-size: 14px; }
    .archive-nav-btn { font-size: 14px; padding: 10px 16px; }
    .archive-winner-photo { width: 100px; height: 100px; }
    .archive-winner-card h3 { font-size: 18px !important; }
    .archive-winner-card p { font-size: 14px !important; }
    .archive-play-btn { padding: 10px 20px; font-size: 14px; }
    .archive-ranking-table { font-size: 11px; }
    .archive-ranking-table th,
    .archive-ranking-table td { padding: 8px 3px; }
    .archive-ranking-table td:first-child { font-size: 14px; }
    /* FORCE Voturi column to be visible, even on very small screens */
    .archive-ranking-table th:nth-child(4),
    .archive-ranking-table td:nth-child(4) { display: table-cell !important; }
    /* Hide only the play button column on very small screens */
    .archive-ranking-table th:last-child,
    .archive-ranking-table td:last-child { display: none !important; }
    .ranking-play-btn { width: 32px; height: 32px; font-size: 12px; }
    .archive-poster-item { width: 120px; height: 120px; }
    .card-body { padding: 15px !important; }
  }
  /* Stiluri Adăugate pentru Alinierea Titlului și Săgeților */
.title-nav-wrapper {
    display: flex;
    align-items: center; 
    justify-content: space-between; 
    gap: 20px;
    padding: 0 15px; 
    margin-bottom: 20px !important;
}

.archive-arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px; 
    height: 50px; 
    padding: 0;
    font-size: 24px;
    background: rgba(22, 241, 211, 0.1);
    border: 2px solid #16f1d3;
    color: #16f1d3;
    border-radius: 50%; 
    text-decoration: none;
    transition: all 0.3s;
    flex-shrink: 0; 
    box-shadow: 0 0 10px rgba(22, 241, 211, 0.3);
}

.archive-arrow-btn:hover {
    background: rgba(22, 241, 211, 0.3);
    box-shadow: 0 0 20px rgba(22, 241, 211, 0.6);
    color: #fff;
    transform: scale(1.1);
}

/* Modifică modul în care titlul se comportă în Flexbox */
.archive-theme-title {
    flex-grow: 1; /* Permite titlului să ocupe spațiul central */
    text-align: center;
    margin-bottom: 0 !important; /* Elimină marginile de jos */
    line-height: 1.2;
    /* Păstrează celelalte stiluri existente (font, culoare, text-shadow) */
}
@media (max-width: 768px) {
    
    /* Mărirea Fontului General */
    body {
        font-size: 1.1rem; /* Crește fontul de bază cu 10% (de la 1rem standard) */
    }

    /* Mărirea Fontului pentru Paragrafe și Liste */
    h3, li, span {
        /* Asigură-te că fontul din tabele/liste este lizibil */
        font-size: 15px !important; 
    }
    h5, p {
        font-size: 20px !important; 
    }
    .ranking-song {
        font-size: 15px !important; 
    }
    /* Titluri (Exemplu: Puncte și Voturi din tabel) */
    .archive-ranking-table .badge-votes,
    .archive-ranking-table .badge-points {
        font-size: 15px; 
    }
    
    /* Titlul Câștigătorului (Winner Card) */
    .archive-winner-card h3 {
        font-size: 26px !important; 
    }

    /* Titlul Temei Principal */
    .archive-theme-title {
        /* Folosește o valoare fixă mai mare pentru vizibilitate */
        font-size: 26px !important; 
    }
}

  