* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #1a0f0f url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="%23221818" width="100" height="100"/><path fill="%23302828" d="M0 0h100v100H0zM10 10h80v80H10z"/></svg>');
    color: #e8d8b8;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #2c1810 0%, #3a2418 100%);
    border: 3px solid #8b4513;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    position: relative;
}

header::before {
    content: "⚔️";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
}

header::after {
    content: "🏰";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
}

h1 {
    font-size: 2.5em;
    color: #d4af37;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}

.subtitle {
    font-style: italic;
    color: #c8b090;
    font-size: 1.2em;
}

.admin-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.panel {
    background: linear-gradient(135deg, #2c1810 0%, #3a2418 100%);
    border: 2px solid #8b4513;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.panel h2 {
    color: #d4af37;
    border-bottom: 2px solid #8b4513;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

input, textarea {
    padding: 12px;
    background: #1a0f0f;
    border: 1px solid #8b4513;
    border-radius: 5px;
    color: #e8d8b8;
    font-family: inherit;
    font-size: 16px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #fff;
}

.btn-secondary {
    background: linear-gradient(135deg, #4a4a4a 0%, #666 100%);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #8b0000 0%, #a52a2a 100%);
    color: #fff;
}

.btn-magic {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
    color: #fff;
    font-size: 1.5em;
    padding: 20px 40px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.list {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    border: 1px solid #8b4513;
    border-radius: 5px;
    background: #1a0f0f;
}

.list-item {
    padding: 12px;
    border-bottom: 1px solid #8b4513;
    background: #2c1810;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item.winner {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
    color: #fff;
}

.ziehung-container {
    text-align: center;
    margin-bottom: 40px;
}

.gewinner-ankuendigung {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
    border: 3px solid #d4af37;
    border-radius: 15px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

.gewinner-name {
    font-size: 2.5em;
    color: #d4af37;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 15px;
}

.gewinner-preis {
    font-size: 1.8em;
    margin-bottom: 15px;
}

.preis-beschreibung {
    font-size: 1.2em;
    margin-bottom: 10px;
    font-style: italic;
}

.preis-wert {
    font-size: 1.3em;
    color: #d4af37;
}

.status-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.status-item {
    background: #2c1810;
    padding: 20px;
    border: 1px solid #8b4513;
    border-radius: 10px;
    text-align: center;
}

.status-label {
    display: block;
    font-size: 0.9em;
    color: #c8b090;
    margin-bottom: 5px;
}

.status-value {
    display: block;
    font-size: 2em;
    color: #d4af37;
    font-weight: bold;
}

.error-message {
    background: linear-gradient(135deg, #8b0000 0%, #a52a2a 100%);
    border: 2px solid #ff4444;
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
}

.message {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
    border: 2px solid #d4af37;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    font-weight: bold;
}

.navigation {
    text-align: center;
    margin: 30px 0;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    border-top: 2px solid #8b4513;
    color: #c8b090;
    font-style: italic;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a0f0f;
}

::-webkit-scrollbar-thumb {
    background: #8b4513;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0522d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-panels {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .gewinner-name {
        font-size: 2em;
    }
}

/* Zusätzliche CSS-Regeln für die Mengenverwaltung */

.statistiken {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.statistik-item {
    background: linear-gradient(135deg, #2c1810 0%, #3a2418 100%);
    border: 2px solid #8b4513;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.statistik-zahl {
    display: block;
    font-size: 2.5em;
    color: #d4af37;
    font-weight: bold;
    line-height: 1;
}

.statistik-label {
    display: block;
    font-size: 0.9em;
    color: #c8b090;
    margin-top: 5px;
}

.menge-input {
    position: relative;
    display: flex;
    align-items: center;
}

.menge-input input {
    flex: 1;
    padding-right: 60px;
}

.input-label {
    position: absolute;
    right: 12px;
    color: #c8b090;
    background: #1a0f0f;
    padding: 2px 8px;
    border-radius: 3px;
}

.menge-input-small {
    width: 60px;
    padding: 4px;
    background: #1a0f0f;
    border: 1px solid #8b4513;
    border-radius: 3px;
    color: #e8d8b8;
    text-align: center;
}

.btn-small {
    padding: 4px 8px;
    font-size: 0.8em;
    text-decoration: none;
}

.preis-item {
    position: relative;
}

.preis-item.ausverkauft {
    opacity: 0.6;
    background: linear-gradient(135deg, #3a2418 0%, #2c1810 100%);
}

.preis-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 8px;
}

.preis-aktionen {
    display: flex;
    gap: 5px;
    align-items: center;
}

.preis-details {
    margin-bottom: 8px;
}

.preis-menge {
    font-size: 0.9em;
    color: #c8b090;
}

.menge-anzahl {
    font-weight: bold;
    color: #d4af37;
}

.menge-anzahl.ausverkauft {
    color: #ff6b6b;
}

.spieler-item.hat-gewonnen {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
}

.panel-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.verfuegbare-preise {
    margin: 30px 0;
}

.preise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.preis-karte {
    background: linear-gradient(135deg, #2c1810 0%, #3a2418 100%);
    border: 2px solid #8b4513;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.2s ease;
}

.preis-karte:hover {
    transform: translateY(-2px);
    border-color: #d4af37;
}

.preis-karte-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #8b4513;
    padding-bottom: 8px;
}

.menge-badge {
    background: #d4af37;
    color: #1a0f0f;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.preis-karte-body {
    font-size: 0.9em;
}

.preis-wert-karte {
    margin-top: 8px;
    color: #d4af37;
    font-weight: bold;
}

.verbleibende-menue {
    margin-top: 10px;
    padding: 8px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 5px;
    font-size: 0.9em;
    color: #d4af37;
}

.ziehung-hinweis {
    margin-top: 15px;
    font-style: italic;
    color: #c8b090;
    font-size: 0.9em;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .preis-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .preis-aktionen {
        align-self: flex-end;
    }
    
    .preise-grid {
        grid-template-columns: 1fr;
    }
    
    .panel-actions {
        flex-direction: column;
    }
}

/* Zusätzliche CSS-Regeln für Login und erweiterte Funktionen */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.login-panel {
    background: linear-gradient(135deg, #2c1810 0%, #3a2418 100%);
    border: 3px solid #8b4513;
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.login-panel h2 {
    text-align: center;
    color: #d4af37;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #c8b090;
    font-weight: bold;
}

.login-hinweis {
    margin-top: 25px;
    padding: 15px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    border: 1px solid #8b4513;
    font-size: 0.9em;
    color: #c8b090;
}

.login-hinweis p {
    margin: 5px 0;
}

.admin-info {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c8b090;
    font-size: 0.9em;
}

.spieler-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gewinner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .admin-info {
        position: static;
        justify-content: center;
        margin-top: 15px;
    }
    
    .login-panel {
        padding: 25px;
        margin: 20px;
    }
    
    .spieler-header,
    .gewinner-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .spieler-header .btn-small,
    .gewinner-header .btn-small {
        align-self: flex-end;
    }
}

/* Zusätzliche CSS-Regeln für die Gewinnerseite */

.gewinner-uebersicht {
    margin-bottom: 40px;
}

.gewinner-liste {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gewinner-eintrag {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
    border: 2px solid #d4af37;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.gewinner-eintrag.aktuell {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a0f0f;
    border-color: #8b4513;
}

.gewinner-datum {
    font-size: 0.9em;
    color: #c8b090;
    margin-bottom: 5px;
}

.gewinner-eintrag.aktuell .gewinner-datum {
    color: #8b4513;
}

.gewinner-name {
    font-size: 1.4em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
}

.gewinner-eintrag.aktuell .gewinner-name {
    color: #1a0f0f;
}

.gewinner-preis {
    font-size: 1.1em;
    color: #d4af37;
}

.gewinner-eintrag.aktuell .gewinner-preis {
    color: #8b4513;
}

.gewinner-tabelle {
    border: 2px solid #8b4513;
    border-radius: 8px;
    overflow: hidden;
}

.tabelle-kopf {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #fff;
    font-weight: bold;
}

.tabelle-zeile {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    background: #2c1810;
    border-bottom: 1px solid #8b4513;
    transition: background-color 0.2s ease;
}

.tabelle-zeile:hover {
    background: #3a2418;
}

.tabelle-zeile:last-child {
    border-bottom: none;
}

.tabelle-zelle {
    padding: 15px;
    border-right: 1px solid #8b4513;
    display: flex;
    align-items: center;
}

.tabelle-zelle:last-child {
    border-right: none;
}

.tabelle-kopf .tabelle-zelle {
    padding: 20px 15px;
}

.gewinner-name {
    color: #d4af37;
    font-weight: bold;
}

.statistik-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.statistik-spalte h3 {
    color: #d4af37;
    border-bottom: 2px solid #8b4513;
    padding-bottom: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.rangliste {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranglisten-eintrag {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #2c1810;
    border: 1px solid #8b4513;
    border-radius: 5px;
    transition: transform 0.2s ease;
}

.ranglisten-eintrag:hover {
    transform: translateX(5px);
    border-color: #d4af37;
}

.rang {
    background: #d4af37;
    color: #1a0f0f;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.name {
    flex: 1;
    color: #e8d8b8;
}

.anzahl {
    color: #c8b090;
    font-size: 0.9em;
}

.keine-gewinner {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #2c1810 0%, #3a2418 100%);
    border: 3px solid #8b4513;
    border-radius: 15px;
    margin: 40px 0;
}

.keine-gewinner .symbol {
    font-size: 4em;
    margin-bottom: 20px;
}

.keine-gewinner h2 {
    color: #d4af37;
    margin-bottom: 15px;
}

.keine-gewinner p {
    color: #c8b090;
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* Responsive Anpassungen für Gewinnerseite */
@media (max-width: 768px) {
    .gewinner-tabelle {
        font-size: 0.9em;
    }
    
    .tabelle-kopf,
    .tabelle-zeile {
        grid-template-columns: 1fr 1fr;
    }
    
    .tabelle-zelle:first-child {
        display: none; /* Datum auf Mobile ausblenden */
    }
    
    .statistik-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gewinner-eintrag {
        padding: 15px;
    }
    
    .gewinner-name {
        font-size: 1.2em;
    }
    
    .gewinner-preis {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .gewinner-tabelle {
        font-size: 0.8em;
    }
    
    .tabelle-zelle {
        padding: 10px 8px;
    }
    
    .tabelle-kopf .tabelle-zelle {
        padding: 15px 8px;
    }
    
    .ranglisten-eintrag {
        padding: 8px;
        gap: 10px;
    }
    
    .rang {
        width: 25px;
        height: 25px;
        font-size: 0.8em;
    }
}

/* Zusätzliche CSS-Regeln für Preis-Bearbeitung */

.preis-menge-verwaltung {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #8b4513;
}

.verfuegbare-menge-form {
    display: flex;
    gap: 5px;
    align-items: center;
}

.menge-input-verfuegbar {
    width: 60px;
    padding: 4px;
    background: #1a0f0f;
    border: 1px solid #8b4513;
    border-radius: 3px;
    color: #e8d8b8;
    text-align: center;
}

.btn-edit {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
    color: #fff;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8em;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #4a7bc8 0%, #2c5aa0 100%);
}

/* Modal Styles - Korrigiert */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto; /* Scrollen falls nötig */
}

.modal-content {
    background: linear-gradient(135deg, #2c1810 0%, #3a2418 100%);
    margin: 50px auto; /* Abstand nach oben */
    padding: 0;
    border: 3px solid #8b4513;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.3s ease;
    position: relative; /* Damit es korrekt positioniert wird */
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #8b4513;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.modal-header h2 {
    color: #d4af37;
    margin: 0;
}

.close {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #d4af37;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

#editForm {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #d4af37;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #1a0f0f;
    border: 1px solid #8b4513;
    border-radius: 5px;
    color: #e8d8b8;
    font-family: inherit;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #8b4513;
}

/* Responsive Anpassungen für Modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px auto;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 10px auto;
        width: 98%;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    #editForm {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.3em;
    }
}

/* Verhindert Scrollen im Hintergrund wenn Modal offen ist */
body.modal-open {
    overflow: hidden;
}