/* =============================
   GLOBAL RESET
============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #0a0a0a, #1a0000 60%);
  color: #f0f0f0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* Links */
a {
  color: #f0f0f0;
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
a:hover {
  color: #fff;
  text-shadow: 0 0 6px rgba(255,0,0,0.9);
}

/* Headings */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
  transition: text-shadow 0.3s;
}
h1:hover, h2:hover, h3:hover, h4:hover {
  text-shadow: 0 0 10px rgba(255,0,0,0.9);
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 1.5rem;
}

/* =============================
   HEADER NAV
============================= */
.site-header {
  background: rgba(0,0,0,0.9);
  border-bottom: 2px solid rgba(255,0,0,0.4);
  padding: 0.6rem 1rem;
  box-shadow: 0 0 15px rgba(255,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(4px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
}

.logo a {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  transition: text-shadow 0.3s;
}
.logo a:hover {
  text-shadow: 0 0 8px rgba(255,0,0,0.8);
}

.logo-img {
  height: 36px;
  margin-right: 8px;
  vertical-align: middle;
  filter: drop-shadow(0 0 6px rgba(255,0,0,0.6));
}

.nav-links a {
  margin-left: 1rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.nav-links a:hover {
  background: rgba(255,0,0,0.2);
  text-shadow: 0 0 6px rgba(255,0,0,0.7);
}

.logout-btn {
  background: #ff4444;
  color: #fff !important;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  margin-left: 1rem;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(255,0,0,0.4);
  transition: all 0.2s ease;
}
.logout-btn:hover {
  background: #ff0000;
  box-shadow: 0 0 12px rgba(255,0,0,0.6);
}

@media(max-width:768px) {
  .nav-container { flex-direction: column; }
  .nav-links { margin-top: 0.5rem; }
  .nav-links a { display: inline-block; margin: 0.3rem; }
}

/* =============================
   BALANCE CARD
============================= */
.balance-card {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(26,26,26,0.85);
  border-radius: 12px;
  border: 1px solid rgba(255,0,0,0.4);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 0 20px rgba(255,0,0,0.25);
  backdrop-filter: blur(4px);
}

.balance-card div {
  text-align: center;
  flex: 1 1 200px;
}

.balance {
  font-size: 1.8rem;
  font-weight: bold;
  color: #ff4444;
  text-shadow: 0 0 6px rgba(255,0,0,0.6);
}

.balance-usd {
  display: block;
  font-size: 0.95rem;
  color: #ccc;
  margin-top: 0.3rem;
}

/* =============================
   BUTTONS
============================= */
.btn {
  display: inline-block;
  background: linear-gradient(90deg,#ff5555,#cc0000);
  color: #fff;
  font-weight: bold;
  padding: 0.6rem 1.3rem;
  margin: 0.3rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 8px rgba(255,0,0,0.4);
  position: relative;
  overflow: hidden;
}
.btn:hover {
  background: linear-gradient(90deg,#ff0000,#ff4444);
  box-shadow: 0 0 14px rgba(255,0,0,0.7);
  transform: translateY(-1px);
}
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: rgba(255,255,255,0.2);
  transform: skewX(-20deg);
}
.btn:hover::after {
  animation: shine 1s forwards;
}
@keyframes shine {
  0% { left: -75%; }
  100% { left: 125%; }
}

/* =============================
   CHART
============================= */
.chart-section { text-align: center; margin: 2rem 0; }
.chart-controls { margin-bottom: 1rem; }
.chart-controls button {
  background: #222;
  color: #fff;
  border: 1px solid #ff4444;
  border-radius: 4px;
  padding: 0.5rem 0.9rem;
  margin: 0.2rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.chart-controls button:hover {
  background: #ff4444;
  box-shadow: 0 0 8px rgba(255,0,0,0.5);
  transform: translateY(-1px);
}

/* =============================
   FORMS
============================= */
form {
  max-width: 420px;
  margin: 1.5rem auto;
  background: rgba(26,26,26,0.85);
  padding: 1rem 1.2rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255,0,0,0.3);
  backdrop-filter: blur(3px);
}
form input, form select {
  width: 100%;
  padding: 0.6rem;
  margin: 0.4rem 0 1rem 0;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #0d0d0d;
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
form input:focus, form select:focus {
  border-color: #ff4444;
  box-shadow: 0 0 6px rgba(255,0,0,0.5);
  outline: none;
}
form button { width: 100%; }

/* =============================
   TABLES
============================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: rgba(26,26,26,0.9);
  border-radius: 6px;
  overflow: hidden;
}
table thead {
  background: rgba(255,68,68,0.2);
}
table th, table td {
  padding: 0.7rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
table tr:hover {
  background: rgba(255,68,68,0.1);
}

/* =============================
   MESSAGES
============================= */
.success, .error {
  padding: 0.6rem 1rem;
  border-radius: 4px;
  margin: 1rem 0;
}
.success {
  background: rgba(255,68,68,0.12);
  border-left: 4px solid #ff4444;
  box-shadow: 0 0 8px rgba(255,0,0,0.3);
}
.error {
  background: rgba(255,0,0,0.12);
  border-left: 4px solid #ff0000;
  box-shadow: 0 0 8px rgba(255,0,0,0.3);
}

.animate-glow {
  animation: glowpulse 1.5s ease infinite alternate;
}
@keyframes glowpulse {
  from { box-shadow: 0 0 6px #ff4444; }
  to { box-shadow: 0 0 18px #ff0000; }
}

/* =============================
   PROGRESS BAR
============================= */
.progress-bar {
  background: #333;
  border-radius: 4px;
  overflow: hidden;
  height: 12px;
  width: 100%;
  margin: 10px 0;
  box-shadow: inset 0 0 5px #000;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg,#ff4444,#cc0000);
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(255,0,0,0.7);
}

/* =============================
   RESPONSIVE
============================= */
@media(max-width:768px) {
  .balance-card { flex-direction: column; text-align: center; }
  form { width: 95%; }
}
