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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f1a;
  color: #e0e0e0;
  min-height: 100vh;
}

#app {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px;
}

h1, h2 { font-size: 22px; margin-bottom: 16px; color: #fff; }
h3 { font-size: 16px; margin-bottom: 12px; color: #ccc; }

a { color: #4a9eff; text-decoration: none; }
a:hover { text-decoration: underline; }

input, button, select, textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  outline: none;
  width: 100%;
}

input, textarea {
  background: #1a1a2e;
  border: 2px solid #2a2a4a;
  color: #e0e0e0;
  margin-bottom: 12px;
}
input:focus, textarea:focus { border-color: #4a9eff; }
textarea { resize: vertical; min-height: 60px; }

button {
  background: #4a9eff;
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
button:hover { background: #3a8eef; }
button:disabled { background: #2a2a4a; color: #555; cursor: not-allowed; }
button.secondary { background: #2a2a4a; color: #8899aa; }
button.secondary:hover { background: #3a3a5a; }
button.danger { background: #f44336; }
button.danger:hover { background: #d33; }
button.small { padding: 6px 12px; font-size: 13px; width: auto; }

.card {
  background: #16213e;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.proxy-id {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #4caf50;
  word-break: break-all;
  background: #0f0f1a;
  padding: 12px;
  border-radius: 6px;
  margin: 8px 0;
}

.proxy-id.clickable {
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.proxy-id.clickable:hover {
  background: #1a2a1a;
  color: #6bd86f;
}

.code-block {
  background: #0a0a14;
  border: 1px solid #1a1a2e;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #111;
  font-size: 12px;
  color: #8899aa;
  border-bottom: 1px solid #1a1a2e;
}

.copy-btn {
  background: #2a2a4a;
  color: #8899aa;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  width: auto;
}
.copy-btn:hover { background: #3a3a5a; color: #fff; }

.code-block pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #c0c0d0;
  white-space: pre-wrap;
  word-break: break-all;
}

.toast {
  position: fixed;
  top: 20px; right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  background: #16213e;
  border: 1px solid #4a9eff;
  z-index: 1000;
  animation: slideIn 0.3s;
  max-width: 350px;
}
.toast.error { border-color: #f44336; }
.toast.success { border-color: #4caf50; }

@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.header .logo { font-size: 18px; font-weight: 700; color: #fff; }
.header .nav { display: flex; gap: 8px; }

.code-input {
  font-size: 28px;
  letter-spacing: 8px;
  text-align: center;
  text-transform: uppercase;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #2a2a4a;
}
.info-row:last-child { border: none; }
.info-row .label { color: #888; }
.info-row .value { color: #e0e0e0; font-weight: 500; word-break: break-all; }

table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid #2a2a4a;
  font-size: 13px;
}
th { color: #888; font-weight: 600; }
td { color: #e0e0e0; }

.link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #1a1a2e;
  border-radius: 8px;
  margin-bottom: 8px;
}
.link-row .link-url {
  flex: 1;
  font-size: 13px;
  word-break: break-all;
  color: #4a9eff;
}
.link-row .link-label {
  font-size: 12px;
  color: #8899aa;
  margin-right: 8px;
}
.link-row.inactive { opacity: 0.5; }

.btn-group { display: flex; gap: 4px; }

.hidden { display: none; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }

.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}
.tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  background: #1a1a2e;
  color: #8899aa;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}
.tab.active {
  background: #4a9eff;
  color: white;
}
