/* =======================
   ROOT & RESET
======================= */
:root {
  --bg-blue: #0063e9;
  --window-dark: #444444;
  --highlight-orange: #f39c12;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =======================
   BODY
======================= */
body {
  background-color: #3e85ea;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: "Segoe UI", Tahoma, sans-serif;
  overflow: hidden;
}

/* =====================
   CLOUD BACKGROUND
===================== */

/* WRAPPER */
.app-wrapper {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 10;
}

/* =====================
   CLOUD BASE
===================== */
.cloud-layer {
  position: fixed;
  left: 0;
  width: 200%;
  background-repeat: repeat-x;
  background-position: left bottom;
  background-size: auto 100%;
  pointer-events: none;
  z-index: 1;
}

/* CLOUD PALING BAWAH */
.cloud-layer-1 {
  bottom: -150px;
  height: 70%;

  background-image: url("img/cloud1.png");
  opacity: 0.45;

  animation: cloudMove1 180s linear infinite;
}

/* CLOUD TENGAH */
.cloud-layer-2 {
  top: 140px;
  height: 80%;

  background-image: url("img/cloud2.png");
  opacity: 0.65;

  animation: cloudMove2 40s linear infinite;
}

/* CLOUD ATAS */
.cloud-layer-3 {
  top: -80px;
  height: 60%;

  background-image: url("img/cloud3.png");
  opacity: 0.85;

  animation: cloudMove3 100s linear infinite;
}

/* =====================
   KEYFRAMES (SEAMLESS)
===================== */
@keyframes cloudMove1 {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes cloudMove2 {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes cloudMove3 {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* =====================
   WINDOW ABOVE CLOUDS
===================== */

.main-window {
  position: relative;
  z-index: 10;
  transform: none !important;
}

/* =======================
   MUSIC TOGGLE ICON
======================= */
.music-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 44px;
  height: 44px;

  background: rgba(255, 255, 255, 0.15);
  border: 2px solid #ffffff;
  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-family: "Pixelify Sans";
  font-size: 18px;
  color: #ffffff;

  cursor: pointer;
  z-index: 9999;

  transition: all 0.2s ease;
}

/* Hover glow */
.music-toggle:hover {
  background: #ffffff;
  color: var(--bg-blue);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

/* Active (music ON) */
.music-toggle.active {
  background: #ffffff;
  color: var(--bg-blue);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8), 0 0 14px rgba(0, 102, 255, 0.8);
}

/* =======================
   MAIN WINDOW (HOME)
======================= */
.main-window {
  width: 700px;
  background: var(--bg-blue);
  border: 2px solid #ffffff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.window-header-static {
  font-family: "Pixelify Sans";
  background: #ffffff;
  color: var(--bg-blue);
  padding: 12px 20px;
  font-weight: bold;
}

.window-content-static {
  padding: 60px 20px;
  text-align: center;
}

/* =======================
   HERO
======================= */
.hero h1 {
  font-family: "Pixelify Sans";
  color: #ffffff;
  font-size: 3.5rem;
  font-weight: 500;
}

.hero img:hover {
  content: url(img/logobr1.png);
}

.highlight {
  font-family: "Pixelify Sans";
  font-weight: bold;
  color: #ffffff;
}

.subtitle {
  font-family: "Pixelify Sans";
  color: #ffffff;
  font-size: 1.05rem;
  margin-top: 10px;
}

/* =======================
   MENU
======================= */
.menu-container {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-top: 50px;
  font-family: "Pixelify Sans";
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.menu-item:hover {
  transform: translateY(-5px);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.menu-item img {
  width: 60px;
  margin-bottom: 10px;
}

.menu-item .label {
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
}

/* =======================
   POPUP BASE (ALL WINDOWS)
======================= */
.popup-window {
  position: absolute;
  width: 480px;
  border: 2px solid #ffffff;
  border-radius: 12px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);

  opacity: 0;
  visibility: hidden;
  transform: scale(0.6);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-window.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

/* =======================
   POPUP HEADER
======================= */
.popup-header {
  background: #ffffff;
  color: var(--bg-blue);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Pixelify Sans";
  cursor: move;
}

.close-btn {
  background: none;
  border: none;
  font-family: monospace;
  font-size: 16px;
  color: var(--bg-blue);
  cursor: pointer;
}

/* =======================
   ABOUT POPUP
======================= */
.popup-window.about {
  background: var(--bg-blue);
}

.about-me {
  display: flex;
  gap: 20px;
  padding: 40px;
  background: var(--bg-blue);
  align-items: center;
}

.profile-img {
  width: 140px;
  height: auto;
}

.aboutme-text {
  background-color: #277bf0;
  border-radius: 20px;
}

.aboutme-text h2 {
  font-family: "Pixelify Sans";
  color: #ffffff;
  font-style: italic;
  margin-bottom: 30px;
  padding-top: 20px;
  padding-left: 30px;
}

.aboutme-text p {
  font-family: "Pixelify Sans";
  color: #ffffff;
  font-size: 14px;
  line-height: 1.6;
  margin: 20px 30px;
}

/* =======================
   LINKS POPUP
======================= */
.popup-window.link {
  background: var(--bg-blue);
}

.popup-body,
.popup-body2 {
  background-color: var(--bg-blue);
  padding: 20px 20px;
}

.social-grid {
  display: flex;
  justify-content: center;
  gap: 50px;
  padding: 30px;
}

.social-grid2 {
  font-family: "Pixelify Sans";
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 30px;
}

.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #ffffff;
}

.social-item img,
.social-item2 img {
  width: 45px;
  margin-bottom: 6px;
}

.social-item span,
.social-item2 span {
  font-size: 11px;
  font-weight: bold;
  font-family: monospace;
}

.info-footer {
  margin: 0 20px 20px;
  padding: 12px;
  border-radius: 8px;
  background: #f9f9f9;
  border: 1px solid #eee;
  font-size: 11px;
  color: #646464;
  text-align: center;
}

.info-footer2 {
  margin: 0 20px 20px;
  padding: 12px;
  border-radius: 8px;
  background: #f9f9f9;
  border: 1px solid #eee;
  font-size: 11px;
  color: #646464;
  text-align: center;
}

/* =======================
   PROJECT WINDOW
======================= */
.popup-window.project {
  width: 800px;
  height: 550px;
  background: var(--bg-blue);
}

/* LIST */
.project-list {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

/* =======================
   PROJECT ITEM (ROW)
======================= */
.project-item {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* LEFT ICON */
.project-icon,
.project-icon2,
.project-icon3 {
  padding-top: 50px;
  padding-left: 40px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project-icon img,
.project-icon2 img,
.project-icon3 img {
  width: 90px;
  border: 2px solid #ffffff;
  border-radius: 15px;
}

/* =======================
   RIGHT CONTENT
======================= */
.project-info,
.project-info2,
.project-info3 {
  padding-top: 10px;
  padding-left: 30px;
  font-family: "Pixelify Sans";
  color: #ffffff;
}

.project-info h3,
.project-info2 h3,
.project-info3 img {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 6px;
}

.project-info h3 span {
  color: red;
}

.project-info2 h3 span {
  color: yellow;
}

.project-info3 h3 span {
  color: greenyellow;
}

.project-info p,
.project-info2 p,
.project-info3 p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 6px;
  max-width: 420px;
}

/* LINK */
.project-info a,
.project-info2 a,
.project-info3 a {
  font-size: 12px;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid #ffffff;
  padding-bottom: 2px;
}

.project-info a:hover,
.project-info2 a:hover,
.project-info3 a:hover {
  color: #ffeb3b;
  border-color: #ffeb3b;
}

/* =======================
   HOVER EFFECT
======================= */

.project-item:hover .project-icon3 img {
  content: url(img/hovergc.gif);
  width: 90px;
  border: 2px solid #ffffff;
  border-radius: 15px;

  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7))
    drop-shadow(0 0 12px rgba(0, 102, 255, 0.6));
}

.project-item:hover .project-icon2 img {
  content: url(img/hoverbrick.gif);
  width: 90px;
  border: 2px solid #ffffff;
  border-radius: 15px;

  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7))
    drop-shadow(0 0 12px rgba(0, 102, 255, 0.6));
}

.project-item:hover .project-icon img {
  content: url(img/hoverTMOG.gif);
  width: 90px;
  border: 2px solid #ffffff;
  border-radius: 15px;

  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7))
    drop-shadow(0 0 12px rgba(0, 102, 255, 0.6));
}

