* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

header p {
    font-size: 0.9em;
    opacity: 0.8;
}

.input-section {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #3a3a3a;
}

.options {
    margin: 12px 0;
    display: flex;
    align-items: center;
}

.options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 0.9em;
    user-select: none;
}

.options input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

#domainInput {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    background: #1a1a1a;
    color: #e0e0e0;
    transition: border-color 0.3s;
}

#domainInput:focus {
    outline: none;
    border-color: #667eea;
}

#checkButton {
    margin-top: 12px;
    padding: 10px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

#checkButton:hover {
    background: #5568d3;
}

.loading {
    text-align: center;
    padding: 30px;
    background: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #3a3a3a;
}

.loading p {
    margin-top: 15px;
    color: #667eea;
    font-weight: 600;
}

.spinner {
    border: 3px solid #3a3a3a;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

.results {
    display: grid;
    gap: 10px;
}

.domain-result {
    background: #2a2a2a;
    border-radius: 6px;
    border: 1px solid #3a3a3a;
    overflow: hidden;
}

.domain-header {
    background: #1a1a1a;
    color: white;
    padding: 10px 15px;
    font-size: 1.1em;
    font-weight: 600;
    border-bottom: 1px solid #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.domain-header > span:first-of-type {
    display: flex;
    align-items: center;
    flex: 1;
}

.domain-header:hover {
    background: #222;
}

.collapse-arrow {
    font-size: 0.9em;
    color: #667eea;
    transition: transform 0.3s;
    margin-left: 10px;
    flex-shrink: 0;
}

.collapse-arrow.collapsed {
    transform: rotate(-90deg);
}

.domain-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0;
}

.domain-content.collapsed {
    display: none;
}

.dns-section, .whois-section {
    padding: 10px 15px;
}

.whois-section {
    background: #222;
    border-left: 1px solid #3a3a3a;
}

.section-title {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 6px;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 4px;
    border-bottom: 1px solid #3a3a3a;
}

.record-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.record-table thead {
    background: #1a1a1a;
}

.record-table th {
    text-align: left;
    padding: 4px 8px;
    font-weight: 600;
    color: #999;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #3a3a3a;
}

.record-table td {
    padding: 3px 8px;
    border-bottom: 1px solid #2a2a2a;
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
    font-size: 0.9em;
    line-height: 1.2;
}

.record-table tbody tr:hover {
    background: #333;
}

.record-table tbody tr:last-child td {
    border-bottom: none;
}

.record-table tbody tr {
    line-height: 1.2;
}

.hostname {
    color: #667eea;
    font-weight: 500;
}

.ip-address {
    color: #4ade80;
}

.ptr-hostname {
    color: #94a3b8;
    font-style: italic;
}

.priority {
    color: #fbbf24;
    font-weight: 600;
}

.record-type-header {
    font-size: 0.95em;
    font-weight: 600;
    margin: 8px 0 4px 0;
    color: #fff;
    padding: 3px 0;
    border-bottom: 2px solid #667eea;
}

.record-type-header:first-child {
    margin-top: 0;
}

.no-data {
    color: #666;
    font-style: italic;
    padding: 6px;
    font-size: 0.85em;
    line-height: 1.2;
}

.error {
    background: #3a1a1a;
    color: #ff6b6b;
    padding: 6px;
    border-radius: 4px;
    border-left: 3px solid #ff6b6b;
    margin: 2px 0;
    font-size: 0.85em;
    white-space: pre-wrap;
    line-height: 1.2;
}

.whois-content {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    line-height: 1.3;
    color: #ccc;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
    background: #1a1a1a;
    border-radius: 4px;
    border: 1px solid #3a3a3a;
}

.whois-content strong {
    color: #667eea;
    font-weight: 600;
}

.whois-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    color: #667eea;
    font-size: 0.85em;
    line-height: 1.2;
}

.spinner-small {
    border: 2px solid #3a3a3a;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .domain-content {
        grid-template-columns: 1fr;
    }
    
    .whois-section {
        border-left: none;
        border-top: 1px solid #3a3a3a;
    }
}

@media (max-width: 768px) {
    .record-table {
        font-size: 0.75em;
    }
    
    .record-table th,
    .record-table td {
        padding: 6px 8px;
    }
}
