/* General Body Styling */

body, .input-row, .head-logo, .title, .introduction, form, .graphs, .graph-container img {
    animation: fadeIn 2s ease-in-out;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Times New Roman', serif;
    color: #333;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

@keyframes fadeIn {
    0% {
      opacity: 0;
      transform: translateY(20px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
}

.header-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.head-logo {
    width: 200px; 
    height: auto;
    margin-bottom: 10px;
}

.title {
    font-size: 1.6em;
    margin: 10px 0;
}

.introduction {
    font-size: 1.05em;
    margin-bottom: 10px;
    font-weight: normal;
    color: #222;
    line-height: 1.6;
}

a {
    color: #8e4739;
    text-decoration: none;
}

a:hover {
    color: #6b3529;
    text-decoration: underline;
}


/* Flexbox Styling for Input Row */
.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.input-wrapper {
    flex: 1;
    min-width: 180px;
    max-width: calc(33.33% - 15px);
    display: flex;
    flex-direction: column;
}

.input-wrapper.full-width {
    flex: 100%;
    max-width: 100%;
}

.input-wrapper label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
    font-size: 0.85em;
}

/* Form Styling */
.tool-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 1200px;
    margin: 20px auto;
}

.tool-section h2 {
    color: #8e4739;
    margin: 0 0 10px 0;
    font-size: 1.4em;
    font-weight: bold;
}

.tool-description {
    color: #333;
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Input Styling */
input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    background-color: #fafafa;
    color: #333;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #8e4739;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(142, 71, 57, 0.1);
}

/* Button Styling */
button {
    background-color: #8e4739;
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #bc8c6c;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-weight: bold;
    margin-top: 10px;
}

.output-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 25px;
    background-color: #f0f8f0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.5s ease;
}

.output-container.highlight {
    animation: pulseHighlight 1.5s ease-out;
}

@keyframes pulseHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(142, 71, 57, 0.4);
        background-color: #fff8f0;
    }
    70% {
        box-shadow: 0 0 0 15px rgba(142, 71, 57, 0);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        background-color: #f0f8f0;
    }
}

.output-container h3 {
    color: #8e4739;
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-weight: bold;
}

.result-content {
    font-size: 0.95em;
    color: #000;
}

.result-value {
    font-weight: bold;
    color: #2c5f2d;
    font-size: 1.1em;
    margin: 5px 0;
}

.loading {
    color: #444;
    font-style: italic;
}

.error {
    color: #d32f2f;
    font-weight: bold;
}



/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }

    .head-logo {
        width: 120px;
    }
    
    .title {
        font-size: 1.3em;
    }
    
    .introduction {
        font-size: 0.9em;
    }
    
    .input-wrapper {
        min-width: 100%;
    }
    
    .tool-section,
    .output-container {
        padding: 15px;
        margin: 15px auto;
    }

    .tool-section h2 {
        font-size: 1.2em;
    }

    .form-section h3 {
        font-size: 0.95em;
    }
}