body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a2e;
    color: #e0e0e0;
    line-height: 1.6;
    margin: 0;
    padding-top: 80px; /* To avoid content overlap with fixed navbar */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* --- NAVBAR STYLES --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #24243e; /* Dark background for navbar */
    padding: 0 30px; /* Adjusted padding, 0 top/bottom since height is fixed */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 60px;
    box-sizing: border-box;
}

.nav-left .brand { /* For your <span class="brand"> within .nav-left */
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    user-select: none;
    line-height: 60px; /* Align brand text vertically */
}

.nav-right { /* Container for your links */
    display: flex;
    align-items: center;
    height: 100%;
}

/* Default style for plain text navbar links */
.nav-right a {
    text-decoration: none;
    color: white;
    background-color: transparent; /* No background for plain text links */
    padding: 10px 12px; /* Adjust padding for text links */
    margin-left: 12px; /* Spacing between links */
    border-radius: 0; /* No border-radius for text links */
    font-weight: 600;
    font-size: 0.95em;
    transition: color 0.2s ease, transform 0.1s ease; /* Transition for color */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    border: none; /* No border for text links */
    line-height: 1.2;
}

/* Hover effect for plain text navbar links */
.nav-right a:hover {
    color: #a2b9ff; /* Change text color on hover */
    background-color: transparent; /* Ensure no background on hover */
    transform: translateY(-1px);
}

/* Style for the ACTIVE link to make it a prominent button */
.nav-right a.active {
    color: #1a1a2e; /* Darker text for contrast on light blue active background */
    background-color: #a2b9ff; /* THIS IS THE REQUESTED BLUE for active link */
    padding: 10px 18px; /* Padding for button appearance */
    border-radius: 20px; /* More rounded for a pill shape like example */
    border: 1px solid #82aaff; /* Border to complement the blue */
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

/* Hover effect for the ACTIVE button link */
.nav-right a.active:hover {
    background-color: #8cb0ff; /* Slightly darker shade of the active blue on hover */
    color: #101020; /* Keep dark text or adjust if needed */
    transform: translateY(-1px);
    border-color: #729fea; /* Slightly adjusted border for hover */
}


/* --- END OF NAVBAR STYLES --- */

.main-content-wrapper { /* Your existing class name */
    flex-grow: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 20px;
}

.container {
    background-color: #24243e;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 700px;
    text-align: center;
    margin-top: 20px; /* Spacing below fixed navbar if main-content-wrapper doesn't have enough padding-top */
    margin-bottom: 20px;
    box-sizing: border-box;
}

.container.page-content {
    text-align: left;
}
.container.page-content h1,
.container.page-content h2 {
    text-align: center;
}

h1 {
    color: #82aaff;
    margin-bottom: 30px;
    font-size: 2.2em;
    letter-spacing: 1px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

form div {
    display: center;
    flex-direction: column;
    align-items: flex-start;
}

label {
    font-size: 1.1em;
    color: #c0c0e0;
    margin-bottom: 8px;
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #4f4f7a;
    border-radius: 8px;
    background-color: #1e1e38;
    color: #e0e0e0;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus {
    border-color: #82aaff;
    box-shadow: 0 0 0 3px rgba(130, 170, 255, 0.25);
    outline: none;
}

.text-danger {
    font-size: 0.9em;
    color: #ff6b6b;
    margin-top: 5px;
}

button[type="submit"] {
    background-image: linear-gradient(to right, #768fff, #5068d9);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-image 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.5px;
}

button[type="submit"]:hover {
    background-image: linear-gradient(to right, #5068d9, #768fff);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

h2 {
    color: #a2b9ff;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.6em;
}

.result-message p {
    font-size: 1.2em;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
}

.result-message strong {
    margin-right: 10px;
}

.status-up {
    background-color: rgba(46, 204, 113, 0.15);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.status-down {
    background-color: rgba(231, 76, 60, 0.15);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

.error-details {
    font-size: 0.95em;
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    border: 1px solid #ffc107;
    text-align: left;
}

.footer {
    background-color: #24243e; /* Same as navbar */
    color: #c0c0e0;
    text-align: center;
    padding: 20px 30px;
    font-size: 0.9rem;
    width: 100%;
    user-select: none;
    border-top: 1px solid #4f4f7a; /* Separator line */
    box-sizing: border-box;
    margin-top: auto;
    height: 60px; /* Same height as navbar */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding-top: 70px; /* Adjust if navbar height changes */
        padding-left: 10px;
        padding-right: 10px;
    }
    .navbar {
        padding: 0 15px;
        height: 50px; /* Adjust navbar height */
    }
    .nav-left .brand {
        font-size: 1.3em;
        line-height: 50px; /* Match navbar height */
    }
    .nav-right a { /* Default for text links */
        font-size: 0.85em;
        padding: 8px 10px; /* Adjust for text links */
        margin-left: 8px;
    }
    .nav-right a.active { /* Active button on smaller screens */
         padding: 8px 12px; /* Ensure button padding is distinct */
    }
    .container {
        padding: 20px 25px;
        margin-left: 10px;
        margin-right: 10px;
    }
    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.4em;
    }
    input[type="text"], button[type="submit"], .result-message p {
        font-size: 0.95em;
    }
    label {
        font-size: 1em;
    }
    .footer {
        height: 50px; /* Match navbar height */
        padding: 15px 15px;
    }
}

@media (max-width: 520px) { /* Breakpoint for stacking navbar */
    body {
        padding-top: 120px; /* Needs to be enough for stacked navbar */
    }
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    .nav-left {
        margin-bottom: 10px;
        width: 100%;
        text-align: center;
    }
    .nav-left .brand {
        line-height: normal;
    }
    .nav-right {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .nav-right a { /* Default for text links */
        margin: 5px;
        font-size: 0.9em;
    }
     .nav-right a.active { /* Active button on very small screens */
        padding: 8px 15px; /* Ensure button padding */
    }
    h1 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }
    h2 {
        font-size: 1.3em;
    }
    .container {
        padding: 15px 20px;
        margin-top: 10px;
    }
    button[type="submit"] {
        padding: 10px 15px;
    }
    input[type="text"] {
        padding: 10px 12px;
    }
    .result-message p {
        font-size: 0.9em;
        padding: 10px;
    }
    .footer {
        height: auto;
        padding: 10px 15px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-section {
    animation: fadeIn 0.5s ease-out;
}
