/* ========== Gemeinsame Basis-Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 0;
    background: #f8f9fa;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0;
    background: white;
    padding: 30px;
    border-radius: 0;
    box-shadow: none;
}

/* ========== Typografie ========== */
h1 {
    text-align: left;
    color: #1a1a1a;
    font-size: 24px;
    margin: 0 0 20px 0;
    font-weight: 500;
    letter-spacing: 0;
}

h2 {
    color: #1a1a1a;
    font-size: 16px;
    margin: 0 0 12px 0;
    font-weight: 500;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 400;
    color: #666;
    font-size: 13px;
}

/* ========== Content Layout ========== */
.content {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.chart-container {
    flex: 2;
    background: white;
    padding: 0;
    border-radius: 0;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
    border: 1px solid #e0e0e0;
}

canvas {
    background: white;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    z-index: 2;
    cursor: grab;
    border: none;
}

canvas:active {
    cursor: grabbing;
}

/* ========== Kontrollbereich ========== */
.controls {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 0;
    height: fit-content;
    border: 1px solid #e0e0e0;
    position: relative;
    z-index: 10;
}

.input-group {
    margin-bottom: 15px;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    color: #1a1a1a;
}

input[type="number"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: none;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    transition: border-color 0.2s ease;
    color: #1a1a1a;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: none;
}

/* ========== Buttons ========== */
button {
    width: 100%;
    padding: 10px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
    box-shadow: none;
}

button:hover {
    background-color: #1d4ed8;
    box-shadow: none;
    transform: none;
}

button:active {
    transform: none;
    background-color: #1e40af;
}

.btn-clear {
    background-color: #ef4444;
    box-shadow: none;
}

.btn-clear:hover {
    background-color: #dc2626;
    box-shadow: none;
}

.btn-add-row {
    background-color: #27ae60;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
    width: auto;
    padding: 10px 20px;
}

.btn-add-row:hover {
    background-color: #229954;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.btn-show-all {
    background-color: #8e44ad;
    box-shadow: 0 2px 6px rgba(142, 68, 173, 0.3);
    width: auto;
    padding: 10px 20px;
}

.btn-show-all:hover {
    background-color: #7d3c98;
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.4);
}

.btn-export {
    background-color: #f39c12;
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.3);
    width: auto;
    padding: 10px 20px;
}

.btn-export:hover {
    background-color: #d68910;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

/* ========== Info & Result Boxen ========== */
.info {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 3px solid #2563eb;
    border: 1px solid #e5e7eb;
}

.info p {
    margin: 4px 0;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.info p:first-child {
    margin-top: 0;
    font-weight: 500;
}

.result {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    font-weight: 500;
    border-left: 3px solid transparent;
    line-height: 1.5;
}

.result.valid {
    background: linear-gradient(135deg, #d4edda 0%, #f1f8ff 100%);
    color: #155724;
    border-color: #28a745;
    border: 1px solid #c3e6cb;
}

.result.invalid {
    background: linear-gradient(135deg, #f8d7da 0%, #fff9e6 100%);
    color: #721c24;
    border-color: #f5c6cb;
    border: 1px solid #f5c6cb;
}

/* ========== Tabelle ========== */
.table-container {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

.table-container h2 {
    margin-bottom: 15px;
}

.table-container>div:first-of-type {
    margin-bottom: 20px;
}

.table-container p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.3s ease;
    color: #2c3e50;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 15px;
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

table.data-table th {
    background: #1f2937;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
}

table.data-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    color: #374151;
    font-size: 13px;
}

table.data-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

table.data-table tbody tr:hover {
    background-color: #f9fafb;
}

table.data-table tbody tr.selected {
    background-color: #f0f9ff;
    border-left: 3px solid #2563eb;
}

table.data-table .status-cell {
    font-weight: 500;
    padding: 10px;
    border-radius: 3px;
}

table.data-table .status-valid {
    background-color: #dcfce7;
    color: #166534;
}

table.data-table .status-invalid {
    background-color: #fee2e2;
    color: #7f1d1d;
}

/* ========== Button Container ========== */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* ========== Range Input Styles ========== */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ecf0f1;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    cursor: pointer;
}
