/* style.css - Anpassung für feste Kartengröße und variablen Abstand */
:root {
    --primary-color: #007BFF;
    --primary-hover: #0056b3;
    --text-color: white;
    --bg-color: black;
    --card-bg: #333;
    --modal-bg: rgba(0, 0, 0, 0.9);
    /* --gap-size wird jetzt von JS gesetzt, kann aber hier als Fallback/Default bleiben */
    --gap-size: 8px;
    --card-border: 1px solid rgba(255, 255, 255, 0.1); /* Subtile Trennung zwischen Karten */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    transition: all 0.3s ease;
    margin: 0;
    padding: 20px;
    position: relative;
    background-image: var(--bg-image, none);
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto; /* Allow body scrolling if content is very long */
    overflow-x: hidden; /* --- NEU: Verhindert horizontales Scrollen durch Konfetti */
}

    /* Themes */
    body.dark-theme {
        --primary-color: #007BFF;
        --primary-hover: #0056b3;
        --text-color: white;
        --bg-color: #121212;
        --card-bg: #333;
        --modal-bg: rgba(18, 18, 18, 0.95);
        filter: none;
    }

    body.light-theme {
        --bg-color: #f0f0f0;
        --text-color: #333;
        --card-bg: #ddd;
        --modal-bg: rgba(255, 255, 255, 0.95);
        --primary-color: #0078d4;
        --primary-hover: #005a9e;
        filter: none;
    }

    body.purple-haze-theme {
        --primary-color: #e040fb;
        --primary-hover: #d500f9;
        --text-color: white;
        --bg-color: #21003d;
        --card-bg: #3a006b;
        --modal-bg: rgba(33, 0, 61, 0.95);
        --bg-image: url('https://images.unsplash.com/photo-1536377146037-48f83b79232a?auto=format&fit=crop&q=80');
        filter: none;
    }

    /* --- ÄNDERUNG: "Gold Rush" wurde durch "Winner" ersetzt --- */
    body.winner-theme {
        --primary-color: #ffd700;
        --primary-hover: #e6c200;
        --text-color: #ffffff;
        --bg-color: #1a1a1a;
        --card-bg: #2c2c2c;
        --modal-bg: rgba(26, 26, 26, 0.97);
        --bg-image: url('https://images.unsplash.com/photo-1606810243236-a33631b3e7a3?auto=format&fit=crop&q=80');
        filter: none;
    }


    body.sunset-theme {
        --primary-color: #f39c12;
        --primary-hover: #e67e22;
        --text-color: #ffffff;
        --bg-color: #3c1053;
        --card-bg: #6b1b4d;
        --modal-bg: rgba(60, 16, 83, 0.97);
        --bg-image: url('https://images.unsplash.com/photo-1616128417859-3a984dd35f1b?auto=format&fit=crop&q=80');
        filter: none;
    }

    body.ocean-theme {
        --primary-color: #00acc1;
        --primary-hover: #0097a7;
        --text-color: #ffffff;
        --bg-color: #002147;
        --card-bg: #003366;
        --modal-bg: rgba(0, 33, 71, 0.97);
        --bg-image: url('https://images.unsplash.com/photo-1586076100131-32505c71d0d1?auto=format&fit=crop&q=80');
        filter: none;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
        pointer-events: none;
        display: var(--overlay-display, none);
    }

    body.sunset-theme::before,
    body.ocean-theme::before,
    body.purple-haze-theme::before,
    body.winner-theme::before { /* --- NEU: Overlay für Winner-Theme hinzugefügt --- */
        --overlay-display: block;
    }

    /* Layout Varianten - Fixed size now defined in the main .card rule */
    body.mobile-layout .card {
        /* Use main .card size */
    }

    body.pc-layout .card {
        /* Use main .card size */
    }

/* Settings Button Styling */
.setting-btn {
    position: absolute;
    top: 10px;
    width: 45px;
    height: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: white;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.2);
    z-index: 50;
    transition: all 0.3s ease;
}

#settings-btn {
    right: 10px;
}

/* Pause Button Container Styling */
#pause-btn-container {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    z-index: 50;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0;
}

.container {
    --color: #333;
    --size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-size: var(--size);
    user-select: none;
    fill: var(--color);
    width: 100%;
    height: 100%;
}

    .container .play {
        position: absolute;
        animation: keyframes-fill 0.3s forwards;
    }

    .container .pause {
        position: absolute;
        display: none;
        animation: keyframes-fill 0.3s forwards;
    }

