:root {
    --primary-color: #2563eb;
    --primary-dark: #284ab9;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-light: #f8fafc;
    --bg-dark: #274677;
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
}

/* @media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #0f172a;
        --bg-dark: #1e293b;
        --card-bg: #1e293b;
        --text-dark: #f1f5f9;
        --text-light: #94a3b8;
        --border-color: #334155;
    }
} */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
    width: 100%;
}

body {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-dark) 100%);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0.75rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 0rem;
    padding: 0rem 0.9rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
}

.header .subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0.5rem 0;
    min-height: auto;
}

.layout-columns {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

.map-column,
.info-column {
    width: 100%;
}

.info-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Question Box */
.question-box {
    background: var(--card-bg);
    padding: 0.9rem 1rem;
    border-radius: 14px;
    box-shadow: 0 10px 18px rgba(219, 151, 151, 0.08);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#frage {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.4px;
}

/* Map Container */
.map-container {
    position: relative;
    width: min(100%, 72vw);
    max-width: 760px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, #f8fbff 0%, #e8efff 100%);
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    padding: 12px;
    min-height: 320px;
    max-height: min(78vh, 640px);
}

/* SVG Karte */
.karte-svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
    pointer-events: auto;
}

/* Controls Footer */
.controls {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding: 0rem;
    max-height: 20vh;
}

.btn {
    padding: 0rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-box {
    animation: slideIn 0.4s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    #frage {
        font-size: 1.5rem;
    }

    .button_bundesland {
        width: 70px;
        height: 35px;
        font-size: 0.65rem;
    }

    .controls {
        gap: 0.75rem;
    }

    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 820px) {
    .layout-columns {
        grid-template-columns: minmax(320px, 1.4fr) minmax(260px, 360px);
        gap: 1.8rem;
    }

    .map-container {
        width: min(100%, 64vw);
        height: min(78vh, 600px);
        max-width: 720px;
    }

    .info-column {
        justify-content: flex-start;
        align-items: stretch;
        gap: 1.25rem;
        max-width: 380px;
    }

    .question-box {
        min-height: 90px;
    }

    .controls {
        align-self: flex-start;
        padding: 0;
    }

    .btn {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.4rem;
    }

    #frage {
        font-size: 1.25rem;
    }

    .button_bundesland {
        width: 56px;
        height: 30px;
        font-size: 0.55rem;
    }

    .btn {
        padding: 0.5rem 0.85rem;
        font-size: 0.78rem;
    }

    .map-container {
        width: 100%;
        max-width: 100%;
        min-height: 50vh;
        max-height: 65vh;
        padding: 8px;
    }

    .info-column {
        gap: 0.6rem;
    }

    .question-box {
        padding: 0.8rem 0.9rem;
    }

    .controls {
        max-height: none;
        gap: 0.35rem;
        padding: 0.15rem 0.35rem;
    }

    html,
    body {
        height: auto;
        overflow-y: scroll;
    }
}

/* #section_Knoepfe{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border: 1px solid beige;
    width: 100vw;
} */

#spielStarten_button {
    font-size: 1rem;
    padding: 0.85rem 1.2rem;
    background-color: rgb(177, 152, 119);
    border-radius: 10px;
}

#btn_hilfeUmschalten,
#btn_loesungAnzeigenUmschalten {
    font-size: 0.95rem;
    padding: 0.9rem 1.2rem;
    margin: 0.3rem;
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 10px;
    background-color: rgb(209, 186, 156);
}
