/* style.css - Enhanced for a more elegant look */

:root {
    --primary-color: #4CAF50; /* A soft green, can be changed */
    --primary-dark: #388E3C;
    --secondary-color: #607D8B; /* Blue-grey */
    --accent-color: #FFC107; /* Amber */
    --background-light: #f8f8f8;
    --background-dark: #e0e0e0;
    --text-color-dark: #333;
    --text-color-light: #fff;
    --border-color: #e0e0e0;
    --shadow-light: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-medium: 0 6px 20px rgba(0,0,0,0.12);
    --radius-small: 8px;
    --radius-medium: 12px;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to right bottom, #e3f2fd, #bbdefb); /* Light blue gradient */
    color: var(--text-color-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
}

.container {
    max-width: 900px;
    width: 95%; /* Make it slightly more responsive */
    margin: 40px auto;
    background: var(--background-light);
    padding: 35px 45px; /* Increased horizontal padding */
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    box-sizing: border-box; /* Include padding in width calculation */
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 35px;
    font-size: 2.5em; /* Slightly larger */
    font-weight: 700; /* Bolder */
    letter-spacing: -0.8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

label {
    display: block;
    margin-bottom: 12px; /* Increased margin */
    font-weight: 600; /* Bolder */
    color: var(--secondary-color);
    font-size: 1.1em;
}

textarea {
    width: calc(100% - 24px);
    padding: 15px; /* More padding */
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    box-sizing: border-box;
    resize: vertical;
    min-height: 200px; /* Taller */
    font-size: 1em;
    font-family: 'Consolas', 'Monaco', monospace; /* Monospace for code-like input */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08); /* Inner shadow */
}
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2); /* Primary color glow */
}

button {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding: 15px 35px; /* Larger padding */
    border: none;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: 1.2em; /* Larger font */
    font-weight: 600;
    display: block;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Button shadow */
}
button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px); /* Lift effect */
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#results {
    margin-top: 50px; /* More space */
    border-top: 1px dashed var(--border-color); /* Dashed separator */
    padding-top: 30px;
}

.result-item {
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 18px; /* More spacing */
    border-radius: var(--radius-small);
    background-color: var(--background-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light); /* Soft shadow */
}
.result-item:last-child {
    margin-bottom: 0;
}

/* Color adjustments for status */
.result-item.blocked {
    background-color: #ffebee; /* Light red */
    border-color: #ef9a9a;
}
.result-item.unblocked {
    background-color: #e8f5e9; /* Light green */
    border-color: #a5d6a7;
}
.result-item.healthy { /* Same as unblocked, or specific if needed */
    background-color: #e8f5e9;
    border-color: #a5d6a7;
}
.result-item.error {
    background-color: #fff8e1; /* Light yellow */
    border-color: #ffeb3b;
}
.result-item.invalid {
    background-color: #f0f4f7; /* Lighter grey-blue */
    border-color: #cfd8dc;
    opacity: 0.9;
}

.domain-info strong {
    font-size: 1.2em; /* Larger domain name */
    color: var(--primary-dark);
    margin-bottom: 8px; /* Space below domain */
    display: block;
}
.status-text {
    font-weight: 700; /* Bolder status text */
    font-size: 1.1em;
    margin-left: 5px;
}
.status-blocked {
    color: #C62828; /* Deeper Red */
}
.status-unblocked, .status-healthy {
    color: #2E7D32; /* Deeper Green */
}
.status-error {
    color: #FF8F00; /* Deeper Orange */
}
.status-invalid {
    color: var(--secondary-color); /* Matches grey-blue */
}

.reason-text {
    font-size: 0.9em;
    color: #666;
    margin-top: 8px; /* More spacing */
    font-style: italic;
}
.response-time-text {
    font-size: 0.9em;
    color: #777;
    margin-top: 8px;
    font-style: italic;
}

.loading-spinner {
    display: none;
    text-align: center;
    margin-top: 30px;
    font-size: 1.4em; /* Larger spinner text */
    color: var(--primary-color);
    font-weight: 600;
}

/* Header Links for Navigation */
.header-links {
    text-align: center;
    margin-bottom: 40px; /* More space */
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color); /* Separator */
}
.header-links a {
    margin: 0 18px; /* Increased margin between links */
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}
.header-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Styles for Login Page */
.login-container {
    max-width: 450px; /* Slightly wider */
    padding: 40px;
    margin: 80px auto; /* Keeps it centered */
    background: var(--background-light);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-medium);
    text-align: center;
    border: 1px solid var(--border-color);
}
.login-container h1 {
    color: var(--primary-color);
    margin-bottom: 35px;
    font-size: 2.2em;
}
.login-container label {
    text-align: left;
    margin-bottom: 10px;
    color: var(--text-color-dark);
}
.login-container input[type="text"],
.login-container input[type="password"] {
    width: calc(100% - 24px);
    padding: 14px; /* More padding */
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
}
.login-container button {
    width: 100%;
    padding: 15px; /* Consistent with main button */
    font-size: 1.2em;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.login-container button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Management page specific styles */
.form-section input[type="text"] {
    width: calc(100% - 24px); /* Full width minus padding */
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-section input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
}

.domain-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    box-shadow: var(--shadow-light);
    border-radius: var(--radius-small);
    overflow: hidden; /* For rounded corners on table */
}
.domain-table th, .domain-table td {
    border: 1px solid var(--border-color);
    padding: 14px;
    text-align: left;
}
.domain-table th {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    font-weight: 600;
    font-size: 1.05em;
}
.domain-table tr:nth-child(even) {
    background-color: #fbfbfb;
}
.domain-table tr:hover {
    background-color: #f0f0f0;
}
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center; /* Center buttons in cell */
}
.action-buttons button {
    padding: 8px 15px;
    font-size: 0.9em;
    width: auto;
    display: inline-block;
    box-sizing: content-box;
    box-shadow: none; /* Remove button shadow for small buttons */
}
.action-buttons button:hover {
    transform: translateY(0); /* Remove lift effect for small buttons */
    box-shadow: none;
}
.delete-button {
    background-color: #dc3545; /* Red */
}
.delete-button:hover {
    background-color: #c82333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 25px;
    }
    h1 {
        font-size: 2em;
    }
    button {
        padding: 12px 25px;
        font-size: 1.1em;
    }
    .header-links a {
        margin: 0 10px;
        font-size: 0.95em;
    }
    .domain-table th, .domain-table td {
        padding: 10px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 1.8em;
    }
    label {
        font-size: 1em;
    }
    textarea, input[type="text"], input[type="password"] {
        padding: 10px;
        font-size: 0.9em;
    }
    button {
        padding: 10px 15px;
        font-size: 1em;
    }
    .header-links {
        flex-direction: column; /* Stack links vertically */
        align-items: center;
        margin-bottom: 20px;
    }
    .header-links a {
        margin: 8px 0;
    }
    .domain-table th, .domain-table td {
        padding: 8px;
        font-size: 0.8em;
    }
    .status-badge {
        font-size: 0.75em;
        padding: 4px 8px;
    }
