/* Settings styles */

.settings-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.settings-popup-content {
  background: #2a2a2a;
  border-radius: 0px;
  width: 90%;
  max-width: 800px;
  height: 80%;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #444;
  position: relative;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #444;
  position: relative;
}

.settings-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
  flex: 1;
  text-align: left;
}

.settings-close {
  background: none !important;
  border: none !important;
  color: #aaa !important;
  font-size: 24px !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
  transition: none !important;
  position: absolute !important;
  right: 20px !important;
  top: 20px !important;
  box-sizing: border-box !important;
  outline: none !important;
  transform: none !important;
}

.settings-close:hover {
  color: #fff !important;
  
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  font-size: 24px !important;
  position: absolute !important;
  right: 20px !important;
  top: 20px !important;
  box-sizing: border-box !important;
  outline: none !important;
  transform: none !important;
  transition: none !important;
}

.settings-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0; 
}

.settings-sidebar {
  width: 200px;
  background: #333;
  padding: 20px 0;
  border-right: 1px solid #444;
}

.settings-nav-item {
  padding: 12px 24px;
  cursor: pointer;
  color: #ccc;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.settings-nav-item:hover {
  background: #3a3a3a;
  color: #fff;
}

.settings-nav-item.active {
  background: #3a3a3a;
  color: #fff;
}

.settings-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.settings-tab {
  display: none;
}

.settings-tab.active {
  display: block !important;
}

.settings-tab h3 {
  margin: 0 0 24px 0;
  color: #fff;
  font-size: 1.25rem;
  border-bottom: 1px solid #444;
  padding-bottom: 12px;
}

.settings-group {
  margin-bottom: 32px;
}

.settings-group:last-child {
  margin-bottom: 0;
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.cache-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.cache-item:last-child {
  margin-top: 16px;
  padding-top: 16px;
}

.cache-label {
  color: #e0e0e0;
  font-size: 15px;
  flex: 1;
}

.action-btn {
  background: #222;
  color: #bbb;
  border: 1px solid #444;
  border-radius: 0;
  padding: 10px 16px;
  cursor: pointer;
  transition: none;
  font-size: 14px;
  box-sizing: border-box;
  min-width: fit-content;
  max-width: none;
  width: auto;
  min-height: 32px;
  transform: none;
  position: relative;
}

.action-btn:hover {
  background: #383838;
}

.action-btn.clear-all {
  width: 100%;
  margin-left: 0;
  margin-top: 8px;
}

.action-btn.clear-all:hover {
  width: 100%;
  margin-left: 0;
  margin-top: 8px;
  background: #444;
  color: #bbb;
  border: 1px solid #444;
}

.form-group.account-management {
  display: flex;
  flex-direction: column;

  align-items: left;
}

.action-btn.delete-account-btn {
  background: #b00020;
  color: #fff;
  margin-top: 12px;
}

.action-btn.delete-account-btn:hover {
  background: #99001c;
}

.action-btn.policy-agreement-btn {
  background: #444;
  color: #fff;
  margin-top: 12px;
  border: 1px solid #555;
}

.action-btn.policy-agreement-btn:hover {
  background: #3d3d3d;
}

.dismissed-onboarding-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dismissed-onboarding-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #222;
  border: 1px solid #444;
  padding: 10px 14px;
}

.dismissed-onboarding-title {
  color: #ccc;
  font-size: 14px;
}

