/* ========== PART 1: RESET & GLOBAL STYLES ========== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: url('../assets/img/ui/farm_bg.png') no-repeat center center fixed;
  background-size: cover;
  font-family: 'Press Start 2P', cursive;
  color: #fff;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
}

button {
  background: #4caf50;
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 8px;
  transition: all 0.3s;
}

button:hover {
  background: #66bb6a;
}

input[type="range"],
input[type="number"] {
  border-radius: 6px;
  border: 2px solid #fff;
  padding: 6px;
  font-size: 12px;
  background-color: transparent;
  color: #fff;
}

/* ========== PART 2: GAME HEADER: JUDUL, TAB, WALLET ========== */

#game-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  z-index: 1000;
  padding: 10px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

#game-title {
  font-size: 24px;
  color: #66ff00;
  margin-bottom: 0px;
  text-shadow: 0 0 10px #66ff00, 0 0 20px #ffeb3b, 0 0 30px #f44336;
  animation: pulse 2s infinite ease-in-out;
  margin: 0 0 20px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  margin-bottom: 8px;
}

.tab-btn {
  background: #333;
  color: #fff;
  border: 2px solid #fff;
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 8px;
}

.tab-btn.active {
  background: #4caf50;
  border-color: #ffeb3b;
}

#wallet {
  margin: 5px auto 0;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 8px;
  width: fit-content;
}

#level {
  margin-top: 4px;
  font-size: 11px;
}

#xp-bar {
  width: 160px;
  height: 8px;
  background: #222;
  border: 2px solid #fff;
  border-radius: 5px;
  margin: 6px auto;
  overflow: hidden;
}

#xp-fill {
  width: 0%;
  height: 100%;
  background: #4caf50;
  transition: width 0.3s;
}

/* ========== PART 3: GAME SCREEN & TAB KONTEN ========== */

#game-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 220px;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

#game-screen.fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

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

.tab-content {
  display: none;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 15px;
  box-sizing: border-box;
}

.tab-content.active {
  display: block;
}

/* ========== PART 4: TOMBOL, MODAL & NOTIFIKASI ========== */

.corner-buttons {
  position: fixed;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 10px;
  z-index: 1001;
}

#lang-toggle, #settings-btn, #game-lang-toggle, #game-settings-btn, #exit-game-btn {
  background: #333;
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.3s;
}

#lang-toggle:hover, #settings-btn:hover, #game-lang-toggle:hover,
#game-settings-btn:hover, #exit-game-btn:hover {
  background: #555;
  border-color: #ffeb3b;
}

button {
  background: #4caf50;
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 8px;
  transition: all 0.3s;
}

button:hover {
  background: #66bb6a;
}

#notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border: 2px solid #fff;
  border-radius: 8px;
  display: none;
  font-size: 14px;
  min-width: 200px;
  text-align: center;
  z-index: 1000;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: #333;
  margin: 20% auto;
  padding: 20px;
  border: 2px solid #fff;
  border-radius: 10px;
  width: 300px;
  color: #fff;
}

.close {
  color: #fff;
  float: right;
  font-size: 28px;
  cursor: pointer;
}

.close:hover {
  color: #ffeb3b;
}

#settings-modal button {
  margin-top: 10px;
  display: block;
  width: 100%;
}

label {
  display: block;
  margin: 10px 0 5px;
  font-size: 14px;
}

input[type="range"] {
  width: 100%;
}

/* ========== PART 5: WALLET, XP BAR & DAILY REWARD ========== */

#wallet {
  margin: 10px auto;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px;
  border-radius: 8px;
  width: fit-content;
  max-width: 90%;
}

#level {
  margin-top: 5px;
  font-size: 12px;
}

#xp-bar {
  width: 150px;
  height: 8px;
  background: #333;
  border: 2px solid #fff;
  border-radius: 5px;
  margin: 5px auto;
  overflow: hidden;
}

#xp-fill {
  width: 0%;
  height: 100%;
  background: #4caf50;
  transition: width 0.3s;
}

#claim-reward-btn {
  background: #4caf50;
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 8px;
  margin-top: 20px;
}

#claim-reward-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

#claim-reward-btn.claimed {
  background: #888;
  opacity: 0.6;
}

/* ========== PART 6: SHOP, INVENTORY, SELL SECTION ========== */

