:root {
  --primary-color: #4f46e5;
  --bg-dark: #1e293b;
  --text-light: #f8fafc;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
}

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

body {
  font-family: sans-serif;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.container {
  max-width: 500px;
  width: 100%;
  position: relative;
}

.card {
  background-color: var(--bg-dark);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.settings-card {
  text-align: left;
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  opacity: 0.9;
}

.description {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.select-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  color: var(--text-light);
  background-color: var(--primary-color);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.select-button:hover {
  background-color: #4338ca;
}

.proxy-menu {
  position: absolute;
  top: 120%;
  left: 0;
  right: 0;
  background-color: var(--bg-dark);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  padding: 1rem;
  display: none;
  z-index: 100;
}

.proxy-menu.show {
  display: block;
}

.search-container {
  position: relative;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  color: var(--text-light);
  opacity: 0.7;
}

.filter-section {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-button {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: transparent;
  color: var(--text-light);
  cursor: pointer;
}

.filter-button.active {
  background-color: var(--primary-color);
}

.proxy-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem;
  color: var(--text-light);
  background-color: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.proxy-option:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.proxy-option i {
  margin-right: 1rem;
  width: 1.5rem;
  text-align: center;
}

.proxy-details {
  flex-grow: 1;
}

.proxy-name {
  display: block;
  margin-bottom: 0.25rem;
}

.proxy-info {
  font-size: 0.8rem;
  opacity: 0.7;
}

.proxy-status {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-online {
  background-color: var(--success-color);
}

.status-busy {
  background-color: var(--warning-color);
}

.status-offline {
  background-color: var(--error-color);
}

.cancel-button {
  color: var(--error-color);
}

.theme-toggle, 
.settings-button {
  position: absolute;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1.2rem;
}

.theme-toggle {
  top: 1rem;
  right: 1rem;
}

.settings-button {
  top: 1rem;
  right: 3.5rem;
  color: var(--text-light);
  text-decoration: none;
}

.active-proxy-info {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.active-proxy-info p {
  opacity: 0.7;
}

.proxy-menu-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.favorite-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0.5rem;
}

.favorite-button i {
  font-size: 1rem;
}

/* Settings page styles */
.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.back-button {
  margin-right: 1rem;
  color: var(--text-light);
  text-decoration: none;
  font-size: 1.2rem;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-label {
  display: flex;
  flex-direction: column;
}

.setting-description {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

.select-input, 
.number-input {
  padding: 0.5rem;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-light);
  min-width: 100px;
}

/* 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: rgba(255, 255, 255, 0.2);
  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: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

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

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

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

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.primary-button, 
.secondary-button {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
  flex: 1;
}

.primary-button {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.primary-button:hover {
  background-color: #4338ca;
}

.secondary-button {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

.secondary-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

body.light-theme {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  color: #0f172a;
}

body.light-theme .card,
body.light-theme .proxy-menu {
  background-color: white;
  color: #0f172a;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .proxy-option,
body.light-theme .search-input,
body.light-theme .select-input,
body.light-theme .number-input {
  color: #0f172a;
}

body.light-theme .search-icon,
body.light-theme .theme-toggle,
body.light-theme .settings-button,
body.light-theme .back-button {
  color: #0f172a;
}

body.light-theme .active-proxy-info {
  background-color: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .setting-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .proxy-menu-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .slider {
  background-color: rgba(0, 0, 0, 0.2);
}

body.light-theme .slider:before {
  background-color: white;
}

body.light-theme .secondary-button {
  background-color: rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

body.light-theme .secondary-button:hover {
  background-color: rgba(0, 0, 0, 0.2);
}
