body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Courier New", monospace;
  background: linear-gradient(to bottom, #87ceeb 0%, #98fb98 100%);
  overflow: hidden;
  height: 100%;
}

.game-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.ground {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 80px;
  background: repeating-linear-gradient(
    90deg,
    #228b22 0px,
    #228b22 20px,
    #32cd32 20px,
    #32cd32 40px
  );
  animation: scrollGround 10s linear infinite;
}

@keyframes scrollGround {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.clouds {
  position: absolute;
  top: 20%;
  width: 100%;
  height: 100px;
}

.cloud {
  position: absolute;
  width: 60px;
  height: 30px;
  background: #fff;
  border-radius: 30px;
  animation: scrollClouds 15s linear infinite;
}

.cloud:before {
  content: "";
  position: absolute;
  top: -15px;
  left: 10px;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
}

.cloud:after {
  content: "";
  position: absolute;
  top: -10px;
  right: 10px;
  width: 25px;
  height: 25px;
  background: #fff;
  border-radius: 50%;
}

.cloud:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
}
.cloud:nth-child(2) {
  left: 40%;
  animation-delay: -5s;
}
.cloud:nth-child(3) {
  left: 70%;
  animation-delay: -10s;
}

@keyframes scrollClouds {
  0% {
    transform: translateX(100vw);
  }
  100% {
    transform: translateX(-100px);
  }
}

.player {
  position: absolute;
  bottom: 80px;
  left: 100px;
  width: 40px;
  height: 40px;
  transition: all 0.3s ease;
  z-index: 10;
}

.player.jumping {
  animation: jump 0.6s ease-in-out;
}

@keyframes jump {
  0%,
  100% {
    bottom: 80px;
  }
  50% {
    bottom: 180px;
  }
}

.player-sprite {
  width: 100%;
  height: 100%;
  position: relative;
}

.marker {
  position: absolute;
  bottom: 140px;
  width: 30px;
  height: 50px;
  background: #ffd700;
  cursor: pointer;
  animation: bounce 2s ease-in-out infinite;
  z-index: 5;
}

.marker:before {
  content: "?";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #333;
  font-weight: bold;
  font-size: 20px;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.marker.about {
  left: 300px;
}
.marker.projects {
  left: 600px;
}
.marker.contact {
  left: 900px;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 4px solid #333;
  padding: 20px;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 8px 8px 0 #333;
  z-index: 100;
  display: none;
}

.popup.active {
  display: block;
  animation: popupAppear 0.3s ease-out;
}

@keyframes popupAppear {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.popup h2 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 24px;
}

.popup p {
  margin: 0 0 15px 0;
  color: #666;
  line-height: 1.5;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.project-card {
  background: #f8f9fa;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 4px 4px 0 #333;
  transition: transform 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 #333;
}

.project-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #333;
  border-radius: 50%;
  font-size: 24px;
}

.project-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin: 0 0 10px 0;
  text-align: center;
}

.project-description {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  margin: 0 0 15px 0;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 15px 0;
}