#shop-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 15px;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  box-sizing: border-box;
}

.shop-item, .inventory-item, .sell-item {
  background: #333;
  border: 2px solid #fff;
  border-radius: 10px;
  padding: 10px;
  width: calc(33.33% - 20px);
  min-width: 120px;
  max-width: 160px;
  text-align: center;
}

.shop-item-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.shop-item h3, .inventory-item h3, .sell-item h3 {
  font-size: 12px;
  margin: 8px 0;
}

.shop-item p, .inventory-item p, .sell-item p {
  font-size: 10px;
  margin: 5px 0;
}

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

.shop-tab-btn {
  padding: 8px 16px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background-color: #ccc;
  cursor: pointer;
}

.shop-tab-btn.active {
  background-color: #4CAF50;
  color: #fff;
}

.sell-to-shop-btn {
  margin-top: 16px;
  padding: 10px 20px;
  font-weight: bold;
  background-color: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  transition: background 0.3s;
}

.sell-to-shop-btn:hover {
  background-color: #45a049;
}

#sell-section {
  margin-top: 15px;
  padding: 15px;
  background: #444;
  border-radius: 10px;
}

#inventory-content, #sell-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 0 15px 15px 15px;
  width: 100%;
  max-width: 700px;
  margin: 0px auto;
  box-sizing: border-box;
}

/* Responsif untuk layar kecil */
@media (max-width: 480px) {
  .shop-item, .inventory-item, .sell-item {
    width: calc(50% - 15px);
  }
}

/* ========== PART 7: FARM AREA & PLOT STYLE ========== */

#farm-area {
  display: grid;
  grid-template-columns: repeat(2, 160px);
  grid-template-rows: repeat(2, 16px);
  row-gap: 60px;
  column-gap: 60px;
  justify-content: center;
  align-content: space-around;
  background: #8b4513;
  padding: 100px 30px 30px 30px;
  border-radius: 10px;
  width: 100%;
  max-width: 410px;
  height: 410px;
  margin: 0 auto;
}

.plot {
  background: #654321;
  border: 2px solid #946038;
  border-radius: 140% / 140%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.1s;
  position: relative;
  width: 160px;
  height: 16px;
}

.plot-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50px;
  position: absolute;
  top: -46px;
}

.plant-img {
  width: 160px;
  height: auto;
  max-height: 160px;
  object-fit: contain;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.5s ease-in-out;
}

.plant-img.loaded {
  opacity: 1;
}

.countdown-bar {
  position: absolute;
  top: 12px;
  width: 100px;
  height: 8px;
  background: #333;
  border-radius: 3px;
  overflow: hidden;
  z-index: 4;
}

.countdown-fill {
  width: 0%;
  height: 100%;
  background: #0ff;
  box-shadow: 0 0 10px #0ff;
  transition: width 0.1s linear;
}

.plot-status {
  font-size: 10px;
  color: #ffeb3b;
  position: absolute;
  top: 24px;
  text-align: center;
  line-height: 1.2;
  width: 100%;
}

/* ========== PART 8: REWARD BUTTON, MODAL, DAN SETTING VOLUME ========== */

#claim-reward-btn {
  background: #4caf50;
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 8px;
  margin-top: 20px;
}

#claim-reward-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

#claim-reward-btn.claimed {
  background: #888;
  opacity: 0.6;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: #333;
  margin: 20% auto;
  padding: 20px;
  border: 2px solid #fff;
  border-radius: 10px;
  width: 300px;
  color: #fff;
}

.close {
  color: #fff;
  float: right;
  font-size: 28px;
  cursor: pointer;
}

.close:hover {
  color: #ffeb3b;
}

label {
  display: block;
  margin: 10px 0 5px;
  font-size: 14px;
}

input[type="range"] {
  width: 100%;
}

#settings-modal button {
  margin-top: 10px;
  display: block;
  width: 100%;
}

/* ========== PART 9: NOTIFIKASI & TRANSAKSI ========== */

#notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border: 2px solid #fff;
  border-radius: 8px;
  display: none;
  font-size: 14px;
  min-width: 200px;
  text-align: center;
  z-index: 1000;
}

.transaction-animation {
  position: absolute;
  font-size: 14px;
  font-weight: bold;
  animation: floatUp 1s ease-out forwards;
}