.action-btn.dismissed-onboarding-resume {
  padding: 6px 14px;
  font-size: 13px;
  min-height: unset;
  margin: 0;
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.toggle-switch {
  width: 32px;
  height: 18px;
  background: #bbb;
  border-radius: 0;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s;
  border: 1px solid #ccc;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 0;
  background: #fff;
  top: 1px;
  left: 1px;
  transition: transform 0.2s;
  box-shadow: none;
  border: 1px solid #ccc;
}

.toggle-switch.active {
  background: #4af;
  border-color: #4af;
}

.toggle-switch.active::after {
  transform: translateX(15px);
}

.toggle-label {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

.login-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 16px;
  background: #222;
  color: #bbb;
  border: 1px solid #444;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  box-sizing: border-box;
  min-width: fit-content;
}

.login-prompt:hover {
  background: #444;
  color: #fff;
  
}

.checkbox-label {
  position: relative;
  display: inline;
  font-size: 12px;
  color: #7d8590;
  cursor: pointer;
  line-height: 18px;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  pointer-events: none;
}
.custom-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 0;
  border: 1px solid #7d8590;
  background: #2a2a2a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  vertical-align: middle;
  margin-right: 10px;
}
.custom-checkbox::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  transition: width 0.08s ease, height 0.08s ease, opacity 0.08s ease;
  opacity: 0;
}
.checkbox-label.checked .custom-checkbox {
  background: var(--a-button-bg);
  border: 1px solid var(--a-button-bd);
}
.checkbox-label.checked .custom-checkbox::before {
  width: 12px;
  height: 12px;
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.checkbox-label a {
  color: #58a6ff;
  text-decoration: underline;
}
.checkbox-label a:visited {
  color: #7a3ec8;
}


.prompt-logo {
  width: 24px;
  height: 24px;
}

.prompt-text {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

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

.policy-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.policy-modal-content {
  background: #2a2a2a;
  border: 1px solid #444;
  width: 90%;
  max-width: 640px;
  border-radius: 0;
  overflow: hidden;
}
.policy-modal-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 20px;
  border-bottom:1px solid #3a3a3a;
}
.policy-modal-header h3 { color:#fff; margin:0; }
.policy-modal-close {
  background:none; border:none; color:#aaa; font-size:20px; cursor:pointer;
}
.policy-modal-body { padding:16px 20px; max-height:60vh; overflow:auto; }
.policy-item { display:flex; flex-direction: column; padding:12px 0; border-bottom:1px solid #333; }
.policy-item-left { max-width:78%; }
.policy-name { color:#fff; font-weight:600; margin-bottom:6px; }
.policy-desc { color:#bfc4c8; font-size:13px; }
.policy-item-right { display:flex; flex-direction:column; gap:12px; margin-top:12px; }
.policy-label { font-size:13px; color:#d1d1d1; }
.policy-label.agreed { color:#b4b4b4; }
.policy-label.not-agreed { color:#a32525; }


.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px;
  background: var(--background-all);
  border: 1px solid #3f3f3f;
  color: #f0f6fc;
  font-size: 14px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: 1px solid #fff;
}

.form-group input:disabled {
  background: #333;
  color: #888;
  cursor: not-allowed;
  border-color: #444;
}

.username-availability {
  margin-top: 4px;
  font-size: 12px;
}

.username-availability.available {
  color: #28a745;
}

.username-availability.unavailable {
  color: #dc3545;
}

.username-availability.checking {
  color: #ffc107;
}

.color-options {
  display: flex;
  gap: 8px;
  align-items: center;
}

.color-option {
  width: 20px;
  height: 20px;
  border: 2px solid #555;
  cursor: pointer;
  position: relative;
}

.color-option.selected {
  border-color: #fff;
}

.color-option.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.color-option[data-color="#222"] {
  background: var(--background-all);
}

.color-option[data-color="#333"] {
  background: #333;
}

.color-option[data-color="#fff"] {
  background: #fff;
  border-color: #ccc;
}

.color-option[data-color="#fff"].selected {
  border-color: #fff;
}

.color-option[data-color="#fff"].selected::after {
  color: #000;
}

#colorPickerOption {
  background: conic-gradient(
    rgb(207, 46, 46), rgb(236, 236, 48), rgb(57, 209, 43), rgb(0, 183, 255), rgb(0, 89, 255), rgb(219, 23, 219), rgb(218, 51, 51)
  );
}

#colorPickerOption.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.settings-footer {
  flex-shrink: 0; 
  height: 56px;
  background: #2a2a2a;
  border-top: 1px solid #444;
  box-sizing: border-box;
}

.settings-footer-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
}

.settings-footer-buttons {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
}

.settings-btn.cancel,
.settings-btn.save {
  background: #222 !important;
  color: #bbb !important;
  border: 1px solid #444 !important;
  border-radius: 0 !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  transition: none !important;
  font-size: 14px !important;
  margin-left: auto !important;
  box-sizing: border-box !important;
  min-width: fit-content !important;
  max-width: none !important;
  width: auto !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  transform: none !important;
  position: relative !important;
}

.settings-btn.cancel:hover,
.settings-btn.save:hover {
  background: #444 !important;
  
  color: #bbb !important;
  border: 1px solid #444 !important;
  border-radius: 0 !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  margin-left: auto !important;
  box-sizing: border-box !important;
  min-width: fit-content !important;
  max-width: none !important;
  width: auto !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  transition: none !important;
  transform: none !important;
  position: relative !important;
}

.settings-btn.save {
  background: #0066cc;
}

.settings-btn.save:hover {
  background: #0077dd;
}

#toolbarAlignment {
  background: #333 !important;
  color: #fff !important;
  border: 1px solid #555 !important;
  border-radius: 0px !important;
  padding: 8px 12px !important;
  width: 200px !important;
  font-size: 14px !important;
  appearance: none !important;
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 16px !important;
}

#toolbarAlignment:hover {
  background: #444 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 16px !important;
  border-color: #666 !important;
}

#toolbarAlignment:focus {
  outline: 2px solid #fff !important;
  outline-offset: -2px !important;
  background: #444 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 16px !important;
}

#toolbarAlignment option {
  background: #333 !important;
  color: #fff !important;
  padding: 8px !important;
}

