:root {
  --primary-color: #f7931a; /* Bitcoin Orange */
  --secondary-color: #ffc107; /* Gold/Yellow */
  --success-color: #28a745;
  --text-color: #212529; /* Dark Grey for Text */
  --text-secondary: #6c757d;
  --bg-color: #ffffff; /* White Background */
  --card-bg: #ffffff;
  --border-color: #dee2e6;
  --shadow: 0 6px 15px rgba(0, 0, 0, 0.07);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Dashboard Styles */
#dashboard-container {
  display: none;
  padding: 20px;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.header-title h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar {
  width: 45px; height: 45px; border-radius: 50%;
  background: var(--primary-color); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 20px;
}

.user-details .user-name {
    font-weight: 600;
    color: var(--text-color);
}

.user-details .user-email {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Main Dashboard Layout */
.dashboard {
  display: grid;
  gap: 25px;
  margin-bottom: 25px;
  grid-template-columns: 2fr 1fr;
  grid-template-areas:
    "main side1"
    "main side2"
    "main side3";
}

#my-bids-card { grid-area: main; }
#referrals-card { grid-area: side1; }
#gems-earned-card { grid-area: side2; }
#gems-used-card { grid-area: side3; }

/* General Card Styles */
.card { background: var(--card-bg); border-radius: 12px; padding: 25px; box-shadow: var(--shadow); border: 1px solid var(--border-color); display: flex; flex-direction: column; }
.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.card-icon { font-size: 22px; padding: 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.icon-success { background-color: #e9f7ec; color: var(--success-color); }
.icon-warning { background-color: #fff8e7; color: var(--secondary-color); }
.card-title { font-size: 16px; color: var(--text-secondary); font-weight: 500; }
.card-value { font-size: 42px; font-weight: 700; color: var(--text-color); }
.card-desc { font-size: 14px; color: var(--text-secondary); margin-top: 5px; flex-grow: 1; }
.referral-code { background: #f8f9fa; padding: 12px 15px; border-radius: 8px; margin-top: 20px; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border-color); }
.code { font-family: monospace; font-size: 16px; letter-spacing: 1px; color: var(--text-color); }
.copy-btn { background: var(--primary-color); border: none; color: white; padding: 8px 15px; border-radius: 5px; cursor: pointer; transition: background 0.2s; }
.copy-btn:hover { background: #d47a05; }
.logout-btn { background: #dc3545; }
.logout-btn:hover { background: #c82333; }

/* Stylish Call to Action Card (Golden Gradient Theme) */
/* Stylish Call to Action Card (Carbon Fiber Theme) */
.cta-card-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  padding: 20px 25px;
  margin-bottom: 25px;
  border-radius: 12px;
  /* Carbon Fiber background created with CSS gradients */
  background-color: #222;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.05) 75%),
    linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.05) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-card-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.cta-card-compact .cta-button {
    background-color: #007bff; /* Vibrant Blue */
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5); /* Glowing effect */
    transition: background-color 0.2s, box-shadow 0.2s;
}

.cta-card-compact .cta-button:hover {
    background-color: #0056b3;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.8);
}

/* Blinking Live Icon */
.blinking-dot {
  height: 12px;
  width: 12px;
  background-color: #ff4d4d; /* Bright red */
  border-radius: 50%;
  display: inline-block;
  margin-right: 12px;
  vertical-align: middle;
  /* This line makes it blink */
  animation: blink-animation 1.5s infinite;
}

/* This block defines the blinking animation */
@keyframes blink-animation {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* Accordion & Bid Table Styles */
.accordion-header { background-color: transparent; border: none; border-top: 1px solid var(--border-color); padding: 15px 5px; width: 100%; text-align: left; cursor: pointer; font-size: 15px; font-weight: 600; margin-top: 15px; display: flex; justify-content: space-between; align-items: center; color: var(--text-color); transition: background-color 0.2s; }
.accordion-header:hover { background-color: #f8f9fa; }
.accordion-header::after { content: '›'; font-size: 24px; font-weight: bold; color: var(--text-secondary); transform: rotate(90deg); transition: transform 0.3s; }
.accordion-header.active::after { transform: rotate(-90deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-in-out; }
.card-table { width: 100%; border-collapse: collapse; }
.card-table th { text-align: left; padding: 12px 8px; color: var(--text-secondary); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border-color); }
.card-table td { padding: 12px 8px; font-size: 14px; vertical-align: middle; }
.card-table tbody tr:nth-child(even) { background-color: #f8f9fa; }
.card-table .tx-id-cell { max-width: 160px; font-family: monospace; font-size: 16px; color: var(--text-secondary); word-break: break-all; }
.card-table .s-no-cell { width: 50px; color: var(--text-color); }
.card-table .bid-value { color: var(--primary-color); font-weight: 600; }
.copy-tx-btn { background: #f1f3f4; border: 1px solid #dadce0; color: #3c4043; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 4px; cursor: pointer; margin-left: 8px; }
.copy-tx-btn:hover { background-color: #e8eaed; }

.dashboard-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text-color); color: white; padding: 15px 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); display: none; z-index: 1000; }

/* Responsive Layout */
@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "side1"
      "side2"
      "side3";
  }
}