.transaction-animation.positive {
  color: #4caf50;
}

.transaction-animation.negative {
  color: #f44336;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-50px); }
}

/* ========== PART 10: ANIMASI FLY (PANEN & AIR) ========== */

.plant-fly {
  position: absolute;
  animation: fly-up 0.8s ease-out forwards;
  z-index: 10;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
}

.water-fly {
  position: absolute;
  animation: fly-down 0.8s ease-out forwards;
  z-index: 10;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
}

.amount-text {
  position: absolute;
  font-size: 12px;
  font-weight: bold;
  z-index: 11;
  animation: fly-up 0.8s ease-out forwards;
  left: 70%;
  transform: translateX(-50%);
  bottom: 0;
}

.amount-text.negative {
  color: #f44336;
}

.amount-text.positive {
  color: #4caf50;
}

@keyframes fly-up {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-50px);
    opacity: 0;
  }
}

@keyframes fly-down {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(50px);
    opacity: 0;
  }
}

/* ========== PART 11: MODAL, LOADING & LOGIN SCREEN ========== */

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: #333;
  margin: 20% auto;
  padding: 20px;
  border: 2px solid #fff;
  border-radius: 10px;
  width: 300px;
  color: #fff;
}

.close {
  color: #fff;
  float: right;
  font-size: 28px;
  cursor: pointer;
}

.close:hover {
  color: #ffeb3b;
}

/* Loading Screen */
#loading-screen {
  display: none !important;
}

#loading-screen.active {
  opacity: 1;
}

#loading-screen:not(.active) {
  opacity: 0;
  pointer-events: none;
}

#loading-screen h1 {
  font-size: 36px;
  color: #ffeb3b;
  text-shadow: 0 0 10px #ffeb3b, 0 0 20px #f44336, 0 0 30px #f44336;
  margin-bottom: 20px;
}

.spinner {
  border: 4px solid #333;
  border-top: 4px solid #66ff00;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-animation {
  font-size: 24px;
  color: #fff;
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0% { content: 'Loading'; }
  33% { content: 'Loading.'; }
  66% { content: 'Loading..'; }
  100% { content: 'Loading...'; }
}

/* Login Screen */
#login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2001;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

#login-screen.active {
  opacity: 1;
}

.login-container {
  background: #333;
  padding: 20px;
  border: 2px solid #fff;
  border-radius: 10px;
  text-align: center;
  color: #fff;
}

.login-container h1 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #66ff00;
  text-shadow: 0 0 10px #66ff00;
}

/* Register Screen */
#register-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2001;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#register-screen.active {
    opacity: 1;
}

/* Link Styling (No Underline) */
.policy-links a {
    color: #ffeb3b;
    text-decoration: none; /* Hapus garis bawah */
}

.policy-links a:hover {
    text-decoration: underline; /* Tambah underline saat hover aja */
}

/* Styling untuk form login dan register */
.login-form, .register-form {
  margin: 15px 0;
}

.login-form input, .register-form input {
  display: block;
  width: 200px;
  margin: 10px auto;
  padding: 8px;
  background: #444;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 6px;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  opacity: 1 !important; /* Pastiin ga ikut opacity parent */
}

#register-username-input {
  display: block;
  width: 200px;
  margin: 10px auto;
  padding: 8px;
  background: #444;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 6px;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  opacity: 1 !important; /* Pastiin ga ikut opacity parent */
}

.login-form button, .register-form button {
    margin-top: 10px;
    background: #66ff00; /* Warna hijau terang biar kontras */
    color: #000; /* Teks hitam biar jelas */
    padding: 8px 16px;
    border: 2px solid #fff;
    border-radius: 6px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    cursor: pointer;
    opacity: 1 !important; /* Pastiin ga ikut opacity parent */
    transition: background 0.3s ease;
}

.login-form button:hover, .register-form button:hover {
    background: #55cc00; /* Warna lebih gelap saat hover */
}

.login-form #login-error, .login-form #verify-status,
.register-form #register-error {
  font-size: 10px;
  margin-top: 8px;
  opacity: 1 !important; /* Pastiin ga ikut opacity parent */
}

.policy-links {
  margin-top: 15px;
  font-size: 12px;
}

.policy-links a {
  color: #ffeb3b;
  text-decoration: none;
}