#pause-checkbox:checked ~ .play {
    display: none;
}

#pause-checkbox:checked ~ .pause {
    display: block;
}

#pause-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

@keyframes keyframes-fill {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.setting-btn .bar {
    width: 50%;
    height: 2px;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 2px;
}

    .setting-btn .bar::before {
        content: "";
        width: 2px;
        height: 2px;
        background-color: #333;
        position: absolute;
        border-radius: 50%;
        border: 2px solid #333;
        transition: all 0.3s;
        box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
    }

.setting-btn .bar1::before {
    transform: translateX(-4px);
}

.setting-btn .bar2::before {
    transform: translateX(4px);
}

.setting-btn:hover .bar1::before {
    transform: translateX(4px);
}

.setting-btn:hover .bar2::before {
    transform: translateX(-4px);
}

/* Responsives Layout */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin: 20px auto;
    max-width: 800px;
    gap: 15px;
    width: 100%;
}

.control-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Spielbrett-Layout */
#game-board {
    display: grid;
    /* gap wird jetzt dynamisch von JS gesetzt */
    /* gap: var(--gap-size); */
    justify-content: center;
    margin: 20px auto;
    /* max-width: 800px; wurde entfernt */
    padding: 10px;
    background-color: transparent;
    border-radius: 10px;
    width: 100%;
    align-self: center;
    position: relative;
    overflow: hidden;
}

    #game-board.paused::before {
        content: 'PAUSE';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.6);
        color: white;
        font-size: 3em;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        pointer-events: none;
        border-radius: 10px;
    }

/* Kartengestaltung - Feste Größe definiert */
.card {
    position: relative;
    /* Feste Größe */
    width: 90px; /* Beispielgröße, kann angepasst werden */
    height: 90px; /* Beispielgröße, kann angepasst werden */
    aspect-ratio: 1 / 1; /* Behält quadratische Form */
    cursor: pointer;
    background-color: #000;
    border-radius: 10px;
    background-image: url('icon/icon_quadrat.png');
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.5s, opacity 0.3s;
    border: none;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    /* width/height 100% wurden hier entfernt */
}

    .card.flipped {
        transform: rotateY(180deg);
        background-size: cover;
        background-position: center;
        background-image: none;
        background-color: var(--card-bg);
    }

    .card.matched {
        opacity: 0.7;
        transform: rotateY(180deg);
        background-size: cover;
        background-position: center;
        box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2);
        background-image: none;
        background-color: var(--card-bg);
    }

    .card:not(.flipped):not(.matched):hover {
        transform: scale(0.95);
        box-shadow: 0 0 15px var(--primary-color);
    }

.progress-container {
    width: 80%;
    max-width: 800px;
    height: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

#progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--primary-hover));
    width: 0%;
    transition: width 0.5s ease-in-out;
}

#progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    line-height: 20px;
    color: var(--text-color);
    font-weight: bold;
    mix-blend-mode: difference;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    pointer-events: auto;
    overflow-y: auto;
    width: 100vw;
    height: 100vh;
}

.modal-content {
    background-color: var(--modal-bg);
    padding: 30px;
    border-radius: 15px;
    max-width: 80%;
    max-height: 80vh;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 101;
    position: relative;
    margin: auto;
}

/* =========== START: REVAMPED SETTINGS STYLES =========== */

.settings-dialog {
    max-width: 650px; /* Wider for a better layout */
    background: var(--bg-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    padding: 20px 40px 30px 40px; /* More padding */
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
}

    .modal-close-btn:hover {
        opacity: 1;
        transform: rotate(90deg);
    }

.settings-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid var(--primary-hover);
    padding-bottom: 15px;
}

.settings-section {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    text-align: left;
}

.settings-section-title {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 5px;
}

.settings-section-description {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 0;
    margin-bottom: 20px;
}

