body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

h1 {
    text-align: center;
    color: #1a237e;
    margin-bottom: 25px;
    font-size: 2.5em;
}

h2 {
    color: #3f51b5;
    border-bottom: 2px solid #e8eaf6;
    padding-bottom: 10px;
    margin-top: 0;
}

.feature-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    transition: box-shadow 0.3s ease;
}

.feature-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

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

input[type="text"], select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.advanced-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.model-selection-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.model-selection-group select {
    flex-grow: 1;
}

.refresh-btn {
    padding: 10px 15px;
    background-color: #5c6bc0;
    font-size: 0.9em;
    flex-shrink: 0;
}

.refresh-btn:hover {
    background-color: #3f51b5;
    transform: none;
}

.refresh-btn:disabled {
    background-color: #9fa8da;
    cursor: not-allowed;
}

input[type="text"]:focus, select:focus, input[type="number"]:focus, textarea:focus {
    border-color: #3f51b5;
    outline: none;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
}

.collapsible {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
}

.collapsible-toggle {
    background-color: transparent;
    color: #3f51b5;
    cursor: pointer;
    padding: 12px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1em;
    font-weight: 600;
}

.collapsible-content {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.collapsible-content.active {
    padding: 15px;
    padding-top: 0;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    cursor: pointer;
}

.slider-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

input[type="range"] {
    width: 100%;
}

button {
    background-color: #3f51b5;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #303f9f;
    transform: translateY(-2px);
}

.preview-area {
    margin-top: 20px;
    padding: 15px;
    background-color: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 4px;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #777;
}

.preview-area img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.preview-area audio {
    width: 100%;
}
.preview-area p {
    white-space: pre-wrap; /* Preserve whitespace and newlines in text output */
}

.description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.header-links {
    text-align: right;
    margin-bottom: 10px;
}

.guide-link {
    font-size: 1em;
    color: #5c6bc0;
    text-decoration: none;
    font-weight: 500;
}

.guide-link:hover {
    text-decoration: underline;
}

.tooltip {
    cursor: help;
    color: #3f51b5;
    font-weight: bold;
    margin-left: 4px;
    display: inline-block;
    border-bottom: 1px dotted #3f51b5;
}

/* Custom Tooltip Popup */
.tooltip-popup {
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    z-index: 100;
    font-size: 0.9em;
    max-width: 250px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* So it doesn't interfere with other clicks */
}

.tooltip-popup.visible {
    opacity: 1;
}


.seed-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.seed-group input[type="number"] {
    flex-grow: 1;
    transition: background-color 0.3s, border-color 0.3s;
}

.seed-group input[type="number"]:disabled {
    background-color: #f0f0f0;
    border-color: #e0e0e0;
}

.seed-random-label {
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.api-note {
    background-color: #fff9c4;
    border-left: 5px solid #fbc02d;
    padding: 15px;
    margin: 15px 0;
    font-size: 0.95em;
}

.api-note p {
    margin: 0;
}

.api-note a {
    color: #3f51b5;
    font-weight: bold;
} 