@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  display: flex;
  background: #0d1117;
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  width: 260px;
  height: 100vh;
  background: #161b22;
  padding: 30px 20px;
  border-right: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
}

.sidebar h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 30px;
  color: #f9fafb;
}

.sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar ul li {
  padding: 14px 16px;
  border-radius: 8px;
  background: #1e222a;
  color: #cbd5e1;
  cursor: pointer;
  transition: 0.3s ease;
  font-weight: 500;
}

.sidebar ul li:hover,
.sidebar ul li.active {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  transform: scale(1.02);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

/* Main content */
.main-content {
  flex: 1;
  padding: 40px;
  background: #0d1117;
  min-height: 100vh;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 26px;
  font-weight: 600;
  background: linear-gradient(to right, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.add-credits,
button {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover,
.add-credits:hover {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  transform: translateY(-2px);
}

/* Highlights */
.highlights {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.highlight-card {
  flex: 1;
  padding: 20px;
  background: #1c1f2a;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 16px rgba(0,0,0,0.3);
  min-width: 180px;
}

.highlight-card h3 {
  font-size: 16px;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.highlight-card p {
  font-size: 18px;
  font-weight: 600;
  color: #f9fafb;
}

/* Stats */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

.stat {
  flex: 1;
  min-width: 220px;
  background: #1e1e2e;
  padding: 24px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: 0.3s ease;
}

.stat:hover {
  background: #27273d;
  transform: translateY(-4px);
}

.stat span {
  display: block;
  font-size: 24px;
  font-weight: bold;
  margin-top: 8px;
  color: #ffffff;
}

/* Solves History */
.solvesHistory h2 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 16px;
}

.history-toolbar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.history-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.history-tabs .tab {
  padding: 8px 14px;
  background: #1e1e2e;
  color: #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s;
}

.history-tabs .tab.active {
  background: linear-gradient(to right, #6366f1, #8b5cf6);
  color: #fff;
}

.history-filters input {
  padding: 10px 14px;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #e2e8f0;
  min-width: 200px;
}

#export-csv {
  background: #10b981;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

/* Solving History Grid */
.solving-history {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.solve {
  background: #1c1f2a;
  padding: 20px;
  border-radius: 14px;
  transition: 0.3s ease;
  border-left: 4px solid transparent;
  font-size: 14px;
}

.solve:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.solve.solving { border-left-color: #fbbf24; }
.solve.success { border-left-color: #10b981; }
.solve.fail { border-left-color: #ef4444; }

.solve .captchaType {
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  margin-bottom: 8px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 12px;
}

.pagination button {
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
}

/* Shimmer Loader */
.shimmer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.shimmer-box {
  height: 130px;
  border-radius: 12px;
  background: linear-gradient(100deg, #1f1f2f 30%, #2a2a3a 50%, #1f1f2f 70%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* Billing Page */
.billing-content {
  padding: 60px 30px;
  max-width: 800px;
  margin: 0 auto;
  color: #e2e8f0;
  background: #0d1117;
}

.billing-content h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
  background: linear-gradient(to right, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pricing {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.plan {
  background: #1e1e2e;
  padding: 30px;
  border-radius: 14px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.plan:hover {
  transform: translateY(-5px);
}

.plan h2 {
  font-size: 22px;
  color: #ffffff;
  margin-bottom: 16px;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  color: #cbd5e1;
}

.plan ul li {
  margin: 10px 0;
  font-size: 15px;
}

.plan button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 20px;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.3s ease;
}

.plan button:hover {
  background: #2563eb;
}

/* Modal Fix */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #1e1e2e;
  padding: 30px;
  border-radius: 14px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.modal-content h3 {
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 20px;
}

.modal-content input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid #334155;
  color: white;
  font-size: 15px;
  margin-bottom: 20px;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.modal-buttons button {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

#confirm-purchase {
  background: #10b981;
  color: white;
}

#cancel-purchase {
  background: #ef4444;
  color: white;
}

/* Invoice Message */
.invoice-message {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #22c55e;
  padding: 14px 24px;
  border-radius: 10px;
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 9999;
  animation: fadeInOut 4s ease-in-out forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
  10% { opacity: 1; transform: translateX(-50%) translateY(0); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* Settings Page */
.settings-container {
  background: #1e1e2e;
  padding: 40px;
  border-radius: 12px;
  max-width: 500px;
  margin: auto;
  text-align: center;
}

.settings-container h2 {
  font-size: 20px;
  margin-bottom: 24px;
}

.input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.input-container input {
  flex: 1;
  padding: 10px 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: white;
}

.input-container button {
  padding: 10px 12px;
  border-radius: 8px;
  background: #3b82f6;
  color: white;
  border: none;
  cursor: pointer;
}

.reset-button {
  background: #ef4444;
  border: none;
  color: white;
  padding: 12px 18px;
  font-weight: bold;
  border-radius: 10px;
  margin-top: 10px;
}

#status-message.success {
  color: #22c55e;
  margin-bottom: 12px;
}

#status-message.failure {
  color: #ef4444;
  margin-bottom: 12px;
}
.animated-glow {
  transition: box-shadow 0.3s ease;
}
.animated-glow:hover {
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
}

.stat-hover {
  transition: all 0.3s ease;
}
.stat-hover:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  border: 1px solid rgba(139, 92, 246, 0.2);
}