/* New Theme Picker Styles */
.theme-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.theme-option {
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

    .theme-option:hover {
        border-color: rgba(255, 255, 255, 0.5);
        transform: translateY(-5px);
    }

    /* This targets the selected theme based on the inline style set by the JS */
    .theme-option[style*="background-color: rgba(255, 255, 255, 0.2)"] {
        border-color: var(--primary-color) !important;
        transform: scale(1.05);
        box-shadow: 0 0 15px var(--primary-color);
    }

    .theme-option span {
        margin-top: 10px;
        font-weight: bold;
        color: var(--text-color);
    }

.theme-color-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

    .theme-color-preview.dark {
        background: #121212;
    }

    .theme-color-preview.light {
        background: #f0f0f0;
        border-color: rgba(0,0,0,0.5);
    }

    .theme-color-preview.purple-haze {
        background: linear-gradient(45deg, #21003d, #e040fb);
    }
    /* --- ÄNDERUNG: "gold-rush" wurde zu "winner" --- */
    .theme-color-preview.winner {
        background: linear-gradient(45deg, #1a1a1a, #ffd700);
    }

    .theme-color-preview.sunset {
        background: linear-gradient(45deg, #3c1053, #f39c12);
    }

    .theme-color-preview.ocean {
        background: linear-gradient(45deg, #002147, #00acc1);
    }

/* New Layout Selector Styles */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
}

    .setting-item label {
        font-size: 1rem;
        font-weight: 500;
    }

.custom-select-wrapper {
    position: relative;
}

.setting-item select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--card-bg);
    border: 1px solid var(--primary-color);
    color: var(--text-color);
    padding: 12px 40px 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    width: 200px;
    transition: all 0.3s ease;
}

    .setting-item select:hover {
        border-color: var(--primary-hover);
        box-shadow: 0 0 10px var(--primary-hover);
    }

.custom-select-wrapper::after {
    content: '▼';
    font-size: 1em;
    color: var(--primary-color);
    position: absolute;
    right: 15px; /* Adjust position within the item */
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.settings-close-main-btn {
    display: block;
    width: 50%;
    margin: 40px auto 10px auto;
    padding: 15px 20px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .settings-close-main-btn:hover {
        background: var(--primary-hover);
        transform: scale(1.05);
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    }

/* =========== END: REVAMPED SETTINGS STYLES =========== */

/* Galerie-Ansicht */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    max-width: 90vw;
    margin: 20px auto;
}

.gallery-image-container {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

    .gallery-image-container:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: filter 0.3s ease;
}

.gallery-image-container:hover .gallery-image {
    filter: brightness(1.1);
}

.gallery-image-number {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: bold;
}

.fullscreen-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

    .fullscreen-image img {
        max-width: 90%;
        max-height: 90%;
        object-fit: contain;
        border-radius: 10px;
        box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    }

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

    .fullscreen-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.hidden {
    display: none;
}

/* Buttons und Controls */
button:not(.setting-btn):not(.modal-close-btn):not(.settings-close-main-btn),
select:not(#layout-select) {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

    button:not(.setting-btn):not(.modal-close-btn):not(.settings-close-main-btn):hover,
    select:not(#layout-select):hover {
        background-color: var(--primary-hover);
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

.highscore-container {
    margin: 20px auto;
    max-width: 600px;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
}

    .highscore-container h3 {
        color: var(--primary-color);
        margin-top: 0;
        margin-bottom: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 10px;
    }

.highscore-row {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.05);
}

    .highscore-row:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

.bot-status {
    padding: 5px 10px;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.2);
}

    .bot-status.active {
        background-color: var(--primary-color);
        animation: pulse 2s infinite;
    }

@keyframes pulse {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.7;
    }
}

.stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

    .stats span {
        background-color: rgba(0, 0, 0, 0.2);
        padding: 5px 10px;
        border-radius: 5px;
    }

#lose-message .modal-content {
    background-color: var(--modal-bg);
    border-left: 4px solid #e74c3c;
}

.danke-btn-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 50;
}

.danke-btn {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
    padding: 14px 22px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(37, 117, 252, 0.3), inset 0 2px 3px rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    gap: 12px;
    border: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    transform-origin: center;
}

    .danke-btn::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: conic-gradient( transparent, rgba(255, 255, 255, 0.3), transparent 30% );
        animation: rotate 4s linear infinite;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.danke-btn:hover {
    transform: translateY(-7px) scale(1.05);
    box-shadow: 0 15px 30px rgba(37, 117, 252, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.5);
    border-radius: 24px;
}

.danke-btn:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 5px 10px rgba(37, 117, 252, 0.2);
    transition: all 0.1s;
}

.danke-btn-icon {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    transition: all 0.3s ease;
}

