/* Grundlayout */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding: 0; /* Wir nehmen das Padding hier weg */
    color: #333; 
    background-color: #ffffff; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper {
    flex: 1; 
    /* 80px oder mehr - dieser Wert schiebt ALLES unter den Header */
    padding: 90px 10px 20px 10px; 
    display: flex;
    flex-direction: column;
}

.header-container { 
    border-bottom: 1px solid #eee; 
    padding: 15px 20px; 
    background-color: #fff; 
    /* --- STRIKTE FIXIERUNG DES HEADERS --- */
    position: fixed;   
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;     
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}

.header-link { 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    color: inherit; 
}

.logo-img { 
    height: 32px; 
    width: 32px; 
    margin-right: 12px; 
    border: 3px solid #333333; 
    background-color: white; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0081c9; 
    font-weight: bold;
    font-size: 22px;
    font-family: Arial, sans-serif;
    flex-shrink: 0;
}

.brand-name { font-size: 24px; font-weight: bold; letter-spacing: 1px; }
.subtitle { margin-left: 12px; font-weight: normal; opacity: 0.6; font-size: 18px; }

.footer-container {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #999;
}

.content-area { 
    text-align: center; 
    /* Falls der Board-Wrapper darin liegt, stellen wir sicher, dass kein Padding stört */
    padding-top: 0; 
}

h2 { 
    color: #000; 
    font-weight: 600; 
    margin-top: 0;    /* Entfernt den Abstand nach oben */
    margin-bottom: 10px; /* Reduziert den Abstand nach unten */
}

p { 
    max-width: 600px; 
    margin: 0 auto 10px auto; /* Zentriert, aber mit minimalem Abstand unten */
    color: #666; 
}

/* --- Visualboard Ergänzungen --- */
.board-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    padding: 0 5px; 
    margin: 0;
}

/* --- NEU: Container für Status + Canvas --- */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex-grow: 1;
    margin-top: 0; 
}

/* Die Werkzeugleiste vertikal ausrichten */
.controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    z-index: 10;
    min-width: 160px;
    position: sticky;
    top: 90px;         /* Bleibt beim Scrollen unter dem Header */
    margin-top: 0px;   /* Gleicht die Höhe zur Status-Bar aus */
}

/* Trennlinie für vertikales Layout */
.tool-divider {
    display: none; /* Versteckt die Linien komplett */
}

/* Wandstärke-Wähler optimieren */
.thickness-selector {
    display: flex;
    flex-direction: column; 
    height: auto;
    padding: 6px; /* Weniger Polsterung */
    gap: 3px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

.thickness-selector span {
    font-size: 11px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
}

.thickness-selector input {
    width: 100%;
    border: 1px solid #ccc;
    background: white;
    font-weight: bold;
    color: #0081c9;
    text-align: center;
    font-size: 14px;
    outline: none;
    padding: 2px 0;
}

.status-bar {
    font-size: 0.9em;
    color: #333;
    font-weight: bold;
    background: #e8f5e9;
    padding: 6px 18px; /* Das Padding der Status-Bar bestimmt ihre Höhe */
    border-radius: 20px;
    border: 1px solid #c8e6c9;
    margin: 0; /* Kein Margin, der sie hochdrückt */
    line-height: 1.2;
}

/* Das Zeichenbrett rechts */
#canvas-container {
    flex-grow: 1;          /* Zwingt den Container, den restlichen Platz zu füllen */
    width: 100%;           /* Nutzt die volle verfügbare Breite */
    border: 3px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    background: white;
    line-height: 0;
    overflow: hidden;      /* Verhindert, dass das Canvas den Rahmen sprengt */
}

/* --- Einheitliche Button-Toolbar --- */
.btn-tool {
    cursor: pointer;
    height: 32px; /* Von 44px auf 32px reduziert */
    padding: 0 12px;
    border-radius: 4px;
    border: 1px solid #333333; 
    background: white;
    color: #0081c9; 
    font-weight: bold;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box; 
    font-size: 13px; /* Etwas kleinere Schrift für die niedrige Höhe */
}

