body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #1a1a1a;
    color: #f0f0f0;
    margin: 0;
    /* Use padding on the container instead */
    height: 100vh;
    overflow: hidden; /* Prevent body from scrolling */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

h1, h2 {
    color: #e0e0e0;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.main-content {
    display: flex;
    gap: 20px;
    flex-grow: 1; /* Allow this to fill the container's height */
    min-height: 0; /* Important for flex children to shrink properly */
}

.form-container {
    flex: 1;
    background-color: #252525;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    overflow-y: auto; /* Make left panel scrollable */
}

.script-display-container {
    flex: 2;
    display: flex; /* Use flexbox to manage children */
    flex-direction: column;
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

input[type="text"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #333;
    color: #f0f0f0;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

.slider-group input[type="range"] {
    width: 100%;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #555;
    color: #fff;
    font-size: 1em;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #E91E63; /* Pink */
}

.btn-primary:hover {
    background-color: #C2185B; /* Darker Pink */
}

.btn:hover {
    background-color: #666;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.checkbox-group input[type="checkbox"] {
    width: auto; /* Override default input width */
    margin-right: 10px;
}

/* Container to display multiple checkbox groups in a row */
.checkbox-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
    gap: 20px; /* Space between checkbox groups */
}

/* Remove bottom margin from individual groups inside the row container */
.checkbox-row .checkbox-group {
    margin-bottom: 0;
}

/* Specific hover for non-primary buttons if needed */
#save-template:hover, #load-template:hover {
    background-color: #C2185B;
}


.script-output {
    background-color: #252525;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    overflow-y: auto; /* Make right panel scrollable */
    flex-grow: 1; /* Allow it to fill the script-display-container */
    position: relative; /* Needed for loader positioning */
}

.cost-display {
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #252525;
    border-radius: 8px;
    text-align: center;
    color: #ccc;
    font-size: 0.9em;
    border: 1px solid #333;
    display: none; /* Hidden by default, shown via JS */
}
.cost-display span {
    color: #E91E63; /* Pink accent color */
    font-weight: bold;
}

.script-step {
    background-color: #333;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #E91E63; /* Pink accent */
    position: relative;
}

.script-step h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #f0f0f0; /* Brighter title */
}

.script-step p {
    margin: 0;
    white-space: pre-wrap; /* Preserve whitespace and newlines */
    color: #ddd;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

.copy-btn:hover {
    background: #E91E63; /* Pink on hover */
}

.placeholder {
    color: #666;
    text-align: center;
    padding-top: 100px;
}

.infloww-controls .form-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.infloww-controls input {
    flex-grow: 1;
}

.template-controls .form-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.template-controls input, .template-controls select {
    flex-grow: 1;
}


/* --- Custom Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #252525;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E91E63;
}


/* --- Custom Slider Styling --- */
input[type=range] {
  -webkit-appearance: none; /* Hides the default slider so we can style it */
  width: 100%;
  background: transparent; /* Otherwise white in Chrome */
}

input[type=range]:focus {
  outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility */
}

/* Slider Thumb */
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #E91E63;
  cursor: pointer;
  margin-top: -6px; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
}

/* Slider Track */
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #444;
  border-radius: 3px;
}

/* --- Loading Animation --- */
.loader-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(37, 37, 37, 0.8); /* Semi-transparent overlay */
    z-index: 10;
}

.loading-dots {
    display: flex;
    align-items: center;
}

.loading-dots span {
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: #E91E63;
    border-radius: 50%;
    margin: 0 5px;
    animation: pulse 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #252525;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 500px;
    text-align: center;
    border-top: 4px solid #E91E63;
}

.modal-title {
    border-bottom: none;
    margin-top: 0;
}

.form-group-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.language-group {
    flex-grow: 1;
}