/* General Page Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding-top: 70px; 
    background-color: #f0f2f5;
    color: #333;
    /* Smooth scrolling for anchor links */
    scroll-behavior: smooth;
}

/* --- NAVBAR STYLES --- */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 15px;
    position: fixed; /* Keeps navbar at the top */
    top: 0;
    width: 100%;
    z-index: 1000; /* Ensures it stays on top of other content */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    
    /* --- CHANGED FOR VERTICAL LAYOUT --- */
    display: flex;
    flex-direction: column; /* Stacks Brand and Links vertically */
    justify-content: center; /* Centers the group vertically in the navbar */
    align-items: center;     /* Centers the group horizontally */
    /* -------------------------------- */
    
    box-sizing: border-box;
    gap: 10px; /* Adds space between the Brand and the Links */
}

/* --- GLOBAL BOX-SIZING FIX (Recommended) --- */
*, *::before, *::after {
    box-sizing: border-box;
}

.navbar-brand {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ecf0f1;
    text-align: center; /* Ensures brand text is centered */
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Keeps links in a row */
    gap: 20px;     /* Space between links */
}

.nav-links a {
    text-decoration: none;
    color: #bdc3c7;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #fff;
}

/* --- CONTAINER STYLES --- */
.container {
    background-color: white;
    padding: 40px;
    margin: 100px 20px 30px 20px; /* Top margin accounts for fixed navbar */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    /* Ensure text inside container is always readable */
    color: #333; 
}

h1 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 0;
}

/* --- NAVBAR INSIDE CONTAINER STYLES --- */
.inner-nav {
    background-color: #34495e;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inner-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    background-color: #2c3e50;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.inner-nav a:hover {
    background-color: #3498db;
}

/* --- SECTION STYLES (This is what makes Exercise 2 look like Exercise 3) --- */
section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #fafafa;
    color: #333; /* Ensure section text is readable */
}

h2 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* --- OUTPUT BOX STYLES --- */
.output {
    margin-top: 15px;
    padding: 15px;
    border: 1px dashed #ccc;
    background-color: #fff;
    min-height: 50px;
    color: #333; /* Ensure output text is readable */
    border-radius: 4px;
}

/* --- BUTTON STYLES --- */
button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 1rem;
}

button:hover {
    background-color: #2980b9;
}

/* --- INPUT STYLES (Added for consistency) --- */
input[type="text"], input[type="number"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    margin-bottom: 10px;
}