.btn-tool:hover {
    background: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-danger {
    color: #ff5722 !important;
    border-color: #333333 !important;
}

.btn-help {
    background: #ffc107 !important;
    color: #000 !important;
    border: 1px solid #333333 !important;
}

/* Hilfe-Overlay */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 24px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
}

.help-list {
    list-style: none;
    padding: 0;
}

.help-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.help-key {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 8px;
    font-family: monospace;
    font-weight: bold;
    white-space: nowrap;
}

/* Overlay Design */
.dev-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Man sieht es, kann aber "durchgreifen" beim Bearbeiten */
}

.dev-banner {
    background: #0081c9;
    color: white;
    padding: 20px 50px;
    font-size: 2rem;
    font-weight: bold;
    transform: rotate(-5deg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 4px solid white;
}

/* Layout */
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', sans-serif;
}

.hero {
    text-align: center;
    padding: 60px 0;
}

.hero h1 { font-size: 3rem; color: #333; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; color: #666; max-width: 700px; margin: 0 auto; }

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.price-card {
    background: white;
    border: 1px solid #eee;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.price-card.featured {
    border: 2px solid #0081c9;
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: -15px; left: 50%;
    transform: translateX(-50%);
    background: #0081c9;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.price-tag { font-size: 2.5rem; font-weight: bold; margin: 20px 0; color: #0081c9; }
.price-tag span { font-size: 1rem; color: #999; }

.btn-pricing {
    width: 100%;
    padding: 15px;
    background: white;
    border: 2px solid #0081c9;
    color: #0081c9;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 30px;
}

.btn-pricing:hover { background: #0081c9; color: white; }

/* Drag & Drop Overlay - Position oben links */
#drop-overlay {
    position: absolute;
    top: 20px;  /* Abstand von oben */
    left: 20px; /* Abstand von links */
    text-align: left; /* Text jetzt linksbündig für besseren Lesefluss */
    color: #0081c9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    pointer-events: none;
    z-index: 10;
    transition: all 0.3s ease-out;
    background: rgba(255, 255, 255, 0.95); /* Fast deckend, damit das Raster nicht stört */
    padding: 25px;
    border-radius: 12px;
    border: 2px dashed #0081c9;
    max-width: 475px; /* Damit es nicht zu breit wird */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex; /* Nutzt Flexbox für Icon und Text nebeneinander */
    align-items: center;
    gap: 20px; /* Platz zwischen Icon und Text */
}

.drop-icon {
    font-size: 40px; /* Etwas kleiner, da es jetzt im Eck sitzt */
    line-height: 1;
    margin-bottom: 0; /* Kein Abstand nach unten mehr nötig wegen Flexbox */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.drop-text {
    font-size: 15px; /* Kompakter für die Ecke */
    font-weight: 400;
    line-height: 2.0;
    color: #444;
}

.drop-text strong {
    display: block;
    color: #005b8f;
    font-size: 18px;
    margin-bottom: 5px;
}

kbd {
    background-color: #f7f7f7;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-shadow: 0 1px 0 rgba(0,0,0,0.2), 0 0 0 2px #fff inset;
    color: #333;
    display: inline-block;
    font-size: 0.9em;
    padding: 3px 7px;
    margin: 0 2px;
}

/* Verstecken, wenn ein Bild da ist */
#drop-overlay.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important; /* Das entfernt es komplett aus dem Layout */
    transform: translateY(-10px);
}


/* Context-Menü */
.context-menu {
    display: none;
    position: fixed;
    background: #ffffff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    border-radius: 8px;
    padding: 5px 0;
    min-width: 180px;
    font-family: sans-serif;
    font-size: 14px;
}

.menu-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.menu-item:hover {
    background: #f0f7ff;
    color: #0081c9;
}

.menu-icon {
    margin-right: 10px;
    font-size: 16px;
}

.menu-item small {
    margin-left: auto;
    color: #999;
    font-size: 11px;
}

.menu-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}