.mechanics-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1100px;
  margin-bottom: 40px;
  padding: 0 20px;
}

.mechanic-card {
  display: flex;
  flex-direction: row;
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: cardFadeIn 0.5s ease forwards;
  opacity: 0;
  min-height: 200px;
}

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

.mechanic-card:hover {
  transform: translateY(-3px);
  border-color: rgba(74, 255, 136, 0.6);
  box-shadow: 0 8px 25px rgba(74, 255, 136, 0.15);
}

.mechanic-image-container {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.mechanic-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mechanic-card:hover .mechanic-image {
  transform: scale(1.05);
}

.mechanic-info {
  flex: 1;
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mechanic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.mechanic-name {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.mechanic-tier {
  padding: 6px 14px;
  border: 1px solid;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.mechanic-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.mechanic-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
}

.learn-more {
  color: rgba(74, 255, 136, 0.7);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.mechanic-card:hover .learn-more {
  color: #4aff88;
  transform: translateX(5px);
}

.no-mechanics {
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 40px;
  font-size: 18px;
}

.error-message {
  color: #ff6b4a;
  text-align: center;
  padding: 40px;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(74, 255, 136, 0.4);
  border-radius: 20px;
  padding: 40px 35px 35px;
  width: min(95vw, 1200px);
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1001;
  animation: modalIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(74, 255, 136, 0.1);
}

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

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 32px;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
  z-index: 10;
}

.modal-close:hover {
  color: #4aff88;
}

.modal-title {
  color: #ffffff;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 25px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.modal-images {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-bottom: 25px;
}

.modal-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 350px;
  min-width: 280px;
  max-width: 600px;
  aspect-ratio: 4 / 3;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  padding: 15px;
  cursor: pointer;
}

.modal-image-wrapper:only-child {
  flex: 1 1 500px;
  max-width: 800px;
  aspect-ratio: 16 / 10;
}

.modal-image-wrapper:only-child .modal-image {
  max-width: 95%;
  max-height: 95%;
}

.modal-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.modal-description {
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.7;
  text-align: center;
  padding: 15px 10px 0;
}

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

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.zoom-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.zoom-overlay.active {
  display: flex;
}

.zoom-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 40px;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
  z-index: 10;
}

.zoom-close:hover {
  color: #4aff88;
}

.zoom-image {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
  cursor: default;
}

.back-btn {
  display: inline-block;
  padding: 14px 32px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.back-btn:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.page-content {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 10;
  padding: 40px 20px;
}

.page-title {
  color: #ffffff;
  font-size: clamp(28px, 8vw, 48px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  text-align: center;
}

.page-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(16px, 4vw, 20px);
  text-align: center;
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.6;
  padding: 0 15px;
}

.highlight-mod {
  color: #4a9eff;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

@media (max-width: 768px) {
  .mechanic-card {
    flex-direction: column;
  }

  .mechanic-image-container {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 200px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mechanic-info {
    padding: 20px;
    gap: 12px;
  }

  .mechanic-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .mechanic-name {
    font-size: 20px;
  }

  .modal-content {
    padding: 25px 20px 20px;
  }
}

@media (max-width: 480px) {
  .mechanics-grid {
    padding: 0 10px;
    gap: 15px;
  }

  .mechanic-image-container {
    height: 180px;
  }

  .mechanic-info {
    padding: 15px;
  }

  .mechanic-name {
    font-size: 18px;
  }

  .mechanic-description {
    font-size: 14px;
  }

  .modal-image-wrapper {
    flex: 1 1 100%;
    min-width: 100%;
  }
}