/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* Main content area */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2::before {
    content: "🌍";
    font-size: 1.2em;
}

.card.lookup-card h2::before {
    content: "🔍";
}

/* Your IP section */
.ip-info {
    text-align: center;
}

.ip-display {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin: 20px 0;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.location-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    margin-top: 15px;
}

.flag {
    font-size: 1.5em;
}

/* Lookup form */
.lookup-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

/* Results section */
.results-section {
    grid-column: 1 / -1;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.results-section h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.result-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    color: #718096;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.result-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.result-item strong {
    color: #4a5568;
}

.dns-record {
    margin-bottom: 20px;
}

.dns-record h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.dns-record ul {
    list-style: none;
    padding-left: 0;
}

.dns-record li {
    background: #f7fafc;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.whois-output {
    background: #1a202c;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.error {
    color: #e53e3e;
    background: #fed7d7;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e53e3e;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #718096;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 40px;
    padding: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .ip-display {
        font-size: 1.5rem;
    }
    
    .result-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 15px;
    }
    
    .ip-display {
        font-size: 1.2rem;
        padding: 10px;
    }
    
    .location-info {
        flex-direction: column;
        gap: 5px;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}
/* WHOIS – DomainTools-like layout */
.whois { margin-top: 24px; }
.whois-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.whois-domain { color: var(--accent, #2563eb); }

.whois-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 980px) {
  .whois-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.whois-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  padding: 16px;
}
.whois-card.raw { align-self: start; }
.whois-card-h {
  font-weight: 700;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  padding-bottom: 8px;
}

.whois-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(0,0,0,.06);
}
.whois-row:last-child { border-bottom: 0; }

.whois-k { color: #666; font-weight: 600; }
.whois-v { color: #111; }

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  margin: 2px 6px 2px 0;
  white-space: nowrap;
}

.meta { color: #6b7280; font-size: 12px; margin-right: 6px; }
.link { color: #2563eb; text-decoration: none; }
.link:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.whois-pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0b1020;
  color: #e7eefc;
  border-radius: 8px;
  padding: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  max-height: 60vh;
  overflow: auto;
}
details summary {
  cursor: pointer;
  color: #2563eb;
  padding: 6px 0 10px;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }

/* Simple error card */
.card.error {
  background: #fff7f7;
  border: 1px solid #ffd1d1;
  color: #8a1f1f;
  padding: 12px 14px;
  border-radius: 10px;
}

