* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a1a1a 100%);
  color: #e0e0e0;
  height: 100vh;
  overflow: hidden;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Background image layer */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("public/images/l4d2-bg/1.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(4px) brightness(0.25) contrast(0.7) saturate(0.8);
  z-index: -1;
  opacity: 0.5;
  transform: scale(1.05);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  background: rgba(0, 0, 0, 0.8);
  padding: 1rem 0;
  border-bottom: 3px solid #d32f2f;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 0.5rem;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.logo-image {
  height: 60px;
  width: auto;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 10px rgba(211, 47, 47, 0.5));
  pointer-events: none;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo-text {
  font-size: 2rem;
  font-weight: 700;
  color: #d32f2f;
  text-shadow: 0 0 20px rgba(211, 47, 47, 0.5);
  margin: 0;
}

.separator {
  font-size: 2rem;
  color: #666;
  font-weight: 300;
  user-select: none;
}

.nav-link {
  font-size: 2rem;
  font-weight: 700;
  color: #888;
  text-decoration: none;
  transition: all 0.3s ease;
  text-shadow: 0 0 10px rgba(136, 136, 136, 0.3);
  position: relative;
}

.nav-link:hover {
  color: #d32f2f;
  text-shadow: 0 0 20px rgba(211, 47, 47, 0.5);
  transform: translateY(-2px);
}

.nav-link:active {
  transform: translateY(0);
}

.drip-button {
  font-size: 2rem;
  font-weight: 700;
  color: #888;
  text-decoration: none;
  transition: all 0.3s ease;
  text-shadow: 0 0 10px rgba(136, 136, 136, 0.3);
  position: relative;
}

.drip-button:hover {
  color: #d32f2f;
  text-shadow: 0 0 20px rgba(211, 47, 47, 0.5);
  transform: translateY(-2px);
}

