body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 10px; /* Reduced from 20px */
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #2c3e50;
    margin-bottom: 15px; /* Reduced from 30px */
}

.container {
    background-color: #ffffff;
    padding: 20px; /* Reduced from 30px */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
}

#search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 10px; /* Reduced from 20px */
}

#search-input {
    flex-grow: 1;
    padding: 10px 12px; /* Reduced from 12px 15px */
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

#search-form button {
    padding: 10px 15px; /* Reduced from 12px 20px */
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#search-form button:hover {
    background-color: #2980b9;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto; /* Reduced from 20px */
}

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

#results table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px; /* Reduced from 20px */
}

#results th, #results td {
    border: 1px solid #eee;
    padding: 8px; /* Reduced from 12px */
    text-align: left;
    font-size: 14px;
}

#results th {
    background-color: #f8f8f8;
    font-weight: bold;
    color: #555;
}

#results tr:nth-child(even) {
    background-color: #f9f9f9;
}

#results tr:hover {
    background-color: #f1f1f1;
}

.copy-btn {
    padding: 6px 10px; /* Reduced from 8px 12px */
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background-color: #27ae60;
}

.error {
    color: #e74c3c;
    font-weight: bold;
    text-align: center;
    margin-top: 10px; /* Reduced from 20px */
}

/* AIVIO Minimal UI (Postcode) - Adjustments for reduced whitespace */
.divider{height:20px; margin:15px 0;}
.doc{padding:15px;}
.doc h2{font-size:20px; margin:0 0 5px;}
.doc h3{font-size:16px; margin:10px 0 4px;}
.doc p{margin:5px 0 8px;}
.doc ul{padding-left:15px; margin:5px 0 10px;}
.examples{margin-top:8px; gap:8px;}
details{padding:8px 10px;}
details + details{margin-top:8px;}
.footer{margin:20px 0;}

/* Responsive adjustments */
@media (max-width: 600px) {
    #search-form {
        flex-direction: column;
    }

    #search-form button {
        width: 100%;
    }

    #results th, #results td {
        padding: 6px; /* Reduced from 8px */
        font-size: 11px; /* Reduced from 12px */
    }

    .container {
        padding: 15px; /* Reduced from 20px */
    }
}