html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background-color: #191919;
  color: #ffffff;
  font-family: "Inter", sans-serif;
}

.container {
  padding: 2rem;
}

h1 {
  margin-bottom: 2rem;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-item {
  cursor: pointer;
  transition: transform 0.2s ease;
  overflow: hidden;
}

.grid-item:hover {
  transform: scale(1.02);
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  display: block;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #191919;
  z-index: 1000;
}

.modal.active {
  display: block;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem 2rem;
  font-size: 3rem;
  color: #ffffff;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  transition: color 0.2s ease;
  border-bottom: 1px solid #ffffff;
}

.modal-close:hover {
  color: #999;
}

.modal-body {
  display: flex;
  flex-direction: row;
  height: 100%;
  overflow: hidden;
}

.modal-image {
  background-color: #1e1e1e;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-right: 1px solid #ffffff;
}

.modal-image img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.modal-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  padding-right: 1rem;
  min-width: 0;
  padding: 2rem;
}

.modal-text::-webkit-scrollbar {
  width: 8px;
}

.modal-text::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

.modal-text::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

.modal-text::-webkit-scrollbar-thumb:hover {
  background: #555;
}

p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  opacity: 0.9;
}

b {
  font-weight: 600;
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-body {
    flex-direction: column;
    overflow-y: auto;
  }

  .modal-text {
    overflow-y: visible;
  }

  .modal-image {
    border-right: none;
    border-bottom: 1px solid #ffffff;
  }
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .container {
    padding: 1rem;
  }

  .modal-close {
    font-size: 2rem;
    padding: 1rem;
  }

  .modal-text {
    padding: 1rem;
  }
}
