/* Modern CSS für Stammbaum Generator */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #E7E0CA 0%, #F6F3EA 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #80350F 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    padding: 2rem;
}

.info-box {
    background: #e3f2fd;
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

.info-box .note {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Form Styles */
.sb-form {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.sb-b {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.sb-form-group {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.sb-formleft {
    font-weight: 600;
    color: var(--primary-color);
}

.required {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 2px;
}

.sb-formright {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sb-formright input[type="text"],
.sb-formright input[type="email"],
.sb-formright textarea,
.sb-formright select {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.sb-formright input:disabled,
table.sb input:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.5;
}

.sb-formright input:focus,
.sb-formright textarea:focus,
.sb-formright select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.sb-formright textarea {
    resize: vertical;
    min-height: 120px;
}

.sb-formright input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
}

.sb-clear {
    clear: both;
    margin: 1rem 0;
}

/* Radio Buttons */
.sb-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sb-radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.sb-radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Submit Button */
.sb-submit {
    background: #F46036;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

.sb-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.sb-submit:active {
    transform: translateY(0);
}

/* Stammbaum Table */
table.sb {
    border-collapse: collapse;
    width: 100%;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

table.sb td {
    padding: 1rem;
    text-align: center;
    border: 2px solid var(--border-color);
    vertical-align: middle;
    min-height: 60px;
}

/* Output Styles */
.sb-box {
    text-align: center;
    border: 3px solid var(--primary-color);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
}

.bigger {
    font-size: 1.5em;
}

.smaller {
    font-size: 0.9em;
}

.b {
    font-weight: bold;
}

.i {
    font-style: italic;
}

.sb-copyright {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.sb-copyright a {
    color: var(--secondary-color);
    text-decoration: none;
}

.sb-copyright a:hover {
    text-decoration: underline;
}

footer {
    background: var(--bg-color);
    padding: 1.5rem;
    text-align: center;
    color: #666;
    border-top: 1px solid var(--border-color);
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .sb-form-group {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .sb-formleft {
        margin-bottom: 0.25rem;
    }

    .sb-formright input[type="text"],
    .sb-formright input[type="email"],
    .sb-formright textarea,
    .sb-formright select {
        max-width: 100%;
    }

    table.sb {
        font-size: 0.85rem;
    }

    table.sb td {
        padding: 0.5rem;
    }

    main {
        padding: 1rem;
    }

    .sb-form {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.5rem 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    table.sb {
        font-size: 0.75rem;
    }

    table.sb td {
        padding: 0.25rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    header,
    footer,
    .info-box,
    .sb-form {
        display: none;
    }
}
