body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

.feedback-input {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
}

.feedback-input textarea,
.feedback-input select,
.feedback-input button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.feedback-input button {
    background-color: #0056b3;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.feedback-input button:hover {
    background-color: #004494;
}

.feedback-result {
    text-align: left;
    font-size: 3em;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 8px;
    height: 280px; /* Defined height */
    display: flex;
    justify-content: left;
    align-items: left;
    flex-direction: column;
}


.feedback-summary  {
    text-align: left;
    font-size: 2em;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 8px;
    
    display: flex;
    justify-content: left;
    align-items: left;
    flex-direction: column;
}


.item-list {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
}

.item-list h3 {
    margin-bottom: 15px;
}

.item-list ul {
    list-style: none;
    padding: 0;
}

.item-list ul li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.item-list ul li:last-child {
    border-bottom: none;
}

@media screen and (max-width: 700px) {
    .feedback-input,
    .sentiment-result {
        width: 100%;
    }
}

#feedback-summary {
    margin-top: 20px;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#feedback-table {
    width: 100%;
    border-collapse: collapse;
}

#feedback-table th, #feedback-table td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

#feedback-table th {
    background-color: #e0e0e0;
}

#feedback-table tr:nth-child(even) {
    background-color: #f9f9f9;
}


.speech-bubble {
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 10px;
    margin: 10px 0;
    display: block; /* Changed from inline-block to block */
}

.speech-bubble:after {
    content: '';
    position: absolute;
    border-width: 10px;
    border-style: solid;
    border-color: #f1f1f1 transparent transparent transparent;
    bottom: -20px;
    left: 20px;
}

.positive-feedback {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.negative-feedback {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.average-display {
    font-size: 1.2em;
    color: #333; /* Dark text color for readability */
    background-color: #f9f9f9; /* Light background for contrast */
    border: 1px solid #ddd; /* Subtle border */
    border-radius: 8px; /* Rounded corners */
    padding: 10px 15px; /* Padding for spacing */
    margin-bottom: 20px; /* Margin for separation from other elements */
    text-align: center; /* Center the text */
    box-shadow: 0px 2px 4px rgba(0,0,0,0.1); /* Soft shadow for depth */
}

/* Optional: Hover effect for interactivity */
.average-display:hover {
    background-color: #f0f0f0;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.15);
}
#loading-icon {
    display: none;
    border: 5px solid #f3f3f3; /* Light grey */
    border-top: 5px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

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