/* ========================================
   ARHIVA TEME - Theme Archive Gallery
   Professional, responsive, neon-themed
   ======================================== */

.page-arhiva-teme {
  background: linear-gradient(135deg, #081418 0%, #0a1f28 100%);
  min-height: 100vh;
}

.arhiva-teme-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ========================================
   HERO SECTION
   ======================================== */

.arhiva-hero {
  text-align: center;
  padding: 60px 20px;
  margin-bottom: 40px;
  position: relative;
}

.arhiva-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(22, 241, 211, 0.1) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.arhiva-hero-content {
  position: relative;
  z-index: 1;
}

.arhiva-title {
  font-size: 3.5rem;
  font-weight: 900;
  color: #16f1d3;
  text-shadow: 
    0 0 20px rgba(22, 241, 211, 0.6),
    0 0 40px rgba(22, 241, 211, 0.3);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.arhiva-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
}

/* ========================================
   SEARCH
   ======================================== */

.arhiva-search-wrap {
  max-width: 900px;
  margin: 0 auto 34px;
  padding: 0 20px;
}

.arhiva-search-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.arhiva-scope-switcher {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.arhiva-scope-btn {
  height: 40px;
  padding: 0 14px 0 28px;
  border-radius: 999px;
  border: 1px solid rgba(22, 241, 211, 0.42);
  background: rgba(8, 20, 24, 0.92);
  color: rgba(210, 250, 246, 0.9);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all .18s ease;
  box-shadow: inset 0 0 8px rgba(22, 241, 211, 0.08);
  position: relative;
}

.arhiva-scope-btn::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5d5d;
  box-shadow: 0 0 10px rgba(255, 64, 64, 0.62), 0 0 0 1px rgba(255, 120, 120, 0.35);
  transition: all .18s ease;
}

.arhiva-scope-btn:hover {
  border-color: rgba(22, 241, 211, 0.82);
  color: #16f1d3;
  box-shadow: 0 0 14px rgba(22, 241, 211, 0.24), inset 0 0 10px rgba(22, 241, 211, 0.12);
}

.arhiva-scope-btn:hover::before {
  background: #ff4646;
  box-shadow: 0 0 14px rgba(255, 62, 62, 0.9), 0 0 0 1px rgba(255, 120, 120, 0.55);
}

.arhiva-scope-btn.is-active {
  border-color: #1dffd7;
  color: #041013;
  background: #16f1d3;
  box-shadow: 0 0 18px rgba(22, 241, 211, 0.55), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.arhiva-scope-btn.is-active::before {
  background: #ff1f1f;
  box-shadow: 0 0 16px rgba(255, 40, 40, 1), 0 0 26px rgba(255, 40, 40, 0.7);
}

.arhiva-search-input-wrap {
  position: relative;
  flex: 1;
}

.arhiva-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #16f1d3;
  pointer-events: none;
  font-size: 0.9rem;
  z-index: 2;
}

.arhiva-search-input {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  border: 2px solid rgba(22, 241, 211, 0.7);
  background: rgba(6, 22, 30, 0.95);
  color: #e6f1fb;
  padding: 0 16px 0 44px !important;
  font-size: 1rem;
  outline: none;
  box-shadow: inset 0 0 10px rgba(22, 241, 211, 0.08), 0 0 14px rgba(22, 241, 211, 0.18);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.arhiva-search-input::placeholder {
  color: rgba(230, 241, 251, 0.52);
}

.arhiva-search-input:focus {
  border-color: #16f1d3;
  background: rgba(6, 22, 30, 1);
  box-shadow: 0 0 0 3px rgba(22, 241, 211, 0.14), 0 0 24px rgba(22, 241, 211, 0.28);
}

.arhiva-search-btn,
.arhiva-search-reset {
  height: 50px;
  padding: 0 18px;
  border-radius: 12px;
  border: 2px solid #16f1d3;
  background: linear-gradient(135deg, rgba(22, 241, 211, 0.18) 0%, rgba(22, 241, 211, 0.08) 100%);
  color: #16f1d3;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all .2s ease;
  cursor: pointer;
}

.arhiva-search-btn:hover,
.arhiva-search-reset:hover {
  color: #1df7ff;
  border-color: #1df7ff;
  box-shadow: 0 0 18px rgba(22, 241, 211, 0.35);
  transform: translateY(-1px);
}

/* ========================================
   THEMES GRID
   ======================================== */

.themes-grid-wrapper {
  padding: 0 20px;
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

/* ========================================
   THEME CARD
   ======================================== */

.theme-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(22, 241, 211, 0.1);
}

.theme-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(22, 241, 211, 0.3),
    0 0 0 2px rgba(22, 241, 211, 0.4);
}

/* ========================================
   POSTER
   ======================================== */

.theme-poster {
  position: relative;
  width: 100%;
  padding-top: 133.33%; /* 3:4 aspect ratio (poster) */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a2a35;
}

.theme-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(8, 20, 24, 0.4) 50%,
    rgba(8, 20, 24, 0.95) 100%
  );
  transition: opacity 0.3s ease;
}

