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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    font-size: 1rem;
}

.search-box {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.search-box input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.search-box button {
    padding: 16px 32px;
    background: #2563eb;
    color: #fff;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: #1d4ed8;
}

.search-box button:disabled {
    background: #93b4f5;
    cursor: not-allowed;
}

/* Loading */
#loading {
    text-align: center;
    padding: 40px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error */
#error {
    margin-top: 24px;
    padding: 16px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
}

/* Result */
#result {
    margin-top: 32px;
}

.result-header {
    margin-bottom: 24px;
}

.result-header h2 {
    font-size: 1.4rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.result-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: #888;
}

.result-meta .cached-badge {
    background: #dcfce7;
    color: #16a34a;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.result-section {
    margin-bottom: 24px;
}

.result-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

#parsed-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

#parsed-table tr:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

#parsed-table td {
    padding: 10px 16px;
    font-size: 0.9rem;
}

#parsed-table td:first-child {
    font-weight: 600;
    color: #555;
    width: 200px;
    background: #fafafa;
}

#parsed-table td:last-child {
    color: #333;
    word-break: break-all;
}

#raw-whois {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    max-height: 600px;
    overflow-y: auto;
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .container {
        padding: 30px 16px 30px;
    }

    header h1 {
        font-size: 1.6rem;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        padding: 14px;
    }

    #parsed-table td:first-child {
        width: 120px;
    }
}