/* ===================================================
   RESPONSIVE OPTIMIZATION (Tablet & Mobile)
   =================================================== */

/* Tablet & HP Umum */
@media (max-width: 850px) {
  /* Perkecil Main Window */
  .main-window {
    width: 90%;
    max-width: 650px;
  }

  /* Buat Project Window lebih fleksibel */
  .popup-window.project {
    width: 90%;
    height: 80vh; /* Gunakan tinggi layar agar bisa di-scroll */
    overflow-y: auto;
  }

  .project-list {
    gap: 30px;
  }
}

/* Khusus Mobile (Handphone) */
@media (max-width: 600px) {
  body {
    overflow-y: auto; /* Izinkan scroll jika konten melebihi layar */
    align-items: flex-start; /* Mulai dari atas */
    padding-top: 60px;
  }

  /* Hero Section */
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero img {
    width: 120px;
  }

  /* Menu Navigation */
  .menu-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Jadi 2 baris 2 kolom */
    gap: 20px;
    margin-top: 30px;
  }

  /* Popup Windows */
  .popup-window {
    width: 95% !important;
    left: 2.5% !important; /* Center manual karena drag fix */
    top: 50px !important;
    max-height: 85vh;
    overflow-y: auto;
  }

  /* About Me Mobile */
  .about-me {
    flex-direction: column;
    padding: 20px;
    text-align: center;
  }

  .aboutme-text h2 {
    padding: 20px 0 10px 0;
    margin-bottom: 10px;
    text-align: center;
  }

  /* Links & Commission Grid */
  .social-grid {
    gap: 20px;
    flex-wrap: wrap;
  }

  .social-grid2 {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  /* Project List Mobile */
  .project-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 20px;
  }

  .project-icon,
  .project-icon2,
  .project-icon3 {
    padding: 0;
    width: 80px;
    height: 80px;
  }

  .project-info,
  .project-info2,
  .project-info3 {
    padding: 0;
  }

  .project-info p,
  .project-info2 p,
  .project-info3 p {
    font-size: 12px;
    max-width: 100%;
  }

  /* Matikan fitur Drag di Mobile agar tidak kacau saat di-scroll */
  .popup-header {
    cursor: default;
  }
}

/* Perbaikan Cloud agar tidak berat di HP */
@media (max-width: 600px) {
  .cloud-layer-1 {
    height: 40%;
  }
  .cloud-layer-2 {
    height: 50%;
  }
  .cloud-layer-3 {
    height: 30%;
  }
}