.theme-card:hover .theme-overlay {
  background: linear-gradient(
    to bottom,
    rgba(22, 241, 211, 0.15) 0%,
    rgba(8, 20, 24, 0.7) 50%,
    rgba(8, 20, 24, 0.98) 100%
  );
}

/* Category badge (top-left) */
.theme-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(22, 241, 211, 0.45);
  background: rgba(8, 20, 24, 0.82);
  color: #16f1d3;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(22, 241, 211, 0.22);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.theme-card:hover .theme-category-badge {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 0 18px rgba(22, 241, 211, 0.42);
}

/* ========================================
   THEME INFO
   ======================================== */

.theme-info {
  position: absolute;
  bottom: 80px;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 2;
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-card:hover .theme-info {
  transform: translateY(0);
  opacity: 1;
}

.theme-name {
  font-size: 1.75rem;
  font-weight: 900;
  color: #16f1d3;
  text-shadow: 
    0 0 15px rgba(22, 241, 211, 0.8),
    0 2px 10px rgba(0, 0, 0, 0.8);
  margin: 0 0 8px 0;
  letter-spacing: 1px;
}

.theme-date {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-weight: 500;
}

/* ========================================
   WINNER BADGE
   ======================================== */

.winner-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(8, 20, 24, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(22, 241, 211, 0.2);
  z-index: 3;
  transition: all 0.3s ease;
}

.theme-card:hover .winner-badge {
  background: rgba(22, 241, 211, 0.15);
  border-color: rgba(22, 241, 211, 0.5);
  box-shadow: 0 0 20px rgba(22, 241, 211, 0.3);
}

.winner-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #16f1d3;
  box-shadow: 0 0 10px rgba(22, 241, 211, 0.5);
  flex-shrink: 0;
}

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

.winner-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: rgba(22, 241, 211, 0.7);
  font-weight: 700;
  letter-spacing: 1px;
}

.winner-name {
  font-size: 1rem;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   FOOTER
   ======================================== */

.arhiva-footer {
  text-align: center;
  padding: 40px 20px;
}

.btn-back-concurs {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, rgba(22, 241, 211, 0.15) 0%, rgba(22, 241, 211, 0.05) 100%);
  border: 2px solid #16f1d3;
  border-radius: 12px;
  color: #16f1d3;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 
    0 0 20px rgba(22, 241, 211, 0.2),
    inset 0 0 10px rgba(22, 241, 211, 0.1);
}

.btn-back-concurs:hover {
  background: linear-gradient(135deg, rgba(22, 241, 211, 0.25) 0%, rgba(22, 241, 211, 0.15) 100%);
  box-shadow: 
    0 0 30px rgba(22, 241, 211, 0.5),
    inset 0 0 20px rgba(22, 241, 211, 0.2);
  transform: translateY(-2px);
  color: #1df7ff;
}

/* ========================================
   PAGINATION
   ======================================== */

