/* Account Page Styles */
body {
  padding-top: 0 !important;
  margin-top: 80px !important;
  min-height: 100vh;
  padding-bottom: 80px;
  overflow-y: auto;
}

.account-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  position: relative;
}

.account-header {
  margin-bottom: 40px;
}

.account-section {
  margin-bottom: 40px;
}

.server-status-indicator {
  text-align: center;
  background-color: rgba(103,58,183,0.15);
  color: #a9a9ff;
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 20px;
  font-weight: bold;
  border: 1px solid rgba(103,58,183,0.3);
}

.server-status-indicator i {
  margin-right: 5px;
  color: #a9a9ff;
}

.auth-required {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  margin: 40px 0;
  padding: 20px 0;
}

.auth-required-content {
  background-color: #1a1a1a;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 90%;
  width: 400px;
  margin: 40px auto;
}

.auth-required h2 {
  color: #ba4df5;
  margin-bottom: 20px;
}

.account-section {
  background-color: #1a1a1a;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.account-section h2 {
  color: #ba4df5;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #333;
}

/* Account details */
.account-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  color: #999;
  font-size: 14px;
  margin-bottom: 5px;
}

.detail-value {
  color: #fff;
  font-size: 16px;
}

/* API Key Form */
.api-key-form {
  margin-top: 15px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #ccc;
}

.api-key-input {
  display: flex;
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  width: 100%;
  gap: 10px;
}

.api-key-input input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #333;
  border-radius: 8px;
  background-color: #333; /* Slightly lighter dark color */
  color: white;
}

.toggle-btn {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
}

.form-help {
  margin-top: 10px;
  color: #999;
  font-size: 14px;
}

.form-help a {
  color: #ba4df5;
  text-decoration: none;
}

.form-help a:hover {
  text-decoration: underline;
}

/* Subscription */
.subscription-info {
  padding: 20px;
  background-color: #222;
  border-radius: 8px;
}

.subscription-info h3 {
  color: #ba4df5;
  margin-bottom: 15px;
}

.usage-bar {
  height: 10px;
  background-color: #333;
  border-radius: 5px;
  margin: 15px 0;
  overflow: hidden;
}

.usage-progress {
  height: 100%;
  background-color: #ba4df5;
  border-radius: 5px;
  width: 0%;
  transition: width 0.3s ease;
}

.usage-text {
  margin-top: 10px;
  color: #666;
}

/* Plans Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow-y: auto;
  padding: 40px 20px;
}

.modal-content {
  background-color: #1a1a1a;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 10px;
  padding: 30px;
  position: relative;
}

.usage-clarification {
  background-color: rgba(103, 58, 183, 0.1);
  border-left: 3px solid #ba4df5;
  padding: 12px 15px;
  margin-bottom: 25px;
  border-radius: 5px;
}

.usage-clarification p {
  color: #ccc;
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.usage-clarification i {
  color: #ba4df5;
  margin-right: 8px;
}

.modal .close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  color: #ba4df5;
  cursor: pointer;
}

.plans-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.plan-card {
  background-color: #222;
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.plan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(103, 58, 183, 0.2);
}

.plan-card.popular {
  border: 2px solid #ba4df5;
  transform: scale(1.05);
}

.popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ba4df5;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
}

.plan-card h3 {
  color: #ba4df5;
  margin-bottom: 15px;
}

.price {
  font-size: 28px;
  font-weight: bold;
  color: white;
  margin-bottom: 20px;
}

.price span {
  font-size: 16px;
  font-weight: normal;
  color: #999;
}

.features {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
  text-align: left;
}

.features li {
  padding: 8px 0;
  border-bottom: 1px solid #333;
  color: #ccc;
}

.features li:before {
  content: "✓";
  color: #ba4df5;
  margin-right: 10px;
}

.plan-select-btn {
  background-color: #ba4df5;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  width: 100%;
}

.plan-select-btn:hover {
  background-color: #5e35b1;
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .plans-container {
    grid-template-columns: 1fr;
  }

  .plan-card.popular {
    transform: none;
  }
}

/* Error message styling */
.auth-error {
  background-color: #ff3333;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  margin-bottom: 15px;
  font-size: 14px;
}
/* Connection controls */
.connection-controls {
  background-color: #222;
  padding: 20px;
  border-radius: 8px;
  margin-top: 15px;
}

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #ba4df5;
}

input:focus + .slider {
  box-shadow: 0 0 1px #ba4df5;
}

.switch input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.connection-status-indicator {
  margin-bottom: 15px;
  position: relative; /* Ensure it's part of the normal document flow */
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background-color: rgba(103, 58, 183, 0.15);
  color: #ba4df5;
  font-weight: 500;
  margin-bottom: 15px;
  position: relative; /* Keep it in the normal flow */
}

.status-badge.offline {
  background-color: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
}

.status-badge i {
  margin-right: 5px;
}

/* Ensure the clerk container is properly sized */
#clerk-mount {
  min-height: 300px;
  margin: 20px auto;
  width: 100%;
}

.bonus-credits {
  color: #ba4df5;
  font-size: 0.9em;
  margin-top: 5px;
}

.bonus-redemption {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.bonus-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 14px;
  background-color: #000;
  color: white;
}

.bonus-btn {
  background: #ba4df5;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.bonus-btn:hover {
  background: #a43de0;
}

.bonus-message {
  margin-top: 10px;
  font-size: 14px;
  min-height: 20px;
}