.tech-tag {
  background: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

.project-status {
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 15px;
  display: inline-block;
  margin-bottom: 15px;
}

.read-more-btn {
  background: #333;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 12px;
  width: 100%;
  transition: background 0.2s ease;
}

.read-more-btn:hover {
  background: #555;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #f8f9fa;
  color: #333;
  text-decoration: none;
  border: 1px solid #dee2e6;
  border-radius: 15px;
  font-size: 11px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.project-link:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-link.demo {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}

.project-link.demo:hover {
  background: #218838;
}

.project-link.github {
  background: #333;
  color: #fff;
  border-color: #333;
}

.project-link.github:hover {
  background: #555;
}

.project-link.playstore {
  background: #01875f;
  color: #fff;
  border-color: #01875f;
}

.project-link.playstore:hover {
  background: #016a4a;
}

.project-link.prototype {
  background: #f24e1e;
  color: #fff;
  border-color: #f24e1e;
}

.project-link.prototype:hover {
  background: #d73e18;
}

.project-link.api {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.project-link.api:hover {
  background: #0056b3;
}

.project-detail-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 4px solid #333;
  padding: 25px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 8px 8px 0 #333;
  z-index: 101;
  display: none;
}

.project-detail-popup.active {
  display: block;
  animation: popupAppear 0.3s ease-out;
}

.project-detail-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.project-detail-icon {
  font-size: 40px;
  margin-right: 15px;
}

.project-detail-title {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.project-detail-section {
  margin-bottom: 20px;
}

.project-detail-section h4 {
  color: #333;
  margin: 0 0 10px 0;
  font-size: 16px;
  border-bottom: 2px solid #333;
  padding-bottom: 5px;
}

.project-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  margin: 15px 0;
}

.project-image {
  border: 2px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.project-image-title {
  background: #f8f9fa;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: bold;
  color: #333;
  border-bottom: 1px solid #dee2e6;
}

.project-image svg {
  width: 100%;
  height: auto;
  display: block;
}

.project-detail-section p {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.project-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-features li {
  color: #666;
  margin: 8px 0;
  padding-left: 20px;
  position: relative;
}

.project-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
}

.status-completed {
  background: #d4edda;
  color: #155724;
}

.status-ongoing {
  background: #fff3cd;
  color: #856404;
}

.status-planned {
  background: #d1ecf1;
  color: #0c5460;
}

.close-btn {
  background: #333;
  color: #fff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 14px;
}

.close-btn:hover {
  background: #555;
}

.navigation {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
  margin-bottom: 20px;
}

.nav-btn {
  display: block;
  margin: 5px 0;
  padding: 10px 15px;
  background: #333;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.nav-btn:hover {
  background: #555;
}

.instructions {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 15px;
  border-radius: 5px;
  font-size: 12px;
  z-index: 50;
}

.title {
  position: fixed;
  top: 20px;
  left: 20px;
  color: #333;
  font-size: 24px;
  font-weight: bold;
  z-index: 50;
}

@media (max-width: 768px) {
  .player {
    left: 50px;
    width: 35px;
    height: 35px;
  }

  .marker {
    width: 25px;
    height: 40px;
  }

  .marker.about {
    left: 200px;
  }
  .marker.projects {
    left: 400px;
  }
  .marker.contact {
    left: 600px;
  }

  .title {
    font-size: 18px;
  }

  .popup {
    padding: 15px;
    max-width: 95%;
  }

  .popup h2 {
    font-size: 20px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  display: none;
}

.overlay.active {
  display: block;
}

@view-transition {
  navigation: auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
  align-items: start; /* supaya rapi di atas */
}

/* Garis pemisah vertikal */
.contact-info {
  border-right: 2px solid #333;
  padding-right: 20px;
}

/* Form di kanan */
.contact-form {
  padding-left: 20px;
}

.contact-info p {
  font-size: 14px;
  margin-bottom: 10px;
  color: #333;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-form input,
.contact-form textarea {
  padding: 8px;
  border: 2px solid #333;
  border-radius: 4px;
  font-family: "Courier New", monospace;
}

.contact-form button {
  padding: 8px 12px;
  background: #333;
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: "Courier New", monospace;
}

.contact-form button:hover {
  background: #555;
}

/* Responsif untuk mobile: garis hilang, kolom jadi 1 */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-info {
    border-right: none;
    padding-right: 0;
  }
  .contact-form {
    padding-left: 0;
  }
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #333;
}

.contact-list li .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.contact-list li a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-list li a:hover {
  text-decoration: underline;
  color: #0056b3;
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
}

.skill {
  display: flex;
  flex-direction: column;
}

.skill-name {
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.skill-bar {
  width: 100%;
  height: 15px;
  background: #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: #28a745;
  border-radius: 8px;
  width: 0%;
  transition: width 1s ease-in-out;
}
