body {
    font-family: sans-serif;
    background-color: #f0f4f8;
    margin: 0;
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #333;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.search-container {
    display: flex;
    gap: 5px;
}

.search-container input {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.search-container button {
    background-color: #555;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.search-container button:hover {
    background-color: #777;
}

main, .extra-section {
    text-align: center;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    max-width: 600px;
}

main {
    flex: 1;
}

.button-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 1rem;
}

h1, h2 {
    color: #333;
}

button {
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

#myButton {
    background-color: #007bff;
}

#myButton:hover {
    background-color: #0056b3;
}

#secondButton {
    background-color: #28a745;
}

#secondButton:hover {
    background-color: #1e7e34;
}

/* Calculator Specific Styles */
.calculator {
    display: inline-block;
    background-color: #ddd;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    width: 100%;
    max-width: 300px;
}

.calc-display {
    width: 100%;
    height: 40px;
    font-size: 24px;
    text-align: right;
    margin-bottom: 1rem;
    padding: 5px;
    border: 1px solid #aaa;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-buttons button {
    padding: 15px;
    font-size: 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #fff;
    color: #333;
    width: 100%; /* Buttons fill their grid cell */
}

.calc-buttons button:hover {
    background-color: #e6e6e6;
}

.calc-buttons button.op {
    background-color: #ff9f43;
    color: white;
}

.calc-buttons button.op:hover {
    background-color: #e08e31;
}

.calc-buttons button.clear {
    background-color: #ee5253;
    color: white;
}

.calc-buttons button.clear:hover {
    background-color: #d13e3e;
}

.calc-buttons button.equal {
    grid-column: span 2;
    background-color: #10ac84;
    color: white;
}

.calc-buttons button.equal:hover {
    background-color: #0e8f6e;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}