body {
font-family: Inter, Arial, sans-serif;
margin: 0;
background: #f5f7fb;
color: #111827;
}

.layout {
display: flex;
min-height: 100vh;
}

.sidebar {
width: 220px;
background: white;
padding: 20px;
border-right: 1px solid #d9dee7;
display: flex;
flex-direction: column;
justify-content: space-between;
position: sticky;
top: 0;
height: 100vh;
box-sizing: border-box;
}

.logoWrap {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 22px;
}

.logoWrap img {
width: 190px;
max-width: 100%;
height: auto;
display: block;
}

.sidebarTop,
.sidebarBottom {
display: flex;
flex-direction: column;
gap: 12px;
}

.sidebar button {
width: 100%;
padding: 13px 14px;
border: none;
border-radius: 12px;
background: #2563eb;
color: white;
font-size: 16px;
font-weight: 600;
cursor: pointer;
}

.sidebar button:hover {
background: #1d4ed8;
}

.content {
flex: 1;
padding: 28px 34px 40px;
box-sizing: border-box;
}

.pageTitleRow {
display: flex;
justify-content: center;
margin-bottom: 18px;
}

.pageTitleRow h1 {
margin: 0;
font-size: 34px;
font-weight: 800;
text-align: center;
}

.sectionHeading {
display: flex;
justify-content: center;
margin: 6px 0 14px;
}

.sectionHeading h3 {
margin: 0;
font-size: 20px;
font-weight: 700;
}

.grid2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 18px;
margin-bottom: 22px;
}

.colStack {
display: flex;
flex-direction: column;
gap: 14px;
}

input,
select,
textarea {
width: 100%;
padding: 12px 14px;
border: 1px solid #d6dbe4;
border-radius: 12px;
font-size: 15px;
background: white;
box-sizing: border-box;
outline: none;
}

input:focus,
select:focus,
textarea:focus {
border-color: #93c5fd;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

textarea {
min-height: 50px;
resize: vertical;
}

.bottomArea {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 22px;
margin-bottom: 24px;
align-items: start;
}

.bigBox {
width: 100%;
min-width: 0;
}

.bigBox h3 {
margin: 0 0 12px;
font-size: 18px;
font-weight: 700;
}

.uploadFancy {
width: 100%;
height: 170px;
border: 2px dashed #d1d5db;
border-radius: 16px;
background: white;
padding: 14px;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: stretch;
justify-content: flex-start;
text-align: center;
cursor: pointer;
overflow: hidden;
min-width: 0;
}

.uploadFancy span {
font-size: 18px;
font-weight: 700;
margin-top: 4px;
}

.uploadFancy small {
font-size: 14px;
color: #6b7280;
margin-top: 2px;
}

.previewInside {
width: 100%;
max-width: 100%;
display: flex;
flex-wrap: nowrap;
gap: 10px;
justify-content: flex-start;
align-items: center;
margin-top: 14px;
overflow-x: auto;
overflow-y: hidden;
min-height: 94px;
padding: 4px 0 8px 0;
box-sizing: border-box;
min-width: 0;
scrollbar-width: thin;
}

.previewItem {
position: relative;
width: 84px;
height: 84px;
flex: 0 0 84px;
margin-top: 4px;
}

.previewItem img {
width: 84px;
height: 84px;
object-fit: cover;
object-position: center center;
border-radius: 10px;
display: block;
background: #f3f4f6;
}

.removeBtn {
position: absolute;
top: -6px;
right: -6px;
width: 24px;
height: 24px;
border-radius: 50%;
border: none;
background: #111827;
color: white;
font-size: 15px;
line-height: 24px;
padding: 0;
cursor: pointer;
z-index: 2;
}

.layoutPickerBox,
.layoutCard,
.layoutIconCard,
.layoutClassicIcon,
.layoutModernIcon,
.layoutBrochureIcon {
display: none !important;
}

.toolbar {
margin-top: 10px;
}

.toolbar button {
border: none;
border-radius: 12px;
padding: 13px 20px;
background: #2563eb;
color: white;
font-size: 15px;
font-weight: 700;
cursor: pointer;
}

.toolbar button:hover {
background: #1d4ed8;
}

.toolbar button:disabled,
#generateBtn:disabled {
background: #9ca3af;
cursor: not-allowed;
}

.generateHint {
margin: 8px 0 0;
color: #6b7280;
font-size: 14px;
}