.policy-links a:hover {
  text-decoration: underline;
}

/* ========== PART 12: RESPONSIVE (MAX WIDTH 600px) ========== */
@media (max-width: 600px) {
  h1 {
    font-size: 24px;
  }

  .start-text {
    font-size: 20px;
  }

  #wallet {
    font-size: 12px;
    padding: 8px;
  }

  #level {
    font-size: 10px;
  }

  #xp-bar {
    width: 120px;
    height: 6px;
  }

  .tabs {
    gap: 5px;
  }

  .tab-btn {
    padding: 6px 12px;
    font-size: 10px;
  }

  .shop-item, .inventory-item, .sell-item {
    width: 100px;
    padding: 8px;
  }

  .shop-item-img {
    width: 50px;
    height: 50px;
  }

  .shop-item h3, .inventory-item h3, .sell-item h3 {
    font-size: 10px;
  }

  .shop-item p, .inventory-item p, .sell-item p {
    font-size: 9px;
  }

  button {
    padding: 6px 10px;
    font-size: 10px;
  }

  #exchange-amount {
    width: 120px;
  }

  .achievement {
    width: 200px;
  }

  #notification {
    font-size: 12px;
    min-width: 150px;
  }
}

@media (max-width: 480px) {
  #farm-area {
    grid-template-columns: repeat(2, 170px);
    grid-template-rows: repeat(2, 17px);
    row-gap: 40px;
    column-gap: 40px;
    justify-content: center !important;
    align-content: space-around;
    padding: 80px 20px 20px 80px;
    width: 100%;
    max-width: 450px;
    height: 450px;
    margin: 0 auto;
  }

  .plot {
    width: 100px;
    height: 10px;
  }

  .plot-content {
    height: 30px;
    top: -26px;
  }

  .plant-img {
    width: 100px;
    max-height: 100px;
  }

  .countdown-bar {
    top: 8px;
    width: 60px;
    height: 5px;
  }

  .plot-status {
    font-size: 6px;
    top: 16px;
  }

  #claim-reward-btn {
    margin-top: 10px;
  }

  .modal-content {
    margin: 30% auto;
  }

  #loading-screen h1 {
    font-size: 20px;
  }

  .loading-animation {
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  #farm-area {
    grid-template-columns: repeat(2, 130px);
    grid-template-rows: repeat(2, 13px);
    row-gap: 30px;
    column-gap: 30px;
    justify-content: center !important;
    align-content: space-around;
    padding: 70px 15px 15px 70px;
    width: 100%;
    max-width: 330px;
    height: 330px;
    margin: 0 auto;
  }

  .plot {
    width: 80px;
    height: 8px;
  }

  .plot-content {
    height: 30px;
    top: -26px;
  }

  .plant-img {
    width: 80px;
    max-height: 80px;
  }

  .countdown-bar {
    top: 8px;
    width: 50px;
    height: 5px;
  }

  .plot-status {
    font-size: 6px;
    top: 16px;
  }

  #claim-reward-btn {
    margin-top: 10px;
  }

  .modal-content {
    margin: 35% auto;
  }

  #loading-screen h1 {
    font-size: 18px;
  }

  .loading-animation {
    font-size: 14px;
  }
}

/* ========== PART 13: START SCREEN ========== */
.start-text {
  font-size: 20px;
  color: #ffeb3b;
  text-shadow: 0 0 10px #ffeb3b, 0 0 20px #f44336, 0 0 30px #f44336;
  animation: blink 1s infinite;
  cursor: pointer;
  margin-top: 15px;
  padding: 15px;
  user-select: none;
}

.start-text:hover {
  background: #66bb6a;
  transform: scale(1.05);
}

.start-text:active {
  transform: scale(0.95);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

#start-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: rgba(0,0,0,0.0);
  text-align: center;
}

#start-screen h1#title {
  font-size: 38px;
  color: #66ff00;
  text-shadow: 0 0 10px #66ff00, 0 0 20px #ffeb3b, 0 0 30px #f44336;
  animation: pulse 2s infinite ease-in-out;
  margin: 0 0 20px;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

/* ========== PART 14: FINANCE ========== */
#finance {
  background: #333;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  max-width: 330px;
  margin: 15px auto;
}

