/* === Base Styles === */
body { 
    font-family: sans-serif; 
    padding: 20px; 
    background-color: #f8f9fa; /* Light gray to highlight the control panel */
    color: #333;
}

.app-container {
    max-width: 950px;
    margin: 0 auto;
}

h1 {
    font-size: 1.8em;
    color: #333;
    border-bottom: 2px solid #cce7ff;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.description {
    color: #666;
    margin-bottom: 20px;
}

/* === Button Styles === */
button {
    padding: 10px 20px;
    font-size: 1.1em;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}

button:hover:not(:disabled) {
    background-color: #0056b3;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Highlight the connect button */
.btn-connect {
    background-color: #28a745;
}

.btn-connect:hover:not(:disabled) {
    background-color: #218838;
}

/* === Status Message === */
.status-box {
    margin-bottom: 20px;
    font-weight: bold;
    color: #333;
    background-color: #e2e3e5;
    padding: 10px 15px;
    border-radius: 5px;
    display: inline-block;
}

/* === Control Panel === */
.control-panel {
    background-color: white;
    border: 1px solid #cce7ff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group:last-child {
    margin-bottom: 0;
    padding-top: 15px;
    border-top: 1px solid #e6f2ff;
}

.section-label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #0056b3;
}

/* Tone Selection Area (Horizontal layout) */
.tone-selection-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tone-selection-group .section-label {
    margin-bottom: 0;
}

select {
    padding: 8px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    flex-grow: 1;
    max-width: 400px;
}

.tone-buttons {
    display: flex;
    gap: 10px;
}

/* Checkbox Grid Layout */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* === Results Area === */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-box {
    padding: 15px;
    background-color: #f0f8ff;
    border: 1px solid #cce7ff;
    border-radius: 5px;
    font-size: 1.1em;
}

.result-box h3 {
    margin-top: 0;
    color: #0056b3;
}

/* Hide empty result boxes */
.result-box:empty {
    display: none;
}

.tone-name {
    font-weight: bold;
    color: #0056b3;
    font-size: 1.3em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: white;
}

th, td {
    border: 1px solid #cce7ff;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #e6f2ff;
    color: #0056b3;
    width: 35%;
}