.hidden {
display: none !important;
}

.loadingOverlay,
.modalOverlay {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.22);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
}

.loadingBox,
.modalBox {
background: white;
border-radius: 20px;
padding: 24px 28px;
min-width: 280px;
text-align: center;
box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.modalBox p {
margin: 0 0 12px 0;
font-size: 18px;
font-weight: 600;
}

.modalBox button {
margin-top: 18px;
border: none;
border-radius: 12px;
padding: 11px 22px;
background: #2563eb;
color: white;
font-size: 15px;
font-weight: 700;
cursor: pointer;
}

.spinner {
width: 48px;
height: 48px;
border: 5px solid #dbeafe;
border-top: 5px solid #2563eb;
border-radius: 50%;
margin: 0 auto 16px;
animation: spin 0.9s linear infinite;
}

@keyframes spin {
to {
transform: rotate(360deg);
}
}

.authPage {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: #f5f7fb;
padding: 24px;
box-sizing: border-box;
}

.authCard {
width: 100%;
max-width: 460px;
background: white;
border-radius: 24px;
padding: 34px 30px;
box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
text-align: center;
box-sizing: border-box;
}

.authLogo {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 16px;
}

.authLogo img {
max-width: 210px;
height: auto;
display: block;
}

.authCard h1 {
margin: 0 0 22px;
font-size: 28px;
}

.authCard input {
margin-bottom: 14px;
}

.authCard button {
width: 100%;
border: none;
border-radius: 14px;
padding: 14px 18px;
background: #2563eb;
color: white;
font-size: 16px;
font-weight: 700;
cursor: pointer;
margin-top: 6px;
}

.authCard button:hover {
background: #1d4ed8;
}

.authCard a {
color: #2563eb;
font-weight: 700;
text-decoration: none;
}

.authCard a:hover {
text-decoration: underline;
}

.card,
.projectCard {
background: white;
border-radius: 18px;
padding: 28px;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
box-sizing: border-box;
margin-bottom: 24px;
max-width: 1100px;
overflow: hidden;
}

.projectCard h3,
.viewerCard h2,
.editorCard h2 {
margin-top: 0;
}

.projectActions,
.viewerActions,
.editorActions {
display: flex;
gap: 12px;
flex-wrap: wrap;
margin-bottom: 18px;
align-items: center;
justify-content: center;
}

.projectActions button,
.viewerActions button,
.editorActions button {
border: none;
border-radius: 12px;
padding: 12px 20px;
background: #2563eb;
color: white;
margin-bottom: 0;
font-size: 15px;
font-weight: 700;
cursor: pointer;
}

.editorActions {
max-width: 794px;
margin-left: auto;
margin-right: auto;
}

.projectActions button:hover,
.viewerActions button:hover,
.editorActions button:hover {
background: #1d4ed8;
}

.editorActions button:disabled {
background: #9ca3af !important;
cursor: not-allowed;
}

.normalizedExpose {
width: 100%;
box-sizing: border-box;
}

.normalizedExpose h1 {
font-size: 34px;
font-weight: 900;
line-height: 1.1;
margin: 0 0 10px;
text-align: center;
}

.normalizedExpose h2 {
font-size: 24px;
font-weight: 700;
margin: 16px 0 8px;
}

.normalizedExpose h3 {
font-size: 18px;
font-weight: 700;
margin: 18px 0 10px;
line-height: 1.3;
}

.normalizedExpose p {
margin: 0 0 16px;
line-height: 1.55;
}

.expose-media {
margin: 26px 0 38px;
}

img.heroImage,
img.viewerImage,
img.editorImage {
width: 100%;
max-width: 100%;
height: auto !important;
max-height: none !important;
min-height: 330px;
border-radius: 0 !important;
display: block;
object-fit: contain;
overflow: hidden;
background: white;
}

.flowImageGrid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 18px;
margin: 24px 0 30px;
width: 100%;
align-items: start;
}

.flowImageItem {
display: block;
}

.flowImageItem img {
width: 100%;
height: 210px;
border-radius: 0 !important;
display: block;
object-fit: contain;
background: white;
}

.layoutModernSplit,
.layoutModernSplitMedia,
.brochureMosaic,
.brochureMosaicMain,
.brochureMosaicSide,
.brochureSplit,
.brochureSplitMedia {
display: block !important;
}