.arhiva-pagination {
  padding: 40px 20px;
  display: flex;
  justify-content: center;
}

.pagination-nav {
  width: 100%;
  max-width: 800px;
}

.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(22, 241, 211, 0.1);
  border: 2px solid #16f1d3;
  border-radius: 10px;
  color: #16f1d3;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
  background: rgba(22, 241, 211, 0.2);
  box-shadow: 0 0 20px rgba(22, 241, 211, 0.4);
  transform: translateY(-2px);
}

.pagination-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: rgba(22, 241, 211, 0.3);
}

.pagination-arrow {
  font-size: 1.2rem;
  line-height: 1;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(22, 241, 211, 0.05);
  border: 1px solid rgba(22, 241, 211, 0.3);
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination-number:hover {
  background: rgba(22, 241, 211, 0.15);
  border-color: #16f1d3;
  box-shadow: 0 0 15px rgba(22, 241, 211, 0.3);
  color: #16f1d3;
}

.pagination-number.active {
  background: linear-gradient(135deg, #16f1d3 0%, #0ea89a 100%);
  border-color: #16f1d3;
  color: #081418;
  font-weight: 900;
  box-shadow: 0 0 25px rgba(22, 241, 211, 0.6);
  cursor: default;
}

.pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
  font-size: 1.2rem;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.no-themes {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .themes-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
  }

  .arhiva-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .arhiva-teme-container {
    padding: 20px 12px;
  }

  .arhiva-search-wrap {
    padding: 0 6px;
    margin: 0 auto 22px;
  }

  .arhiva-search-form {
    gap: 10px;
  }

  .arhiva-scope-switcher {
    gap: 8px;
  }

  .arhiva-scope-btn {
    height: 36px;
    padding: 0 12px 0 24px;
    font-size: 0.82rem;
  }

  .arhiva-scope-btn::before {
    left: 8px;
    width: 9px;
    height: 9px;
  }

  .arhiva-search-input-wrap {
    flex-basis: 100%;
  }

  .arhiva-search-btn,
  .arhiva-search-reset {
    flex: 1;
    min-width: 120px;
  }

  .arhiva-hero {
    padding: 40px 16px;
    margin-bottom: 30px;
  }

  .arhiva-title {
    font-size: 2rem;
  }

  .arhiva-subtitle {
    font-size: 1rem;
  }

  .themes-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }

  .theme-name {
    font-size: 1.25rem;
  }

  .theme-date {
    font-size: 0.8rem;
  }

  .winner-badge {
    padding: 8px 10px;
    gap: 8px;
  }

  .winner-photo {
    width: 32px;
    height: 32px;
  }

  .winner-label {
    font-size: 0.65rem;
  }

  .winner-name {
    font-size: 0.85rem;
  }

  /* Pagination Mobile */
  .pagination-wrapper {
    gap: 10px;
  }

  .pagination-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .pagination-text {
    display: none; /* Hide text on mobile, keep arrows only */
  }

  .pagination-number {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .pagination-dots {
    width: 40px;
    height: 40px;
  }

  .btn-back-concurs {
    padding: 12px 24px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .themes-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .arhiva-title {
    font-size: 1.75rem;
  }

  /* Pagination Small Mobile */
  .pagination-wrapper {
    gap: 6px;
  }

  .pagination-btn {
    padding: 8px 12px;
  }

  .pagination-arrow {
    font-size: 1rem;
  }

  .pagination-number {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .pagination-dots {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  /* Keep info visible on mobile (no hover) */
  .theme-info {
    opacity: 1;
    transform: translateY(0);
  }

  .theme-category-badge {
    opacity: 1;
    transform: translateY(0);
    font-size: 0.72rem;
    padding: 5px 9px;
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .arhiva-title {
    font-size: 2.5rem !important;
  }
}
@media (max-width: 480px) {
  /* Păstrăm titlul la 2.5rem și pe ecrane foarte mici */
  .arhiva-title {
    font-size: 2.5rem !important;
  }
}