:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-700: #374151;
    --gray-900: #111827;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

header {
    padding: 20px 0;
    text-align: center;
}

.logo-container {
    margin-bottom: 5px;
}

.logo {
    max-height: 150px;
    max-width: 100%;
}

main {
    flex: 1;
    padding: 40px 0;
}

h1 {
    margin-bottom: 24px;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
}

.search-container {
    margin-bottom: 30px;
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-form {
    width: 100%;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.input-button-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 16px;
}

input[type="text"] {
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s;
    white-space: nowrap;
}

button:hover {
    background-color: var(--primary-dark);
}

.policy-notice {
    font-size: 13px;
    color: var(--gray-700);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.policy-notice a {
    color: var(--primary);
    text-decoration: none;
}

.policy-notice a:hover {
    text-decoration: underline;
}

.results-container {
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.results-container h2 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.whois-result {
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    background-color: var(--gray-100);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto; /* For horizontal scrolling if needed */
    white-space: pre-wrap; /* Allows text to wrap */
    word-wrap: break-word; /* Breaks long words */
    max-width: 100%; /* Ensures it doesn't overflow its container */
}

.result-item {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
}

.result-label {
    font-weight: 500;
    width: 180px;
    color: var(--gray-700);
}

.result-value {
    flex: 1;
}

footer {
    background-color: white;
    padding: 20px 0;
    border-top: 1px solid var(--gray-200);
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.copyright {
    font-size: 14px;
    color: var(--gray-700);
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 640px) {
    h1 {
        font-size: 24px;
    }

    .search-container, .results-container {
        padding: 16px;
    }

    .input-button-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-links a {
        margin: 0 10px;
        margin-bottom: 10px;
    }

    .result-item {
        flex-direction: column;
    }

    .result-label {
        width: 100%;
        margin-bottom: 4px;
    }
}

/* Medium screens */
@media (min-width: 641px) and (max-width: 768px) {
    .search-container, .results-container {
        padding: 20px;
    }

    .result-label {
        width: 150px;
    }
}