:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent: #5293e4;
    --accent-hover: #1353a0;
    --tertiary: #373e50;
    --tertiary-hover: #273149;
    --error: #cf6679;
    --success: #03dac6;
    --border: #333333;
    --light-border: #eeeeee;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

header .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

header p {
    color: var(--text-secondary);
    margin-top: 0;
}

.equillabs-logo {
    position: absolute;
    top: 25px;
    left: 30px;
}
.equillabs-logo img {
    height: 20px;
}

.top-links {
    position: absolute;
    top: 15px;
    right: 30px;
    display: flex;
    gap: 3px;
    flex-direction: column;
    align-items: flex-end;
}

.top-link {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    z-index: 1;
}

.top-link svg {
    transition: all 0.2s ease-in-out;
}

.top-link:hover {
    opacity: 1;
}

.top-link.-github:hover svg {
    fill: #0984e3;
    transform: scale(1.1);
}

.top-link.-support:hover svg {
    fill: #fd79a8;
    transform: scale(1.3);
}

.top-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* media query for smaller screens */
/* stacked layout, hide top links */
@media screen and (max-width: 800px) {
    .equillabs-logo {
        display: none;
    }

    .top-links {
        display: none !important;
    }
}

main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-section, .results-section {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
}

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.slider-group {
    margin-bottom: 1rem;
}

input[type="range"] {
    width: 100%;
    margin-top: 0.5rem;
    background-color: var(--bg-tertiary);
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

button {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: max-content;
}

button:hover {
    background-color: var(--accent-hover);
}

.results-container, .analysis-container {
    margin-bottom: 1.5rem;
}

.results-container h2, .analysis-container h2 {
    margin-bottom: 1rem;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

#batch-results, #analysis-results {
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    padding: 1rem;
    min-height: 200px;
    white-space: pre-wrap;
    font-family: 'Consolas', 'Courier New', monospace;
}

.placeholder {
    color: var(--text-secondary);
    font-style: italic;
}

.batch {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: rgba(98, 0, 238, 0.1);
    border-left: 3px solid var(--accent);
    border-radius: 0 4px 4px 0;
}

.batch-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.batch-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sentence {
    padding: 0.25rem 0;
    border-bottom: 1px dashed var(--light-border);
}

.sentence:last-child {
    border-bottom: none;
}

.analysis-item {
    white-space: nowrap;
    margin-right: 10px;
}
footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .controls {
        grid-template-columns: 1fr;
    }
}

/* Form actions container */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* Toggle container */
.toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Toggle label */
.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-label span {
    margin-right: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .3s;
    border-radius: 20px;
    width: 40px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.toggle-description {
    font-size: 0.8em;
    opacity: .8;
    width: 250px;
}

input:checked + .toggle-slider {
    background-color: var(--accent);
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Existing loading animation */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Add styles for textarea action buttons */
.textarea-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.action-btn {
    padding: 8px 16px;
    background-color: var(--bg-tertiary );
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}
