:root {
    --bg: #f8fafc;
    --bg-soft: #e2e8f0;
    --text: #1e293b;
    --text-muted: #475569;
    --border: #cbd5e1;
    --accent: #0284c7;
}

body.theme-dark {
    --bg: #0f172a;
    --bg-soft: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
    --accent: #38bdf8;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, sans-serif;
}

.app-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.title {
    margin: 0;
    font-size: 22px;
}

.subtitle {
    margin: 4px 0 0;
    color: var(--text-muted);
}

#logoHeaderSection {
    display: flex;
    flex-direction: row;
    align-items: center;
}

#logoid {
    width: 56px;
    height: 56px;
    margin-right: 12px;
    background-color: rgb(226, 238, 243);
    border-radius: 8px;
}

.container {
    padding: 20px;
    max-width: 1300px;
    margin: auto;
}

.fullwidth {
    width: 100%;
    display: flex;
    justify-content: center;

    top: 10px;
    position: sticky;
    margin-bottom: 30px;
}

/* TOP CONTROLS */
.top-controls {
    display: block;
    padding: 20px;
    background-color: var(--bg-soft);
    width: 80%;
    max-width: 1000px;
    border-radius: 20px;
    border: 1px solid #ababab;
    margin: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#fontSize {
    width: 94%;
}

#hidebutton {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
}

#toggleChevron{
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: 32px;
    background-color: var(--bg);
    color: var(--text);
    width: 32px;
    height: 32px;
}

.settingtext {
    cursor: pointer;
}

.centertext {
    display: flex;
    justify-content: space-between;
}

.counter {
    justify-content: start;
}

#fontCountValue{
    margin-left: 10px;
}

#sampleText {
    background-color: var(--bg);
}

.control-group.wide {
    align-items: center;
    width: 100%;
    margin: 4px 0;
}

.control-group.wide input[type="text"],
.control-group.wide input[type="range"] {
    width: 100%;
    box-sizing: border-box;
}

label {
    display: block;
    /* margin-bottom: 4px; */
    font-size: 14px;
    color: var(--text-muted);
}

input[type="text"] {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
}

/* UPLOAD GRID */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.upload-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
}

.dropzone {
    border: 2px dashed var(--border);
    padding: 25px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
}

.dropzone:hover {
    border-color: var(--accent);
}

.font-info {
    margin-top: 12px;
}

/* COMPARE GRID */
.compare-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.compare-column {
    min-width: 0;
}

.compare-column h2 {
    margin-bottom: 10px;
    font-size: 20px;
}

.preview-title {
    font-weight: bold;
    margin: 15px 0 8px;
    opacity: 0.8;
}

.preview-item {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    margin-bottom: 10px;
    min-height: 100px;
    max-height: 300px;
    overflow: hidden;
    overflow-wrap: break-word; 
}

.compare-wrapper {
    width: 100%;
    max-width: 100%;     /* verhindert, dass es breiter wird */
    overflow-x: hidden;  /* falls etwas doch raus will */
    margin-bottom: 10px;
}  

/* Titel der Varianten fixieren */
.preview-item strong {
    font-family: system-ui, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: block;
    margin-bottom: 4px;
}

/* Slider kompakt */
#fontCount {
    width: 250px;
}

/* BUTTON */
.btn.small {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    cursor: pointer;
}

#btnDE, #btnEN {
    cursor: pointer;
    padding: 6px 12px;
    background-color: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
}

footer {
    position: relative;
    left: 0; right: 0; bottom: 0;
    text-align: center;
    padding: 12px 24px;
    background-color: var(--bg-soft);
    color: var(--text);
    box-sizing: border-box;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
}

/* RESPONSIVE FALLBACK (für sehr kleine Screens) */
@media (max-width: 800px) {
    .compare-grid,
    .upload-grid {
        grid-template-columns: 1fr;
    }
}