.saveToast {
position: fixed;
top: 24px;
right: 24px;
background: #16a34a;
color: white;
padding: 14px 20px;
border-radius: 14px;
font-size: 15px;
font-weight: 700;
box-shadow: 0 14px 30px rgba(22, 163, 74, 0.28);
opacity: 0;
transform: translateY(-10px);
pointer-events: none;
transition: opacity 0.22s ease, transform 0.22s ease;
z-index: 10000;
}

.saveToast.show {
opacity: 1;
transform: translateY(0);
}

.editorLayout {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}

.editorStickyBar {
position: sticky;
top: 0;
z-index: 50;
background: #f5f7fb;
padding-bottom: 14px;
margin-bottom: 10px;
}

.editorToolbar {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;

background: white;
border: 1px solid #d9dee7;
border-radius: 16px;
padding: 12px 16px;

box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.toolbarRow {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 8px;
width: 100%;
}

.toolbarGroup {
display: flex;
justify-content: center;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}

.toolbarRowTop {
justify-content: center;
}

.toolbarRowBottom {
justify-content: center;
}

.editorToolbar button {
border: none;
background: #2563eb;
color: white;
padding: 6px 9px;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
font-size: 12px;
line-height: 1;
min-height: 30px;
white-space: nowrap;
flex: 0 0 auto;
}

.toolbarDivider {
width: 1px;
height: 24px;
background: #d9dee7;
margin: 0 6px;
display: inline-block;
flex: 0 0 auto;
flex-shrink: 0;
}

.toolbarRowDivider {
width: 100%;
max-width: 720px;
height: 1px;
background: #d9dee7;
margin: 8px auto;
}

.editorToolbar button:hover {
background: #1d4ed8;
}

.editorToolbar button:disabled {
background: #2563eb;
opacity: 0.55;
cursor: not-allowed;
}

.editorWorkspace {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}

.editorCard {
position: relative;
background: #eef2f7;
padding: 24px;
overflow: auto;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}

.editorPage {
width: 794px;
height: 1123px;
margin: 0 auto 28px;
background: white;
box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
border-radius: 10px;
position: relative;
overflow: hidden;
}

.editorPageInner {
position: relative;
width: 100%;
min-height: 1123px;
padding: 40px 48px;
box-sizing: border-box;
overflow: visible;
line-height: 1.45;
}

.editorPageInner p,
.editorPageInner div {
margin: 0 0 1px;
line-height: 1.45;
}

.editorPageInner h1 {
margin: 0 0 10px;
line-height: 1.2;
}

.editorPageInner h2 {
margin: 16px 0 8px;
line-height: 1.25;
}

.editorPageInner h3 {
margin: 14px 0 6px;
line-height: 1.3;
}

.editorPageInner ul,
.editorPageInner ol {
margin: 0 0 8px 22px;
line-height: 1.45;
}

.editorImageWrapper {
position: absolute;
cursor: move;
z-index: 5;
overflow: hidden;
background: transparent;
}

.editorImageWrapper img,
.editorImageWrapper img.heroImage,
.editorImageWrapper img.portrait,
.editorImageWrapper img.logo {
width: 100% !important;
height: 100% !important;
max-width: none !important;
max-height: none !important;
min-width: 0 !important;
min-height: 0 !important;
display: block !important;
object-fit: contain !important;
border-radius: 0 !important;
pointer-events: none;
background: white;
}

.editorImageWrapper img.logo {
object-fit: contain !important;
background: white;
}

.editorResizeHandle {
position: absolute;
width: 14px;
height: 14px;
background: #2563eb;
border-radius: 2px;
z-index: 10;
}

.editorResizeHandle.topLeft {
left: -6px;
top: -6px;
cursor: nwse-resize;
}

.editorResizeHandle.topRight {
right: -6px;
top: -6px;
cursor: nesw-resize;
}

.editorResizeHandle.bottomLeft {
left: -6px;
bottom: -6px;
cursor: nesw-resize;
}

.editorResizeHandle.bottomRight {
right: -6px;
bottom: -6px;
cursor: nwse-resize;
}

.editorSelected {
outline: 2px solid #2563eb;
}

.editorImagePlaceholder {
display: block;
width: 100%;
background: transparent;
}

.editorPlaceholder {
color: #9aa3af !important;
}

.editorPlaceholder:focus {
outline: none;
}


.editorDivider {
border: none;
border-top: 1px solid #d1d5db;
margin: 18px 0;
width: 100%;
}

.editorDividerSelected {
border-top: 2px solid #94a3b8;
}

.viewerCard {
position: relative;
background: #eef2f7;
padding: 24px;
overflow: auto;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}

.viewerPage {
width: 794px;
height: 1123px;
margin: 0 auto 28px auto;
background: white;
box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
border-radius: 10px;
position: relative;
overflow: hidden;
}

.viewerPageInner {
position: relative;
width: 100%;
min-height: 1123px;
padding: 40px 48px;
box-sizing: border-box;
overflow: visible;
line-height: 1.45;
}

.viewerPageInner p,
.viewerPageInner div {
margin: 0 0 1px;
line-height: 1.45;
}

.viewerPageInner h1 {
margin: 0 0 10px;
line-height: 1.2;
}

.viewerPageInner h2 {
margin: 16px 0 8px;
line-height: 1.25;
}

.viewerPageInner h3 {
margin: 14px 0 6px;
line-height: 1.3;
}

.viewerPageInner ul,
.viewerPageInner ol {
margin: 0 0 8px 22px;
line-height: 1.45;
}

.viewerPage .editorImageWrapper {
position: absolute;
z-index: 5;
overflow: hidden;
background: transparent;
}

.viewerPage .editorImageWrapper img {
width: 100% !important;
height: 100% !important;
object-fit: fill !important; /* 🔥 KEY CHANGE */
display: block !important;
border-radius: 0 !important;
background: transparent !important;
}

.viewerPage .editorImageWrapper {
position: absolute;
z-index: 5;
overflow: hidden;
background: transparent;
display: flex;
align-items: center;
justify-content: center;
}

.viewerPage .editorImageWrapper img.logo {
object-fit: contain !important;
background: white;
}

.viewerPage .editorResizeHandle {
display: none !important;
}

.viewerPage .editorSelected {
outline: none !important;
}

.viewerPage .editorImagePlaceholder {
display: none !important;
}

.pageLimitHint {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 44px;
padding: 0 14px;
color: #6b7280;
font-size: 14px;
font-weight: 600;
background: white;
border: 1px solid #d9dee7;
border-radius: 12px;
box-sizing: border-box;
white-space: nowrap;
}

#editorArea,
#viewerContent {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}

@media (max-width: 980px) {
.layout {
flex-direction: column;
}

.editorToolbar {
width: 100%;
}

.toolbarRow {
justify-content: center;
}

.sidebar {
width: 100%;
height: auto;
position: relative;
border-right: none;
border-bottom: 1px solid #d9dee7;
}

.content {
padding: 22px 16px 30px;
}

.grid2,
.bottomArea,
.flowImageGrid {
grid-template-columns: 1fr;
}

.pageTitleRow h1 {
font-size: 28px;
}

.editorStickyBar {
position: static;
padding-bottom: 0;
}

.editorPage,
.viewerPage {
width: 100%;
max-width: 794px;
height: auto;
min-height: 1123px;
}
}

textarea {
font-family: Inter, Arial, sans-serif !important;
}

.normalizedExpose p,
.normalizedExpose li {
font-family: Inter, Arial, sans-serif;
}

/* LANDING PAGE */

.landing {
max-width: 2000px;
margin: 0 auto;
padding: 50px 40px 70px;
text-align: center;
}

.hero {
margin-bottom: 34px;
}

.hero h1 {
margin: 0 0 18px;
font-size: 50px;
font-weight: 800;
line-height: 1.08;
color: #111827;
}

.hero p {
max-width: 820px;
margin: 0 auto;
font-size: 19px;
line-height: 1.65;
color: #6b7280;
}

.hero button:hover,
.cta button:hover {
background: #1d4ed8;
}



.features {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 22px;
margin: 120px 0 58px;
}

.feature {
background: white;
border-radius: 20px;
padding: 28px 22px;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.feature h3 {
margin: 0 0 12px;
font-size: 21px;
font-weight: 700;
}

.feature p {
margin: 0;
color: #6b7280;
line-height: 1.6;
}

.howItWorks {
margin: 10px 0 58px;
}

.howItWorks h2 {
margin: 0 0 26px;
font-size: 34px;
font-weight: 800;
}

.steps {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 22px;
}

.step {
background: white;
border-radius: 20px;
padding: 28px 22px;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.step span {
display: inline-flex;
width: 42px;
height: 42px;
border-radius: 50%;
align-items: center;
justify-content: center;
background: #2563eb;
color: white;
font-size: 18px;
font-weight: 800;
margin-bottom: 14px;
}

.step h3 {
margin: 0 0 10px;
font-size: 20px;
font-weight: 700;
}

.step p {
margin: 0;
color: #6b7280;
line-height: 1.6;
}

.cta {
margin-top: 20px;
}

.cta h2 {
margin: 0;
font-size: 34px;
font-weight: 800;
color: #111827;
}

@media (max-width: 900px) {
.hero h1 {
font-size: 38px;
}

.hero p {
font-size: 17px;
}

.features,
.steps {
grid-template-columns: 1fr;
}

.howItWorks h2,
.cta h2 {
font-size: 28px;
}
}

/* ===== HERO UPGRADE ===== */

.heroContent {
max-width: 900px;
margin: 0 auto;
}

.heroSub {
margin-top: 10px;
font-size: 20px;
color: #4b5563;
}

.heroButtons {
margin-top: 26px;
display: flex;
gap: 14px;
justify-content: center;
flex-wrap: wrap;
}

.primaryBtn {
background: linear-gradient(135deg, #2563eb, #1d4ed8);
border: none;
border-radius: 14px;
padding: 14px 28px;
color: white;
font-weight: 700;
font-size: 16px;
cursor: pointer;
}

.primaryBtn:hover {
opacity: 0.9;
}

.secondaryBtn {
background: transparent;
border: 2px solid #2563eb;
border-radius: 14px;
padding: 12px 24px;
color: #2563eb;
font-weight: 600;
cursor: pointer;
}

.heroTrust {
margin-top: 18px;
display: flex;
gap: 18px;
justify-content: center;
flex-wrap: wrap;
font-size: 14px;
color: #6b7280;
}

/* ===== IMAGE PREMIUM ===== */

.landingHeroImage {
display: flex;
flex-direction: column;
align-items: center;
margin: 46px 0 40px;
}

.imageWrapper {
width: 100%;
max-width: 980px;
min-height: 580px; /* <- DAS macht den Kasten höher */
margin: 0 auto;
padding: 40px 40px 10px 40px; /* <- unten extra Luft */
background: #ffffff;
border-radius: 24px;
box-shadow: 0 28px 70px rgba(15, 23, 42, 0.10);
box-sizing: border-box;
display: flex;
align-items: flex-start;
justify-content: center;
overflow: visible;
}

.landingHeroImage img {
width: 100%;
height: auto;
display: block;
border-radius: 12px;
background: white;
object-fit: contain;
}

/* ===== CTA ===== */

.cta p {
margin-top: 10px;
color: #6b7280;
}

.primaryBtn.big {
font-size: 18px;
padding: 16px 34px;
margin-top: 18px;
}

.heroCTA {
margin-top: 30px;
text-align: center;
}

.ctaSub {
margin-top: 10px;
font-size: 14px;
color: #6b7280;
}

.footer {
width: 100%;
box-sizing: border-box;
margin-top: 60px;
padding: 24px;
display: flex;
justify-content: center;
gap: 20px;
font-size: 14px;
background: #f9fafb;
border-top: 1px solid #e5e7eb;
}

.footer a {
color: #6b7280;
text-decoration: none;
font-weight: 500;
}

.footer a:hover {
color: #2563eb;
text-decoration: underline;
}

.legalPage {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: flex-start;
padding: 60px 20px;
background: #f5f7fb;
box-sizing: border-box;
}

.legalCard {
max-width: 700px;
width: 100%;
background: white;
padding: 40px 36px;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
text-align: left;
}

.legalCard h1 {
margin-top: 0;
font-size: 32px;
font-weight: 800;
}

.legalCard h2 {
margin-top: 24px;
font-size: 20px;
font-weight: 700;
}

.legalCard p {
line-height: 1.6;
color: #4b5563;
}

.sidebarBottom {
display: flex;
flex-direction: column;
gap: 8px;
}

.sidebarBottomLinks {
margin-top: 10px;
display: flex;
justify-content: center;
gap: 14px;
font-size: 12.5px;
opacity: 0.8;
}

.sidebarBottomLinks a {
color: #6b7280;
text-decoration: none;
transition: all 0.2s ease;
}

.sidebarBottomLinks a:hover {
color: #2563eb;
}

.authPage {
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 100vh;
}

.authCard {
margin: auto;
}