.danke-btn-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #ff9eda 0%, #2575fc 70%);
    opacity: 0.5;
    border-radius: 50%;
    filter: blur(8px);
    animation: pulse 2s infinite;
    transition: all 0.3s ease;
    transform-origin: center;
}

.danke-btn:hover .danke-btn-glow {
    filter: blur(12px);
    animation: pulse 1s infinite;
}

.danke-btn-symbol {
    position: relative;
    font-size: 26px;
    z-index: 2;
    animation: float 4s ease-in-out infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.danke-btn:hover .danke-btn-symbol {
    transform: scale(1.2) rotate(5deg);
    animation: bounce 0.5s ease infinite alternate;
}

.danke-btn .text {
    font-size: 17px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

.danke-btn:hover .text {
    letter-spacing: 1.5px;
    transform: scale(1.05);
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(0.8);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px) rotate(3deg);
    }
}

@keyframes bounce {
    0% {
        transform: scale(1.2) rotate(0deg);
    }

    100% {
        transform: scale(1.2) rotate(10deg);
    }
}

.danke-btn-container::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.danke-btn:hover + .particle {
    animation: particles 1s ease-out;
    opacity: 1;
}

@keyframes particles {
    0% {
        transform: translate(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: translate(random(80) - 40px, random(80) - 40px);
        opacity: 0;
    }
}

/* --- ÄNDERUNG: Konfetti-Styling wurde überarbeitet --- */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

.confetti {
    position: absolute;
    top: -20px; /* Start above screen */
    opacity: 1;
    /* Animation wird per JS gesetzt */
}


@media (max-width: 768px) {
    .danke-btn-container {
        bottom: 20px;
        left: 20px;
    }

    .danke-btn {
        padding: 12px 18px;
        border-radius: 16px;
    }

    .danke-btn-icon {
        width: 32px;
        height: 32px;
    }

    .danke-btn-symbol {
        font-size: 22px;
    }

    .danke-btn .text {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .danke-btn-container {
        bottom: 15px;
        left: 15px;
    }

    .danke-btn {
        padding: 10px 16px;
    }

    .danke-btn-icon {
        width: 28px;
        height: 28px;
    }
}
/* Multiplayer Styles */
.multiplayer-status {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

    .multiplayer-status.hidden {
        display: none;
    }

.player {
    padding: 15px 25px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
}

    .player.active {
        border: 2px solid var(--primary-color);
        box-shadow: 0 0 15px var(--primary-color);
        transform: scale(1.05);
    }

.player-name {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.player-score {
    display: block;
    font-size: 1.1em;
    opacity: 0.8;
}

/* Player Setup Styles */
.player-setup {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.player-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .player-input label {
        font-size: 1.1em;
        color: var(--text-color);
    }

    .player-input input {
        padding: 10px;
        border-radius: 5px;
        border: 1px solid var(--primary-color);
        background: var(--card-bg);
        color: var(--text-color);
        font-size: 1em;
    }

        .player-input input:focus {
            outline: none;
            box-shadow: 0 0 10px var(--primary-color);
        }

/* Bot Difficulty Indicator */
.bot-difficulty-indicator {
    position: absolute;
    top: -20px;
    right: 10px;
    font-size: 0.8em;
    padding: 3px 8px;
    border-radius: 10px;
    background: var(--primary-color);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bot-thinking .bot-difficulty-indicator {
    opacity: 1;
}

/* Enhanced Bot UI */
.bot-status.active {
    position: relative;
    animation: botPulse 2s infinite;
}

@keyframes botPulse {
    0% {
        box-shadow: 0 0 0 0 var(--primary-color);
    }

    70% {
        box-shadow: 0 0 10px 10px transparent;
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

.secondary-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--primary-color);
    margin-left: 10px;
}

    .secondary-btn:hover {
        background-color: var(--primary-color);
    }

/* Spezielle Styles für die Danke-Seite */
.danke-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 25px var(--primary-color); /* Mehr Tiefe und Akzent */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Leichter Rand */
    text-align: left;
    line-height: 1.6;
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.8s ease-out forwards; /* Animation beim Laden */
}

    .danke-container::before {
        content: '🎓';
        position: absolute;
        top: -20px;
        right: -20px;
        font-size: 150px;
        opacity: 0.1;
        transform: rotate(15deg);
        z-index: 0;
    }

.danke-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 15px;
    text-align: center;
}

    .danke-header h2 {
        font-size: 2.5em; /* Überschrift markanter machen */
        color: var(--primary-color);
        text-shadow: 0 0 10px rgba(0, 123, 255, 0.5); /* Leichter Glanz */
    }

.danke-text {
    position: relative;
    z-index: 2;
}

.danke-container p,
.list-section li {
    font-size: 1.1em; /* Leichter vergrößern */
    line-height: 1.7; /* Mehr Zeilenabstand für bessere Lesbarkeit */
    margin-bottom: 1em; /* Abstand zwischen Absätzen */
}

.quote {
    font-style: italic;
    color: var(--primary-color);
    margin: 30px 0;
    background: linear-gradient(90deg, rgba(0, 123, 255, 0.1), rgba(0, 123, 255, 0.05)); /* Leichter Farbverlauf */
    border-left: 5px solid var(--primary-color); /* Dickere Linie */
    padding: 20px;
    border-radius: 0 15px 15px 0; /* Etwas abgerundeter */
    box-shadow: inset 5px 0 15px rgba(0, 123, 255, 0.2); /* Innerer Schatten */
    font-size: 1.2em; /* Zitat hervorheben */
    line-height: 1.6;
}

.author {
    text-align: right;
    margin-top: 10px; /* Abstand zum Zitat */
    font-weight: bold;
    color: var(--primary-hover);
    font-size: 1.1em;
    font-style: normal; /* Falls italic durch Quote vererbt wird */
}

.lists-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.list-section {
    background-color: rgba(255, 255, 255, 0.08); /* Hellerer Hintergrund */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Leichter Rand */
    border-radius: 12px; /* Etwas runder */
    padding: 25px; /* Mehr Innenabstand */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Eigener Schatten */
    transition: transform 0.3s ease;
}

    .list-section:hover {
        transform: translateY(-5px); /* Leichter Hover-Effekt */
    }

    .list-section h3 {
        color: var(--primary-color);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 10px;
        margin-top: 0;
        font-size: 1.5em; /* Kleinere Anpassung für Listen-Titel */
        margin-bottom: 15px;
    }

    .list-section ul {
        list-style: none; /* Standard-Listenpunkte entfernen */
        padding-left: 0;
        margin-bottom: 0;
    }

    .list-section li {
        position: relative;
        padding-left: 25px; /* Platz für benutzerdefinierte Listenpunkte */
        margin-bottom: 10px;
        color: var(--text-color);
    }

        .list-section li::before {
            content: '•'; /* Benutzerdefinierter Punkt */
            color: var(--primary-color); /* Farbe des Punktes */
            position: absolute;
            left: 0;
            font-weight: bold;
            font-size: 1.2em;
            line-height: 1;
        }

.back-button {
    display: inline-block;
    margin-top: 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 15px 30px; /* Größerer Button */
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); /* Stärkerer Schatten */
    transition: all 0.3s ease;
    font-size: 1.1em; /* Größere Schrift */
    letter-spacing: 0.5px; /* Leichter Zeichenabstand */
}

    .back-button:hover {
        transform: translateY(-5px); /* Stärkerer Hover-Effekt */
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
        background: linear-gradient(45deg, var(--primary-hover), var(--primary-color)); /* Farbverlauf beim Hover tauschen */
    }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
        filter: blur(5px);
    }

    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* Optional: Subtiles Hintergrundmuster für den Body, wenn kein Bild-Theme aktiv ist */
body:not(.sunset-theme):not(.ocean-theme):not(.purple-haze-theme):not(.winner-theme)::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#333 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.05; /* Sehr subtil */
    z-index: -2;
}

@media (max-width: 768px) {
    .danke-container {
        padding: 20px;
        margin: 20px 15px; /* Etwas mehr Rand auf kleinen Geräten */
    }

    .lists-container {
        grid-template-columns: 1fr;
    }

    .danke-header h2 {
        font-size: 2em; /* Auf Mobilgeräten etwas kleiner */
    }

    .quote {
        font-size: 1em; /* Auf Mobilgeräten etwas kleiner */
    }

    .danke-container p,
    .list-section li {
        font-size: 1em; /* Auf Mobilgeräten etwas kleiner */
    }

    .back-button {
        padding: 10px 20px;
        font-size: 1em;
    }
}
