
/* GLOBAL RESET & BODY */
* {
    box-sizing: border-box; /* Ensures padding doesn't affect total width */
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    padding: 40px 20px;
}

/* MAIN CONTAINER */
.calculator-container {
    background-color: #ffffff;
    max-width: 800px; /* Wide enough for the table */
    margin: 0 auto; /* Centers the container */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    font-weight: 600;
}

/* INPUTS FORM STYLING */
.input-group {
    margin-bottom: 20px;
}

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

input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: #007bff; /* Blue highlight on focus */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

/* BUTTON STYLING */
button {
    width: 100%;
    padding: 14px;
    background-color: #28a745; /* Success Green */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

button:hover {
    background-color: #218838;
}

button:active {
    transform: translateY(1px); /* Slight press effect */
}

/* RESULTS DISPLAY AREA */
#result {
    margin-top: 25px;
    text-align: center;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 6px;
    color: #2c3e50;
}

/* AMORTIZATION TABLE STYLING */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    font-size: 14px;
}

/* Header Styling */
thead th {
    background-color: #343a40;
    color: #ffffff;
    text-align: left;
    padding: 12px;
    position: sticky; /* Keeps header visible if you add scroll later */
    top: 0;
}

/* Cell Styling */
tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

/* Zebra Striping (Alternating row colors) */
tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Hover effect on rows */
tbody tr:hover {
    background-color: #e2e6ea;
}

/* RESPONSIVE DESIGN (Mobile adjustments) */
@media (max-width: 600px) {
    .calculator-container {
        padding: 15px;
    }
    
    table {
        font-size: 12px; /* Smaller text on phones */
    }
    
    th, td {
        padding: 8px 5px; /* Less padding on phones */
    }
}