/* === 1. RESPONSIVE WRAPPER & TYPOGRAPHY === */
.app {
  max-width: 1200px;    /* batas lebar di desktop */
  margin: 0 auto;       /* center */
  padding: 0 1rem;      /* spasi kiri–kanan pada mobile */
}

body {
  font-size: 16px;      /* basis font */
  line-height: 1.5;     /* jarak antar baris */
}

/* === 2. BOX-SIZING GLOBAL === */
*, *::before, *::after {
  box-sizing: border-box;
}

/* === 3. CANVAS & OVERLAY FULL WIDTH/HEIGHT === */
#matrix-canvas,
.background-overlay {
  width: 100%;
  height: 100%;
}

/* === 4. FORM & BUTTON LEGIBILITY === */
input, button, select, textarea {
  font-size: 1rem;
  padding: 0.5rem;
}



/* Import Font Monospaced */
@import url('https://fonts.googleapis.com/css2?family=Cutive+Mono&display=swap');

:root {
    --primary-color: #00FF41;
    --background-color: #000000;
    --container-bg: rgba(10, 25, 47, 0.85);
    --border-color: rgba(0, 255, 65, 0.4);
}

body {
    font-family: 'Cutive Mono', monospace;
    background-color: var(--background-color);
    color: var(--primary-color);
    margin: 0;
    padding: 0;
    text-align: center;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    z-index: -2;
}
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: -1;
}

#main-app,
#boot-screen {
    display: none;
}

.screen {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.login-box {
    width: 90%;
    max-width: 450px;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 30px 40px;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.15);
    backdrop-filter: blur(5px);
    text-align: left;
}
.login-box h1 {
    font-size: 1.5em;
    text-align: center;
    margin-bottom: 20px;
}
.login-box p {
    text-align: center;
    color: #aaa;
    margin-bottom: 30px;
}
.input-group {
    margin-bottom: 20px;
}
.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 1em;
}
.input-group input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    padding: 10px;
    font-family: 'Cutive Mono', monospace;
    font-size: 1.1em;
}
.input-group input:focus {
    outline: none;
    box-shadow: 0 0 10px var(--primary-color);
}
.login-button {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    padding: 15px;
    font-family: 'Cutive Mono', monospace;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}
.login-button:hover {
    background-color: #fff;
    color: #000;
    box-shadow: 0 0 15px #fff;
}
.error-message {
    text-align: center;
    font-weight: bold;
    margin-top: 15px;
    height: 20px;
}

#boot-screen {
    background-color: #000;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 5%;
    box-sizing: border-box;
}
#boot-text {
    font-size: 1.2em;
    color: var(--primary-color);
    white-space: pre-wrap;
    text-align: left;
    width: 100%;
}

.content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* PERUBAHAN UTAMA */
.container {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 20px;
}

.header {
    padding: 20px;
    width: 100%;
    height: 60px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}
.logo {
    text-align: center;
}
.logo h1 {
    margin: 0;
    font-size: 1.8em;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.search-box {
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    margin-bottom: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
    backdrop-filter: blur(5px);
}
.search-box h2 {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
}
#search-button {
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    padding: 15px 30px;
    font-family: 'Cutive Mono', monospace;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
    box-shadow: 0 0 15px var(--primary-color);
    min-width: 250px;
}
#search-button:hover {
    background-color: #fff;
    color: #000;
    box-shadow: 0 0 25px #fff;
}
#search-button:disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

#console-log {
    width: 100%;
    min-height: 150px;
    background-color: var(--container-bg);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    padding: 20px;
    box-sizing: border-box;
    text-align: left;
    white-space: pre-wrap;
    display: none;
    font-size: 1em;
}

#console-log p {
    margin: 0 0 5px 0;
}
#console-log .success {
    color: #2ed573;
}

.game-result-container {
    display: none;
}
.game-result-container.visible {
    display: block;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-top: 0;
    animation: fadeIn 0.5s ease-in-out;
    backdrop-filter: blur(5px);
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.game-card img {
    max-width: 200px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}
.game-info h3 {
    margin: 0 0 15px 0;
    font-size: 1.8em;
    text-shadow: 0 0 5px var(--primary-color);
    min-height: auto;
}
#game-info-text {
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 450px;
    margin: 0 auto 20px auto;
    min-height: auto;
}
.register-button {
    display: inline-block;
    background: var(--primary-color);
    color: #000;
    padding: 12px 40px;
    text-decoration: none;
    font-size: 1.3em;
    font-weight: bold;
    transition: transform 0.2s;
    box-shadow: 0 0 15px var(--primary-color);
}
.register-button:hover {
    transform: scale(1.05);
    background: #fff;
    box-shadow: 0 0 25px #fff;
}

.footer {
    margin-top: 40px;
    padding-bottom: 40px;
    font-size: 0.9em;
    color: #888;
}

#logout-button {
    background: none;
    border: 1px solid #ff4757;
    color: #ff4757;
    padding: 10px 20px;
    font-family: 'Cutive Mono', monospace;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
}
#logout-button:hover {
    background: #ff4757;
    color: #000;
    box-shadow: 0 0 10px #ff4757;
}


/* === MEDIA QUERIES === */
/* Tablet & small desktop */
@media (max-width: 768px) {
  .app {
    padding: 0 0.75rem;
  }
  body {
    font-size: 15px;
  }
  .login-box, .search-box {
    padding: 20px;
    margin: 1rem auto;
  }
  .login-box h1 { font-size: 1.3em; }
  .logo h1 { font-size: 1.5em; }
  .search-box h2, .game-info h3 { font-size: 1.2em; }
  #game-info-text { font-size: 1em; }

  .login-button, #search-button, .register-button {
    font-size: 1.1em;
    padding: 12px 16px;
    min-width: auto;
  }
  #logout-button {
    font-size: 0.9em;
    padding: 6px 12px;
  }

  .game-result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .game-card {
    max-width: 90%;
  }
}

/* Mobile portrait */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  .app {
    padding: 0 0.5rem;
  }
  input, button {
    font-size: 0.95rem;
    padding: 0.4rem 0.6rem;
  }
}
/* === REMOVE RESULT BOX BACKGROUND & BORDER === */
.game-result-container.visible {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Optional: pastikan konten tetap ter-center */
.game-result-container.visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem auto; /* sesuaikan spasi vertikal */
}

/* Jika ingin jarak antara image, text, dan tombol: */
.game-card {
  gap: 1rem; /* spasi antar elemen */
  background: none; /* hilangkan background jika ada */
  padding: 0;        /* hilangkan padding */
}