:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #1e293b;
  --light: #f8fafc;
  --border: #e2e8f0;
  --text: #334155;
  --text-light: #64748b;
  --bg-light: #f1f5f9;
  --shadow: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
}

/* Main Content */
main {
  flex: 1;
  padding: 40px 0;
}

.hero {
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 16px;
  color: var(--dark);
}

.hero p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 24px;
}

/* IP Display */
.ip-display {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.ip-main {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.ip-label {
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}

.ip-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--dark);
  font-family: "Monaco", "Courier New", monospace;
  flex: 1;
}

.copy-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: var(--primary-dark);
}

.copy-btn.copied {
  background: var(--success);
}

/* Details Grid */
.ip-details,
.ua-details,
.isp-details,
.asn-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.detail-row .label {
  font-weight: 600;
  color: var(--text-light);
}

.detail-row .value {
  color: var(--dark);
}

/* Forms */
.lookup-form,
.test-form {
  background: var(--bg-light);
  padding: 24px;
  border-radius: var(--radius);
  margin: 24px 0;
}

.form-group {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

.form-group input {
  flex: 1;
  min-width: 250px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 16px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group button,
.test-button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.form-group button:hover,
.test-button:hover {
  background: var(--primary-dark);
}

/* Results */
.lookup-results,
.test-results,
.blacklist-results {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.result-summary {
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.result-summary.clean,
.result-summary.no-leak {
  background: #dcfce7;
  border: 1px solid #86efac;
}

.result-summary.listed,
.result-summary.leak-detected {
  background: #fef2f2;
  border: 1px solid #fca5a5;
}

/* Tables */
.blacklist-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.blacklist-table th,
.blacklist-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.blacklist-table th {
  background: var(--bg-light);
  font-weight: 600;
}

.status-clean {
  color: var(--success);
  font-weight: 500;
}

.status-listed {
  color: var(--danger);
  font-weight: 500;
}

/* Notices */
.notice {
  padding: 16px;
  border-radius: var(--radius);
  margin: 24px 0;
}

.notice-info {
  background: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

.notice-warning {
  background: #fed7aa;
  border: 1px solid #fdba74;
  color: #9a3412;
}

.notice-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* Content Sections */
.content {
  margin: 40px 0;
}

.content h2 {
  font-size: 28px;
  margin: 32px 0 16px;
  color: var(--dark);
}

.content h3 {
  font-size: 20px;
  margin: 24px 0 12px;
  color: var(--dark);
}

.content p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.content ul,
.content ol {
  margin: 16px 0;
  padding-left: 32px;
}

.content li {
  margin-bottom: 8px;
}

/* FAQ Section */
.faq-section {
  margin: 32px 0;
}

.faq-item {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.faq-item h3 {
  margin-bottom: 12px;
  color: var(--dark);
}

/* Related Tools */
.related-tools {
  margin: 48px 0;
  padding: 32px;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.related-tools h2 {
  margin-bottom: 24px;
  color: var(--dark);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.tool-card {
  background: white;
  padding: 16px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tool-card h3 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 16px;
}

.tool-card p {
  font-size: 14px;
  color: var(--text-light);
}

/* Affiliate CTA */
.affiliate-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 24px;
  border-radius: var(--radius);
  margin: 32px 0;
  text-align: center;
}

.affiliate-cta h3 {
  margin-bottom: 12px;
  font-size: 24px;
}

.affiliate-cta p {
  margin-bottom: 16px;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: 12px 32px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s;
}

.cta-button:hover {
  transform: scale(1.05);
}

.disclosure {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 12px;
}

/* Ad Containers */
.ad-container {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 32px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ad-placeholder {
  color: var(--text-light);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: white;
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-section h3 {
  margin-bottom: 16px;
  font-size: 16px;
  color: white;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #334155;
  color: #94a3b8;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .ip-value {
    font-size: 18px;
  }
  
  .ip-main {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .form-group {
    flex-direction: column;
  }
  
  .form-group input {
    width: 100%;
    min-width: auto;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
}