/*Override*/
:root {
    --bg-color: #121212;
    --primary-color: #1e1e1e;
    --secondary-color: #2a2a2a;
    --accent-color: #05d7e5;
    --text-color: #e0e0e0;
    --header-color: #ffffff;
    --border-color: #333333;
    --table-header-bg: #2a2a2a;
    --table-row-hover: #252525;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: #fff;
}

.main-wrapper {
    max-width: 1000px; /* Adjust this value to your liking */
    margin: 0 auto;
}

.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 2000;
    transition: opacity 0.5s ease-in-out;
}
.start-screen h1 { font-size: 3rem; line-height: 0; }
.start-screen p { font-size: 1.2rem; margin-bottom: 20px; }
.start-btn {
    padding: 15px 30px; font-size: 1.5rem; border: 2px solid #fff; background-color: transparent;
    color: #fff; cursor: pointer; border-radius: 50px; transition: background-color 0.3s, color 0.3s;
}
.start-btn:hover { background-color: #fff; color: #1a1a1a; }
.hidden { display: none; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

/* Main Content Layout */
.main-header {
    background-color: var(--bg-color);
    padding: 40px 20px 15px;
    text-align: center;
    margin-top: 30px;
    animation: fadeRight 1.5s ease-out forwards;
}
.header-title { font-size: 2.5rem; margin: 0; line-height: 0.8; }
.header-subtitle { font-size: 1.2rem; color: #fff; padding-left: 20px; }

.logo-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}


.header-image-container {
    position: relative;
    width: 100%;
    height: 400px; /* Adjust height as needed */
    overflow: hidden;
    border-radius: 20px;
    animation: fadeLeft 1.5s ease-out forwards;
}

.header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.1s ease-in-out;
}

/* Add this new class to the image when it's loading a new source */
.header-image.is-loading {
    opacity: 0;
}

.nav-container {
    display: flex;
    justify-content: center;
    transform: translateY(-50%); /* Overlap */
    position: relative;
    z-index: 10; /* Ensure navigation is on top of the image */
    max-width: 900px;
    margin: 0 auto;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px; /* Square shape */
    height: 80px; /* Square shape */
    border: none;
    background-color: #fff;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    margin: 0 10px;
}

.nav-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.nav-btn.active {
    background-color: var(--accent-color);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.nav-btn i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.nav-btn span {
    font-size: 0.8rem;
    font-weight: bold;
}

.content-wrapper {
    max-width: 900px;
    margin: -60px auto 20px; /* Adjust margin to pull content up */
    padding: 20px;
    animation: fadeUp 1.5s ease-out forwards;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    padding: 20px;
    background-color: var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 30px;
    text-align: justify;
}

.content-section.visible {
    display: block;
}

.footer-hidden {
    display: none;
    opacity: 0;
}

footer a { text-decoration: none; font-weight: 900; color: #fff;}

footer {
    background-color: var(--primary-color);
    padding: 1.5rem;
    text-align: left;
    position: relative;
    line-height: 0.5;
    font-size: 0.6rem;
    transition: opacity 1s ease-in-out, display 1s; /* Add a fade-in transition */
}

/* WebDev Content Section */

.code-editor-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.code-panel,
.preview-panel {
    flex: 1; /* Makes both panels take up equal width */
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
}

#code-input {
    width: 100%;
    height: 300px;
    resize: vertical;
    padding: 10px;
    font-family: monospace;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.run-btn {
    padding: 10px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    align-self: flex-start;
}

.code-editor-container {
    color: #121212;
    border: 1px solid #ddd;
    height: 100%;
    padding: 10px;
    overflow-y: auto;
}

#terminal-wrapper {
    width: 100%;         /* or any fixed / max width you prefer */
}

#terminal {
    background: #000;
    color: #0f0;
    padding: 10px;
    height: 200px;
    overflow-y: auto;
    font-family: monospace;
    border-radius: 4px;
}

#cmdInput {
    width: 100%;        
    box-sizing: border-box;
    margin-top: 5px;
    padding: 5px;
    font-family: monospace;
    font-size: 1em;
    border-radius: 4px;
    border: 1px solid #333;
}


/* GameDev */

#gameCanvas {
    display: block;
    margin: 10px auto;
    background: #f0f0f0;
    border: 2px solid #333;
    max-width: 100%;
    height: auto;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.game-controls button, #jumpBtn {
    padding: 10px;
}

/* IoT */
#iot-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 20px;
  position: relative;
}

.iot-board {
  position: relative;
  display: inline-block;
}

