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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: #f5f6fa;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 30px 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  width: 48px;
  height: 48px;
}

.header-text h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.version {
  font-size: 14px;
  opacity: 0.9;
  margin: 5px 0 0 0;
}

/* Content */
.content {
  padding: 0;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  background: #fafafa;
  padding: 0 40px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.tab-btn.active {
  color: #667eea;
  border-bottom-color: #667eea;
}

/* Tab Content */
.tab-content {
  padding: 40px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.tab-pane h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #333;
}

.tab-description {
  color: #666;
  margin: 0 0 30px 0;
  font-size: 15px;
}

/* Setting Groups */
.setting-group {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 5px 0;
  color: #333;
}

.setting-info p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
  background-color: #667eea;
}

.toggle input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #667eea;
  color: #fff;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

.btn-danger {
  background: #ea4335;
  color: #fff;
}

.btn-danger:hover {
  background: #d33828;
}

.btn-danger-outline {
  background: transparent;
  color: #ea4335;
  border: 2px solid #ea4335;
}

.btn-danger-outline:hover {
  background: #ea4335;
  color: #fff;
}

/* Whitelist Section */
.whitelist-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.whitelist-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.whitelist-input:focus {
  outline: none;
  border-color: #667eea;
}

.whitelist-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 6px;
}

.whitelist-list {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.whitelist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.whitelist-item:last-child {
  border-bottom: none;
}

.whitelist-item:hover {
  background: #f8f9fa;
}

.whitelist-url {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #333;
  word-break: break-all;
}

.whitelist-remove {
  background: transparent;
  border: none;
  color: #ea4335;
  cursor: pointer;
  font-size: 20px;
  padding: 4px 8px;
  transition: transform 0.2s;
}

.whitelist-remove:hover {
  transform: scale(1.2);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state p {
  margin: 10px 0;
}

.text-muted {
  font-size: 14px;
  color: #aaa;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  opacity: 0.9;
}

.stats-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Advanced Section */
.advanced-actions {
  margin: 30px 0;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 8px;
}

.advanced-actions h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.info-section {
  margin-top: 30px;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 8px;
}

.info-section h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
}

.info-section p {
  margin: 8px 0;
  font-size: 14px;
  color: #666;
}

.info-section a {
  color: #667eea;
  text-decoration: none;
}

.info-section a:hover {
  text-decoration: underline;
}

/* Status Message */
.status-message {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 16px 24px;
  background: #28a745;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  pointer-events: none;
  z-index: 1000;
}

.status-message.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.status-message.error {
  background: #ea4335;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 20px;
  }

  .tabs {
    padding: 0 20px;
  }

  .tab-content {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    width: 100%;
  }
}

/* Radio Group (screenshot mode etc.) */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-option:hover {
  background: #f5f6fa;
  border-color: #667eea;
}

.radio-option input[type="radio"] {
  margin-top: 3px;
  accent-color: #667eea;
}

.radio-option input[type="radio"]:checked ~ .radio-label {
  color: #667eea;
  font-weight: 600;
}

.radio-label {
  font-size: 14px;
  color: #333;
  min-width: 160px;
}

.radio-desc {
  font-size: 12px;
  color: #888;
  flex: 1;
}