/* General Style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7fa;
    color: #333;
    line-height: 1.6;
}

h1, h2 {
    color: #4a90e2;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 1px;
}

header p {
    font-size: 16px;
    color: #666;
}

/* Form Section */
.form-section {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-section h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #4a90e2;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: all 0.3s ease-in-out;
    overflow-wrap: break-word;
}

.input-group input:focus {
    border-color: #4a90e2;
    background-color: #fff;
    outline: none;
}

.submit-btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 16px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: #357ab7;
}

/* Results & Advice Section */
.results, .advice {
    margin-top: 30px;
}

.output {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    max-height: 600px;
    overflow-y: auto;
}

.output h3 {
    font-size: 20px;
    color: #4a90e2;
    margin-bottom: 20px;
}

.output p {
    font-size: 16px;
    color: #555;
}

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 9999;
}

.loading .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}

.loading p {
    color: #4a90e2;
    font-size: 16px;
    margin-top: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 28px;
    }

    .form-section h2, .results h2, .advice h2 {
        font-size: 20px;
    }

    .input-group input, .submit-btn {
        font-size: 14px;
    }
}