#toolbarAlignment option:hover,
#toolbarAlignment option:checked:hover,
#toolbarAlignment option:focus,
#toolbarAlignment option:checked,
#toolbarAlignment option:selected {
  background: #555 !important;
  color: #fff !important;
}

#qualityRefresh {
  background: #333 !important;
  color: #fff !important;
  border: 1px solid #555 !important;
  border-radius: 0px !important;
  padding: 8px 12px !important;
  width: 200px !important;
  font-size: 14px !important;
  appearance: none !important;
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 16px !important;
}

#qualityRefresh:hover {
  background: #444 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 16px !important;
  border-color: #666 !important;
}

#qualityRefresh:focus {
  outline: 2px solid #fff !important;
  outline-offset: -2px !important;
  background: #444 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 16px !important;
}

#qualityRefresh option {
  background: #333 !important;
  color: #fff !important;
  padding: 8px !important;
}

#qualityRefresh option:hover,
#qualityRefresh option:checked:hover,
#qualityRefresh option:focus,
#qualityRefresh option:checked,
#qualityRefresh option:selected {
  background: #555 !important;
  color: #fff !important;
}

.upload-overlay {
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
}

/* Earnings styles */

.earnings-balance {
  text-align: center;
  padding: 40px 20px;
  background: #2a2a2a;
  margin: 20px 0;
}

.balance-label {
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 8px;
  font-weight: 500;
}

.balance-amount {
  font-size: 64px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
}

#request-payout-btn {
  margin-top: 12px;

  background-color: var(--a-button-bg);
  border: 1px solid var(--a-button-bd);
  color: white;

  padding: 8px 10px;
}

#request-payout-btn.disabled {
  background-color: #16457a96;
  border-color: #1953968e;
  color: rgba(255, 255, 255, 0.562);

  cursor: not-allowed;
}

#request-payout-btn:hover:not(.disabled) {
  background-color: #195396;

  cursor: pointer;

  transition: background-color 0.2s ease-in-out;
}

@media (max-width: 622px) {
  .balance-amount {
    font-size: 32px;
  }

  .settings-body {
    flex-direction: column;
  }

  .settings-sidebar {
    width: 100%;

    display: flex;
    flex-direction: row;
    justify-content: space-around;
  }

  .settings-nav-item {
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media (max-width: 542px) {
  .settings-sidebar {
    overflow-x: scroll;
  }
}

.earnings-stats {
  display: flex;
  justify-content: space-between;
  margin: 30px 0;
  gap: 20px;
}

.stat-item {
  text-align: center;
  background: #333;
  padding: 20px;
  flex: 1;
  max-width: 200px;
}

.stat-label {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
}

.earnings-chart {
  width: 100%;
  margin: 20px 0;
  background: #333;
}

.earnings-chart canvas {
  width: 100% !important;
  height: 150px !important;
}
