:root {
    --primary: #3498db;
    --bg: #f4f7f6;
    --text: #333;
    --border: #ccc;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: var(--text);
    color: white;
    padding: 1rem 2rem;
}

main {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: 1fr 250px;
    flex: 1;
    gap: 1rem;
    padding: 1rem;
}

/* Controls */
.controls {
    grid-row: 1 / 3;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.controls label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: bold;
}

.controls input {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-sizing: border-box;
}

.controls button {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.controls button:disabled {
    background: var(--border);
    cursor: not-allowed;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* Drag Item */
.drag-item {
    background: var(--primary);
    color: white;
    padding: 15px;
    text-align: center;
    border-radius: 4px;
    cursor: grab;
    user-select: none;
}

.drag-item:active {
    cursor: grabbing;
}

/* Grid Preview */
.preview-area {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: auto;
}

.grid-container {
    display: grid;
    min-height: 300px;
    border: 2px dashed #aaa;
    background-color: #fdfdfd;
}

.grid-item {
    background-color: #e74c3c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.1s;
}

.grid-item:hover {
    transform: scale(0.98);
}
.grid-item.selected {
    border: 3px solid #2c3e50;
}

/* Export Area */
.export-area {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.code-blocks {
    display: flex;
    gap: 1rem;
    height: calc(100% - 40px);
}

.code-blocks div {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.code-blocks h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
}

textarea {
    flex: 1;
    width: 100%;
    resize: none;
    font-family: monospace;
    padding: 10px;
    background: #2d2d2d;
    color: #f8f8f2;
    border-radius: 4px;
    border: none;
    box-sizing: border-box;
}

/* Neue Styles für das Hinzufügen */
.add-methods {
    display: flex;
    gap: 10px;
    align-items: center;
}

.drag-item {
    flex: 1;
    /* ... deine bestehenden .drag-item styles bleiben hier ... */
}

.add-btn {
    flex: 1;
    background: #2ecc71 !important; /* Grün zur Unterscheidung */
    margin-top: 0 !important;
    height: 100%;
    padding: 15px !important;
}

.add-btn:hover {
    background: #27ae60 !important;
}
