* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 450px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 0;
  margin: 0;
}

.container {
  background: white;
  padding: 20px;
  max-height: 600px;
  overflow-y: auto;
}

h1 {
  color: #333;
  font-size: 22px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
}

h3 {
  color: #555;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 600;
}

.section {
  margin-bottom: 20px;
}

label {
  display: block;
  color: #555;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 14px;
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
}

.hint {
  color: #999;
  font-size: 12px;
  margin-top: 5px;
}

.domain-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 5px;
}

.domain-input-group input {
  flex: 1;
}

button {
  padding: 10px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s;
}

button:hover {
  background: #5568d3;
}

button:active {
  transform: scale(0.98);
}

#add-domain {
  padding: 10px 16px;
  white-space: nowrap;
}

.save-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-size: 15px;
  font-weight: 600;
}

.save-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
}

.domain-list {
  margin-top: 10px;
  max-height: 200px;
  overflow-y: auto;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  padding: 8px;
  background: #f9f9f9;
}

.domain-list:empty::before {
  content: "尚未新增任何網域";
  color: #999;
  font-size: 13px;
  display: block;
  text-align: center;
  padding: 20px;
}

.domain-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 6px;
  transition: all 0.2s;
}

.domain-item:last-child {
  margin-bottom: 0;
}

.domain-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.domain-name {
  color: #333;
  font-size: 14px;
  flex: 1;
  word-break: break-all;
}

.remove-btn {
  padding: 4px 10px;
  background: #ff4757;
  font-size: 12px;
  margin-left: 8px;
}

.remove-btn:hover {
  background: #ee2f3d;
}

.status {
  margin-top: 10px;
  padding: 10px;
  text-align: center;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  min-height: 20px;
}

.status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.info {
  background: #e7f3ff;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid #667eea;
}

.info ul {
  list-style-position: inside;
  color: #555;
  font-size: 13px;
  line-height: 1.6;
}

.info li {
  margin-bottom: 4px;
}

/* 捲軸樣式 */
.domain-list::-webkit-scrollbar,
.container::-webkit-scrollbar {
  width: 8px;
}

.domain-list::-webkit-scrollbar-track,
.container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.domain-list::-webkit-scrollbar-thumb,
.container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.domain-list::-webkit-scrollbar-thumb:hover,
.container::-webkit-scrollbar-thumb:hover {
  background: #555;
}