#finance h2#finance-title {
  font-size: 18px;
  color: #66ff00;
  text-shadow: 0 0 5px #66ff00;
  margin-bottom: 15px;
}

#finance p {
  font-size: 12px;
  margin: 8px 0;
}

#finance p span#farm-coin-balance,
#finance p span#pi-coin-balance,
#finance p span#referral-earnings {
  color: #66ff00;
  font-weight: bold;
}

#finance p span#referral-link {
  color: #ffeb3b;
  font-weight: bold;
  word-break: break-all;
}

#finance h3 {
  font-size: 14px;
  color: #ffeb3b;
  margin: 15px 0 10px;
}

#finance hr {
  border: 1px solid #fff;
  margin: 15px 0;
}

#finance input[type="number"]#deposit-amount {
  width: 150px;
  margin: 10px 0;
  padding: 8px;
  background: #444;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 6px;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
}

#finance button#real-deposit-btn {
  background: #4caf50;
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s;
}

#finance button#real-deposit-btn:hover {
  background: #66bb6a;
}

#finance button#real-deposit-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

#finance button#withdraw-btn {
  background: #f44336;
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s;
}

#finance button#withdraw-btn:hover {
  background: #ef5350;
}

#finance button#withdraw-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

#finance .deposit-message {
  font-size: 10px;
  color: #ffeb3b;
  margin-top: 10px;
}

#finance p#withdraw-note {
  font-size: 10px;
  color: #f44336;
  margin-top: 10px;
  line-height: 1.4;
}

/* ========== PART 15: EXCHANGE CENTER ========== */
.exchange-container {
  background: #333;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  max-width: 330px;
  margin: auto;
}

.exchange-title {
  font-size: 18px;
  color: #66ff00;
  text-shadow: 0 0 5px #66ff00;
  margin-bottom: 15px;
}

.exchange-rate {
  font-weight: bold;
  font-size: 14px;
  color: #ffeb3b;
  margin-bottom: 10px;
}

.exchange-output {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  overflow: hidden;
  text-align: center;
}

.exchange-result {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffeb3b;
  font-weight: bold;
  font-size: 14px;
}

.exchange-section input, .exchange-section select {
  width: 150px;
  margin: 10px 0;
  padding: 8px;
  background: #444;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 6px;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
}

#exchange-btn {
  background: #4caf50;
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s;
}

#exchange-loading {
  display: none;
  text-align: center;
  margin-top: 10px;
  font-weight: bold;
  color: #555;
}

.loader {
  margin: 10px auto;
  width: 40px;
  height: 40px;
  border: 5px solid #ccc;
  border-top: 5px solid #2ecc71;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== PART 16: GENERAL STYLES ========== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-buttons {
  margin: 10px 0;
}

.tab-button {
  padding: 10px 20px;
  margin-right: 5px;
  cursor: pointer;
}

.tab-content {
  display: none;
  padding: 20px;
}

.tab-content.active {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

th {
  background-color: #f2f2f2;
}

/* ========== PART 17: POP UP STYLE ========== */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.popup-content {
  background: white;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: #333;
  font-size: 10px;
  line-height: 1.2;
}

.popup-content h3 {
  margin-top: 0;
  color: #333;
  font-size: 12px;
}

.popup-content p {
  margin: 8px 0;
  font-size: 10px;
}

.popup-content span {
  color: #000;
  font-size: 10px;
}

/* Neon Effect untuk Judul */
.neon-title {
  color: #00ff00;
  text-shadow: 
    0 0 5px #00ff00,
    0 0 10px #00ff00,
    0 0 20px #00ff00;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
}

.text-limit {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

/* Styling tombol sesuai tema game */
.game-button {
  background: #00ff00;
  border: 2px solid #ffff00;
  color: #000;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  margin: 5px;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
}

.game-button:hover {
  background: #00cc00;
}

/* Styling tombol copy */
.copy-button {
  background: #00ff00;
  border: 2px solid #ffff00;
  color: #000;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  margin-left: 5px;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
}

.copy-button:hover {
  background: #00cc00;
}

/* Tambahan untuk loading screen biar gak konflik */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 5000;
}

/* Universal screen control */
.screen {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.screen.active {
  display: flex;
  opacity: 1;
}

.hidden {
  display: none !important;
  opacity: 0;
  transition: opacity 0.3s ease;
}
