/* ======== Navbar ======== */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.navbar-logo img {
    height: 50px;
    width: auto;
    display: block;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.navbar-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-menu li a:hover {
    color: #4CAF50;
}

.navbar-button {
    background-color: #4A154B;
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.navbar-button:hover {
    background-color: #45a049;
}

/* ======== Footer ======== */
.main-footer {
    background: #f4f4f4;
    width: 100%;
    text-align: center;
    padding: 40px 20px;
    font-size: 15px;
    color: #777;
    margin-top: 60px;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.03);
}

.main-footer p {
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ======== General Styles ======== */
body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ======== Container ======== */
.container {
    width: 90%;
    max-width: 800px;
    background: #ffffff;
    padding: 30px 20px;
    margin-top: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

/* ======== Header Title ======== */
header {
    width: 100%;
    background: #f9f9f9;
    padding: 30px 20px 20px 20px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* SIN background aquí */
}

#page-title {
    font-size: 28px;
    font-weight: 700;
    color: #3d3d3d;
    margin: 0;
    display: block;
}

.header-underline {
    width: 0;
    height: 3px;
    background-color: #4A154B;
    border-radius: 2px;
    margin: 10px auto 20px;
    animation: grow-line 1s ease forwards;
}

@keyframes grow-line {
    to {
        width: 500px;
    }
}

.header-subtitle {
    margin-top: 10px;
    font-size: 18px;
    color: #555;
}

/* ======== Input Group ======== */
.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
}

input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-style: italic;
    box-sizing: border-box;
    margin-bottom: 10px;
}

input[type="number"]:focus {
    border-color: #4A154B;
    outline: none;
}

/* ======== Button ======== */
button {
    width: 100%;
    padding: 12px;
    background-color: #4A154B;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #6d076f;
}

/* ======== Results Section ======== */
#results {
    margin-top: 30px;
}

#results p {
    font-size: 18px;
    color: #555;
    margin: 10px 0;
}

/* ======== Highlighted Loss Message ======== */
#lossMessage {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    background-color: #f8d7da;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    text-align: center;
    display: none;
}

/* ======== Chart ======== */
canvas {
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
}