.drip-button:active {
  transform: translateY(0);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.tagline {
  text-align: center;
  font-size: 1rem;
  color: #b0b0b0;
  font-weight: 300;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1rem 0;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
  text-align: center;
  padding: 1rem;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #d32f2f;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #b0b0b0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem;
}

.campaign-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.campaign-card:hover {
  box-shadow: 0 20px 40px rgba(211, 47, 47, 0.3);
  border-color: #d32f2f;
}

.campaign-thumbnail {
  width: 100%;
  height: 150px;
  background: linear-gradient(45deg, #333, #666);
  position: relative;
  overflow: hidden;
}

.campaign-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.campaign-card:hover .campaign-thumbnail img {
  transform: scale(1.1);
}

.rating-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.8);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.stars {
  color: #ffc107;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  gap: 2px;
}

.stars i {
  display: inline-block;
  color: #ffc107;
}

.stars i.far {
  color: rgba(255, 255, 255, 0.3);
}

.partial-star-container {
  position: relative;
  display: inline-block;
  font-size: inherit;
}

.partial-star-bg {
  color: rgba(255, 255, 255, 0.3);
}

.partial-star-fill {
  position: absolute;
  top: 0;
  left: 0;
  color: #ffc107;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}

.campaign-info {
  padding: 1rem;
}

.campaign-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #fff;
}

.campaign-description {
  color: #b0b0b0;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.campaign-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal {
  background: linear-gradient(
    135deg,
    rgba(25, 25, 25, 0.98),
    rgba(15, 15, 15, 0.98)
  );
  border-radius: 16px;
  width: min(95vw, 900px);
  height: min(90vh, 700px);
  position: relative;
  border: 1px solid rgba(211, 47, 47, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.25s ease-out;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(211, 47, 47, 0.9);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.modal-close:hover {
  background: rgba(183, 28, 28, 0.95);
  transform: scale(1.05);
}

.modal-content {
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 2rem 2rem 1rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.75rem;
  color: #ffffff;
  margin-bottom: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(211, 47, 47, 0.6);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(211, 47, 47, 0.8);
}

.modal-thumbnail {
  width: 100%;
  height: 240px;
  overflow: hidden;
  flex-shrink: 0;
}

.modal-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-details {
  padding: 1rem 2rem;
  flex: 1;
  overflow: visible;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.detail-section {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-section.full-width {
  grid-column: 1 / -1;
  margin-top: 1rem;
}

.detail-title {
  font-size: 0.875rem;
  color: #d32f2f;
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.detail-title i {
  font-size: 0.75rem;
  opacity: 0.8;
}

.detail-content {
  color: #e0e0e0;
  line-height: 1.5;
  font-size: 0.95rem;
}

.modal-footer {
  padding: 1rem 2rem 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  text-align: center;
}

.steam-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #1b2838, #2a475e);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #66c0f4;
  font-weight: 500;
  font-size: 0.9rem;
}

.steam-link:hover {
  background: linear-gradient(135deg, #66c0f4, #4a90b8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 192, 244, 0.3);
}

.friends-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.friend-tag {
  background: rgba(211, 47, 47, 0.8);
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.modal-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.modal-rating .stars {
  font-size: 1.2rem;
}

.rating-number {
  color: #ffc107;
  font-weight: 600;
  font-size: 1.1rem;
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem 1.5rem;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-btn {
  background: transparent;
  border: 2px solid rgba(211, 47, 47, 0.3);
  color: #e0e0e0;
  padding: 0.7rem 1rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(211, 47, 47, 0.2);
  border-color: #d32f2f;
  transform: translateY(-2px);
}

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

.pagination-btn.active {
  background: #d32f2f;
  border-color: #d32f2f;
  color: white;
  font-weight: bold;
}

.pagination-info {
  color: #b0b0b0;
  font-size: 0.9rem;
  margin: 0 1rem;
  white-space: nowrap;
}

/* Large screens (desktop) - 6 campaigns */
@media (min-width: 1024px) {
  .campaigns-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Medium screens (tablets) - 4 campaigns */
@media (max-width: 1023px) and (min-width: 768px) {
  .campaigns-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .campaign-thumbnail {
    height: 140px;
  }

  .header-nav {
    gap: 0.8rem;
  }

  .logo-text {
    font-size: 1.8rem;
  }

  .separator {
    font-size: 1.8rem;
  }

  .drip-button {
    font-size: 1.8rem;
  }

  .tagline {
    font-size: 0.9rem;
  }
}

/* Small screens (mobile landscape, small tablets) - 3 campaigns */
@media (max-width: 767px) and (min-width: 480px) {
  .campaigns-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    padding: 0 0.5rem;
  }

  .campaign-thumbnail {
    height: 120px;
  }

  .campaign-info {
    padding: 0.8rem;
  }

  .campaign-title {
    font-size: 1rem;
  }

  .campaign-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .logo-image {
    height: 50px;
  }

  .header-nav {
    gap: 0.7rem;
  }

  .logo-text {
    font-size: 1.6rem;
  }

  .separator {
    font-size: 1.6rem;
  }

  .drip-button {
    font-size: 1.6rem;
  }

  .tagline {
    font-size: 0.85rem;
  }

  .header {
    padding: 0.8rem 0;
  }

  .modal {
    width: 95vw;
    height: 85vh;
  }

  .modal-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  .modal-thumbnail {
    height: 180px;
  }

  .modal-details {
    padding: 0.75rem 1.5rem;
  }

  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .modal-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
  }

  .pagination {
    padding: 0.6rem 1rem;
    gap: 0.3rem;
  }

  .pagination-btn {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
  }

  .pagination-info {
    font-size: 0.75rem;
    margin: 0 0.5rem;
  }
}

/* Very small screens (mobile portrait) - 2 campaigns */
@media (max-width: 479px) {
  .campaigns-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    padding: 0 0.5rem;
  }

  .campaign-thumbnail {
    height: 100px;
  }

  .campaign-info {
    padding: 0.6rem;
  }

  .campaign-title {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
  }

  .campaign-description {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 0.5rem;
  }

  .campaign-meta {
    font-size: 0.7rem;
  }

  .stars {
    font-size: 0.9rem;
  }

  .logo-image {
    height: 40px;
    margin-bottom: 8px;
  }

  .header-nav {
    gap: 0.6rem;
  }

  .logo-text {
    font-size: 1.4rem;
  }

  .separator {
    font-size: 1.4rem;
  }

  .drip-button {
    font-size: 1.4rem;
  }

  .tagline {
    font-size: 0.8rem;
  }

  .header {
    padding: 0.6rem 0;
  }

  .main {
    padding: 0.8rem 0;
  }

  .container {
    padding: 0 10px;
  }

  .modal {
    width: 98vw;
    height: 90vh;
  }

  .modal-header {
    padding: 1.25rem 1.25rem 0.75rem 1.25rem;
  }

  .modal-title {
    font-size: 1.4rem;
  }

  .modal-thumbnail {
    height: 120px;
  }

  .modal-details {
    padding: 0.5rem 1.25rem;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .detail-section {
    padding: 0.6rem;
  }

  .modal-footer {
    padding: 0.75rem 1.25rem 1.25rem 1.25rem;
  }

  .pagination-container {
    margin: 0.5rem 0;
  }

  .pagination {
    padding: 0.5rem 0.8rem;
    gap: 0.2rem;
  }

  .pagination-btn {
    width: 30px;
    height: 30px;
    font-size: 0.7rem;
  }

  .pagination-info {
    font-size: 0.7rem;
    margin: 0 0.3rem;
  }
}

/* Tier List Styles */
.tierlist-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  overflow: auto;
}

.tierlist-image-wrapper {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tierlist-image {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  width: auto;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.1);
  object-fit: contain;
}

/* Responsive adjustments for tier list */
@media (max-width: 768px) {
  .tierlist-container {
    padding: 1rem 0.5rem;
  }

  .tierlist-image {
    max-height: calc(100vh - 160px);
    border-radius: 10px;
  }

  .nav-link {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .tierlist-container {
    padding: 0.5rem 0.25rem;
  }

  .tierlist-image {
    max-height: calc(100vh - 140px);
    border-radius: 8px;
  }

  .nav-link {
    font-size: 1.4rem;
  }
}
