@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  background: #ffffff;
  color: #1a1a2e;
  overflow-x: hidden;
  font-size: 13px;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  height: 100vh;
  background: #1a1a2e;
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 100;
}

.sidebar .logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.sidebar .logo img {
  width: 26px;
  height: 26px;
}

.sidebar nav a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.sidebar nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.sidebar nav a.active {
  color: #fff;
  background: rgba(78, 115, 255, 0.25);
}

.sidebar nav a img {
  width: 16px;
  height: 16px;
  filter: invert(1);
  opacity: 0.7;
}

.sidebar nav a:hover img { opacity: 1; }

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 12px 0;
}

.page-wrapper {
  margin-left: 220px;
  width: calc(100% - 220px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 28px;
  background: #fff;
  border-bottom: 1px solid #eee;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar .user-balance {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a1a2e;
  background: #f0f4ff;
  padding: 6px 14px;
  border-radius: 20px;
}

.top-bar .login-btn {
  background: #4e73ff;
  color: #fff;
  padding: 7px 20px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.top-bar .login-btn:hover { background: #3b5ee6; }

.top-bar .logout-btn {
  color: #888;
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.top-bar .logout-btn:hover { color: #e74c3c; }

main {
  padding: 24px 28px;
  flex: 1;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.error-x-icon {
  margin-bottom: 12px;
}

.error-circle {
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  animation: errorCircleDraw 0.4s ease forwards;
}

.error-x {
  stroke-dasharray: 28;
  stroke-dashoffset: 28;
  animation: errorXDraw 0.3s 0.3s ease forwards;
}

@keyframes errorCircleDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes errorXDraw {
  to { stroke-dashoffset: 0; }
}

.hero-banner {
  background: linear-gradient(135deg, #4e73ff 0%, #764ba2 100%);
  border-radius: 14px;
  padding: 0;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  max-height: 160px;
}

.hero-banner .hero-text h2 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.hero-banner .hero-text p {
  color: rgba(255,255,255,0.8);
  font-size: 0.75rem;
  font-weight: 400;
}

.hero-banner .hero-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  opacity: 0.9;
}

.activity-feed {
  background: #f8f9ff;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid #e8ecf4;
  max-width: 550px;
}

.activity-feed .feed-label {
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-weight: 600;
}

.activity-item {
  padding: 5px 0;
  border-bottom: 1px solid #eef1f8;
  font-size: 0.75rem;
  color: #4e73ff;
  font-weight: 500;
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title img {
  width: 18px;
  height: 18px;
}

.table-container {
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.table-scroll {
  max-height: 480px;
  overflow-y: auto;
}

.table-scroll::-webkit-scrollbar {
  width: 6px;
}

.table-scroll::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

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

.robux-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
}

.robux-table th {
  background: #f5f7fb;
  padding: 10px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e8ecf4;
}

.robux-table td {
  padding: 10px 16px;
  font-size: 0.78rem;
  border-bottom: 1px solid #f0f2f7;
}

.robux-table tr:hover {
  background: #f8f9ff;
  cursor: pointer;
}

.robux-table tr:last-child td { border-bottom: none; }

.robux-amount {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1a1a2e;
}

.robux-amount img {
  width: 16px;
  height: 16px;
}

.robux-price {
  font-weight: 700;
  color: #4e73ff;
}

.robux-rate {
  color: #888;
  font-size: 0.72rem;
}

.buy-btn {
  background: #4e73ff;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
}

.buy-btn:hover { background: #3b5ee6; }

.history-page {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  border: 1px solid #f0f2f7;
}

.history-table-wrap {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.history-table th {
  text-align: left;
  font-size: 0.65rem;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f2f7;
}

.history-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f2f7;
  font-size: 0.78rem;
  color: #333;
}

.history-table tr:hover {
  background: #fafbff;
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.status-completed {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pending {
  background: #fff3e0;
  color: #e65100;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: capitalize;
}

.footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  padding: 32px 28px 20px;
  margin-top: auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-col p, .footer-col a {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  text-decoration: none;
  display: block;
}

.footer-col a:hover { color: #fff; }

.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.footer-socials a {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.footer-socials a:hover { background: rgba(255,255,255,0.18); }

.footer-socials a img {
  width: 16px;
  height: 16px;
  filter: invert(1);
  opacity: 0.7;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

.footer-bottom a:hover { color: #fff; }

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.popup-box {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.popup-box .popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}

.popup-box .popup-close:hover { color: #333; }

.popup-box .popup-icon {
  width: 60px;
  margin-bottom: 14px;
}

.popup-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.popup-box p {
  font-size: 0.78rem;
  color: #666;
  margin-bottom: 18px;
  line-height: 1.5;
}

.popup-box .popup-btn {
  background: #4e73ff;
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.popup-box .popup-btn:hover { background: #3b5ee6; }

.popup-box .popup-link {
  display: block;
  margin-top: 10px;
  font-size: 0.7rem;
  color: #4e73ff;
  text-decoration: none;
}

.popup-box .popup-link:hover { text-decoration: underline; }

.under-dev {
  text-align: center;
  padding: 80px 20px;
}

.under-dev img {
  width: 120px;
  opacity: 0.4;
  margin-bottom: 20px;
}

.under-dev h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.under-dev p {
  font-size: 0.8rem;
  color: #888;
}

.btn {
  background: #4e73ff;
  color: #fff;
  padding: 10px 22px;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-block;
  font-weight: 600;
  border: none;
  font-size: 0.8rem;
  transition: background 0.2s;
  text-decoration: none;
}

.btn:hover { background: #3b5ee6; }

.crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.crypto-btn {
  background: #f8f9ff;
  border: 1px solid #e8ecf4;
  padding: 14px;
  border-radius: 10px;
  color: #1a1a2e;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
  font-size: 0.75rem;
  font-weight: 500;
}

.crypto-btn:hover {
  border-color: #4e73ff;
  background: #f0f4ff;
}

.crypto-btn img { width: 28px; height: 28px; }

form {
  background: #fff;
  padding: 36px;
  border-radius: 14px;
  width: 100%;
  max-width: 380px;
  margin: 80px auto;
  border: 1px solid #e8ecf4;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

form h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a2e;
}

form input {
  width: 100%;
  margin: 8px 0;
  padding: 10px 14px;
  background: #f8f9ff;
  border: 1px solid #e0e4ee;
  color: #1a1a2e;
  border-radius: 8px;
  font-size: 0.8rem;
}

form input:focus {
  border-color: #4e73ff;
  outline: none;
  background: #fff;
}

form p {
  margin-top: 14px;
  font-size: 0.75rem;
  color: #888;
}

form p a {
  color: #4e73ff;
  text-decoration: none;
  font-weight: 500;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.modal-box {
  background: #fff;
  padding: 32px;
  border-radius: 14px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.modal-box h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
}

.modal-empty {
  background: #f8f9ff;
  padding: 32px;
  border-radius: 10px;
  margin-bottom: 16px;
  text-align: center;
}

.modal-empty img {
  width: 60px;
  opacity: 0.4;
  margin-bottom: 10px;
}

.modal-empty p {
  color: #888;
  font-size: 0.8rem;
}

.tos-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px;
}

.tos-content h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a2e;
}

.tos-content h2 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 8px;
  color: #1a1a2e;
}

.tos-content p, .tos-content li {
  font-size: 0.78rem;
  color: #555;
  line-height: 1.8;
}

.tos-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}
