:root {
  --bg-color: #0b1021;
  --bg-secondary: rgba(0,0,0,0.2);
  --text-color: #e0e6ed;
  --text-primary: #e0e6ed;
  --muted: #8892b0;
  --border: rgba(255,255,255,0.1);
  --border-color: rgba(255,255,255,0.1);
  --accent: #198754;
  --panel: rgba(255,255,255,0.05);
  /* Notlar ile aynı header renkleri */
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.05);
  --danger: #ff6b6b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  background-image: radial-gradient(circle at 50% 0%, #1a2a4a 0%, #0b1021 70%);
  min-height: 100vh;
}
/* Header: Notlar ile aynı yapı ve stiller */
.notes-container { padding: 20px 10px; max-width: 100%; }
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 10px;
  margin-bottom: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  flex-wrap: wrap;
}
.top-bar-left { display: flex; flex-direction: column; gap: 4px; }
.top-bar-left .app-title { font-size: 1.5rem; font-weight: 700; color: var(--text-color); margin: 0; }
.top-bar-left .app-title a { color: inherit; text-decoration: none; }
.top-bar-left .app-title a:hover { text-decoration: underline; }
.top-bar-left .user-logout { font-size: 0.9rem; margin: 0; color: var(--text-color); }
.top-bar-left .user-logout a { color: var(--danger); text-decoration: none; }
.top-bar-left .user-logout a:hover { text-decoration: underline; }
.button-island {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.btn-custom {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border: none;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  border: 1px solid var(--card-border);
}
.btn-custom:hover { background: rgba(255, 255, 255, 0.2); color: white; }

.tools-main { padding: 0; max-width: 1200px; margin: 0 auto; }
.me-1 { margin-right: 4px; }
.mx-1 { margin-left: 4px; margin-right: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.d-block { display: block; }
.small { font-size: 0.875rem; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 360px;
  width: 100%;
}
.login-card h2 { margin: 0 0 8px 0; color: var(--text-color); }
.text-muted { color: var(--muted); }
.login-card .form-control {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-color);
}
.btn-primary {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.tools-container { padding: 0; }
.tools-container h2 { margin: 0 0 24px 0; color: var(--text-color); }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.tool-icon { margin-bottom: 12px; }
.tool-icon svg { color: var(--muted); }
.tool-card h3 { margin: 0 0 4px 0; font-size: 1.25rem; color: var(--text-color); }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.875rem; }

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-content {
  background: #111a33;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-header h3 { margin: 0; font-size: 1.25rem; color: var(--text-color); }
.close-tool-modal {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
}
.close-tool-modal:hover { color: #fff; }
.tool-form .form-group { margin-bottom: 16px; }
.tool-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.875rem; color: var(--text-color); }
.tool-form input[type="text"],
.tool-form input[type="number"],
.tool-form select,
.tool-form textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.tool-form textarea { resize: vertical; min-height: 100px; }
.tool-form .radio-group { display: flex; flex-wrap: wrap; gap: 12px; }
.tool-form .radio-group label { font-weight: normal; cursor: pointer; }
.modal-actions { margin-top: 20px; }
.modal-actions .primary {
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.tool-output {
  margin-top: 20px;
  padding: 16px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  border: 1px solid var(--border);
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.875rem;
  max-height: 400px;
  overflow-y: auto;
}
.tool-output pre { margin: 0; color: var(--text-primary); }
#digOutput.tool-output { padding-top: 2px; }
.dig-type-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.dig-type-row .form-group { flex: 0 0 auto; }
.dig-type-select { width: 72px; min-width: 72px; padding: 8px 10px; }
.dig-type-row .primary { flex-shrink: 0; }
#digForm button[type="submit"] {
  padding: 12px 24px;
  font-size: 1rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
#digForm button[type="submit"]:hover:not(:disabled) {
  background: #1d4ed8;
}
#digForm button[type="submit"]:disabled {
  background: #2563eb;
  color: #fff;
  opacity: 1;
  cursor: default;
}
.dig-repeat-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin: 0;
  font-weight: normal;
}
.dig-count-inline { color: var(--muted); font-size: 0.95rem; }
.myip-table th { text-align: left; padding: 6px 12px 6px 0; }
.myip-table td { text-align: left; padding: 6px 0; }
.table-responsive { overflow-x: auto; margin-top: 16px; }
.table-responsive table { width: 100%; border-collapse: collapse; color: var(--text-primary); }
.table-responsive th, .table-responsive td { padding: 8px; border-bottom: 1px solid var(--border); text-align: left; }