.board-box {
  width: 220px;
  height: 120px;
  border: 2px solid #444;
  border-radius: 10px;
  background: #222;
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.led {
  position: absolute;
  top: 50%;
  right: -60px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: gray;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  transition: background 0.3s, box-shadow 0.3s;
  z-index: 2;
}

.iot-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  position: relative;
  width: 100%;
}

.iot-btn {
  padding: 10px 15px;
  border: none;
  background: #444;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  position: relative;
}

.iot-btn:hover {
  background: #666;
}

/* Wires from buttons upward */
.iot-btn::after {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  width: 2px;
  height: 30px;
  background: #888;
  transform: translateX(-50%);
}

/* Wire from board to LED */
.iot-board::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -30px;
  width: 30px;
  height: 2px;
  background: #888;
  z-index: 1;
}

.CTA {
    padding: 15px;
    border-style: none;
    border-radius: 10px;
    font-weight: 600;
}

.card-container button {
    padding: 15px;
    border-style: none;
    border-radius: 10px;
    font-weight: 600;
}

.card-container button:hover, .CTA:hover {
    background-color: #05d7e5;
    color: white;
}

.social-links {
    display: flex;
    justify-content: left;
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.social-icon {
    color: white;
    font-size: 20px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.social-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Tambahkan kode ini ke file style.css Anda */

/* Style umum untuk kedua tombol */
.community-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    gap: 10px; /* Jarak antara ikon dan teks */
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.community-btn:hover {
    transform: scale(1.05); /* Sedikit membesar saat disentuh mouse */
}

/* Warna khusus untuk tombol WhatsApp */
.whatsapp-btn {
    background-color: #25D366; /* Warna hijau khas WhatsApp */
}

.whatsapp-btn:hover {
    background-color: #1DA851; /* Warna hijau sedikit lebih gelap */
}

/* Warna khusus untuk tombol Discord */
.discord-btn {
    background-color: #5865F2; /* Warna "Blurple" khas Discord */
}

.discord-btn:hover {
    background-color: #4752C4; /* Warna "Blurple" sedikit lebih gelap */
}
/* Anda bisa mengabaikan bagian ini jika sudah ada di CSS Anda */
.join-community-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #444;
    text-align: center;
}

/* KODE PENTING UNTUK MENENGELAHKAN TOMBOL */
.social-links {
    display: flex;
    justify-content: center; /* Ini yang membuat tombol ke tengah */
    gap: 20px; /* Jarak antar tombol */
    margin-top: 15px;
}

/* Style umum untuk kedua tombol */
.community-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    gap: 10px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.community-btn:hover {
    transform: scale(1.05);
}

/* Warna khusus untuk tombol WhatsApp */
.whatsapp-btn {
    background-color: #25D366;
}

.whatsapp-btn:hover {
    background-color: #1DA851;
}

/* Warna khusus untuk tombol Discord */
.discord-btn {
    background-color: #5865F2;
}

.discord-btn:hover {
    background-color: #4752C4;
}
/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap; /* Allows buttons to wrap to the next line */
        justify-content: center; /* Centers the buttons */
        transform: translateY(-50%); /* Reintroduces the overlap effect */
        margin-top: 0;
        padding: 0 10px;
        position: relative;
        z-index: 10;
    }
    .nav-btn {
        width: 50px;
        height: 50px;
        margin: 5px;
    }
    .img-btn {
        width: 20px;
        height: 20px;
    }
    .nav-btn span {
        font-size: 0.4rem;
    }
    .nav-btn i {
        font-size: 1rem;
    }
    .content-wrapper {
        margin-top: -60px; /* Adjust margin to pull content up */
    }
    .main-header {
        padding-top: 20px;
    }
    .header-title { font-size: 1rem; margin: 0; line-height: inherit; }
    .header-subtitle { font-size: 0.8rem; color: #666; }
    .start-screen h1 { font-size: 2rem; line-height: 0; } .start-screen p { font-size: 0.8rem;} .start-btn { font-size: 1rem;}

    .code-editor-container {
    flex-direction: column; /* Stacks the panels vertically on mobile */
    }

    .code-panel,
    .preview-panel {
    width: 85%; /* Makes each panel take up the full width */
    }

    .game-controls {
        flex-direction: column;
    }

    .board-box {
    width: 160px;
    height: 90px;
    font-size: 0.9rem;
    }
    .led {
        width: 20px;
        height: 20px;
        right: -40px;
    }
    .iot-btn {
        padding: 8px 12px;
    }

    /*More mobile fix kkw*/
    h2 { font-size: 17px; }
    p { font-size: 12px; }
    .header-image-container { height: 60%; }
    .logo-title img { width: 40px; height: 40px; }
}

