/* =============================================================
   GLOBAL STYLING
============================================================= */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, Arial, sans-serif;
}

body {
  background: #0d0d0d;
  color: #ffffff;
}

/* =============================
   ANIMATIONS
============================= */
.fade-in {
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   AUTH PAGE
============================================================= */
.login-wrapper {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: radial-gradient(circle at top, #1a1a1a, #000);
}

.login-box {
  width: 380px;
  background: #161616;
  padding: 35px;
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(255, 106, 0, 0.18);
}

.login-box h2 {
  color: #ff6a00;
  margin-bottom: 25px;
  text-align: center;
  font-size: 26px;
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  font-size: 14px;
  color: #c9c9c9;
  margin-bottom: 6px;
  display: block;
}

.input-group input {
  width: 100%;
  padding: 13px;
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
}

.input-group input:focus {
  border-color: #ff6a00;
}

/* BUTTON */
.btn {
  padding: 13px;
  width: 100%;
  background: linear-gradient(90deg, #ff6a00, #ff8533);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

/* ALERTS */
.alert {
  padding: 12px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 14px;
  display: none;
}

.alert-error {
  background: rgba(255, 71, 71, 0.15);
  border: 1px solid #ff4747;
  color: #ff8989;
}

.alert-success {
  background: rgba(0, 255, 120, 0.18);
  border: 1px solid #00ff88;
  color: #7affb2;
}

/* =============================================================
   DASHBOARD LAYOUT
============================================================= */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: #111;
  padding: 30px 20px;
  border-right: 1px solid #1d1d1d;
  position: fixed;
  height: 100%;
  top: 0;
  left: 0;
}

.sidebar h3 {
  color: #ff6a00;
  font-size: 22px;
  margin-bottom: 30px;
}

.menu-item {
  padding: 12px 15px;
  margin-bottom: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  color: #e6e6e6;
}

.menu-item.active,
.menu-item:hover {
  background: #ff6a00;
  color: #fff;
}

.content {
  margin-left: 250px;
  width: calc(100% - 250px);
  padding: 35px;
}

/* =============================================================
   CARDS
============================================================= */
.card {
  background: #161616;
  padding: 25px;
  border-radius: 14px;
  margin-bottom: 28px;
  box-shadow: 0 0 20px rgba(255, 106, 0, 0.10);
}

.card h2 {
  color: #ff6a00;
  font-size: 22px;
  margin-bottom: 20px;
}

/* =============================================================
   TOKEN BUTTONS
============================================================= */
.token-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.token-btn {
  background: #1e1e1e;
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  color: white;
  border: 1px solid #333;
  cursor: pointer;
  font-size: 14px;
}

.token-btn:hover {
  border-color: #ff6a00;
  color: #ff6a00;
}

/* =============================================================
   TABLE
============================================================= */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px;
  border-bottom: 1px solid #2a2a2a;
}

.table th {
  color: #ff6a00;
}

/* =============================================================
   MODALS
============================================================= */
.modal-bg {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,0.75);
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 20;
}

.modal-box {
  background: #1b1b1b;
  padding: 28px;
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
}

.modal-box input {
  width: 100%;
  padding: 13px;
  background: #222;
  border-radius: 10px;
  border: 1px solid #333;
  color: #fff;
  margin-bottom: 15px;
}

/* SUCCESS MODAL */
#successHash {
  word-break: break-all;
  background: #222;
  padding: 10px;
  border-radius: 10px;
  color: #ff6a00;
  font-size: 13px;
}

/* =============================================================
   SPINNER
============================================================= */
.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid #333;
  border-top-color: #ff6a00;
  animation: spin 0.8s linear infinite;
  margin: auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =============================================================
   RESPONSIVE FIX — FULL MOBILE UI
============================================================= */
@media (max-width: 900px) {

  .dashboard {
    flex-direction: column !important;
  }

  .sidebar {
    width: 100%;
    position: relative;
    height: auto;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 18px;
  }

  .content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 20px !important;
  }
}

/* ============================================================
   FIX SAFARI AUTO-ZOOM ON INPUT
============================================================ */
@media screen and (max-width: 600px) {
  input,
  #move_wallet,
  #move_amount,
  #bal_wallet {
    font-size: 16px !important;
  }
}

/* =============================================================
   MOBILE HAMBURGER MENU
============================================================= */
.hamburger {
  display: none;
  position: fixed;
  top: 18px;
  left: 18px;
  width: 34px;
  height: 26px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 9999;
}

.hamburger span {
  display: block;
  height: 4px;
  background: #ff6a00;
  border-radius: 5px;
}

.sidebar.mobile-open {
  transform: translateX(0);
}

@media (max-width: 900px) {

  .hamburger {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 260px;
    transform: translateX(-100%);
    transition: 0.3s ease;
    flex-direction: column;
    overflow-y: auto;
    padding-top: 80px;
  }

  .content {
    margin-left: 0 !important;
    width: 100% !important;
    padding-top: 80px !important;
  }

}

/* =============================================================
   DASHBOARD INPUTS (Fix missing styling)
============================================================= */
#bal_wallet,
#move_wallet,
#move_amount {
  width: 100%;
  max-width: 380px;
  padding: 13px;
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  margin-bottom: 14px;
  transition: 0.25s ease;
}

#bal_wallet:focus,
#move_wallet:focus,
#move_amount:focus {
  border-color: #ff6a00;
  outline: none;
}

/* =============================================================
   TABLE MOBILE FIX + TX BUTTON
============================================================= */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

#historyTable td,
#historyTable th {
  word-wrap: break-word;
  white-space: normal;
}

.tx-btn {
  display: inline-block;
  padding: 6px 10px;
  background: #ff6a00;
  color: #fff;
  border-radius: 7px;
  font-size: 12px;
  text-decoration: none;
}

.tx-btn:hover {
  background: #ff8533;
}

@media (max-width: 600px) {
  #historyTable td:nth-child(1),
  #historyTable td:nth-child(4) {
    max-width: 120px;
    word-break: break-all;
  }

  #historyTable td,
  #historyTable th {
    font-size: 13px;
    padding: 10px;
  }
}
