/* Copyright (C) 2026 Hauke Christoph, Wellenweg GbR - All rights reserved */

html, body {
    margin: 0; padding: 0;
    width: 100%; height: 100%;
    overflow-y: auto !important;
    overscroll-behavior: none; 
    overflow: hidden;             
    overscroll-behavior: none;    
    background: radial-gradient(circle at 50% 30%, #2a613b 0%, #0f2e1a 80%, #05140b 100%);
    background-attachment: fixed; 
    color: #ecf0f1;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+ */
    user-select: none;         /* Standard */
}

input { 
    text-transform: uppercase; 
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

#game-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.screen {
    padding: 30px 20px 40px 20px; 
    flex-grow: 1;
    display: flex; 
    flex-direction: column;
    justify-content: center; 
    box-sizing: border-box;
}

.top-infos { margin-bottom: 20px; }
.play-area { display: flex; flex-direction: column; align-items: center; width: 100%; }

/* FORMULARE */
input { text-transform: uppercase; }
input, button {
    padding: 15px; margin: 8px 0; font-size: 1.1rem; border: none;
    border-radius: 8px; width: 100%; box-sizing: border-box; font-family: inherit;
}

button {
    background-color: #f1c40f; color: #333; font-weight: bold; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: background 0.2s, transform 0.1s;
}
button:hover { background-color: #f39c12; }

button:disabled, button.danger:disabled, button.btn-secondary:disabled {
    background-color: #4a4a4a !important; color: #888888 !important;
    border: 1px solid #3a3a3a !important; cursor: not-allowed !important;
    box-shadow: none !important; transform: none !important; opacity: 0.65 !important;
}

button.danger { background-color: #e74c3c; color: white; }
button.danger:hover { background-color: #c0392b; }

button.btn-secondary {
    background-color: transparent !important; color: #bdc3c7 !important;
    border: 1px solid #7f8c8d !important; box-shadow: none !important; margin: 0;
}
button.btn-secondary:hover { background-color: rgba(255,255,255,0.05) !important; color: white !important; }

.actions { display: flex; gap: 10px; width: 100%; }
.actions button { flex: 1; margin: 0; }

ul { list-style: none; padding: 0; font-size: 1.2rem; background: rgba(0,0,0,0.3); border-radius: 8px; color: #ecf0f1; }
li { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }

/* INFOS */
.message-box {
    width: 100%; background: rgba(0, 0, 0, 0.2); padding: 12px; text-align: center;
    border-radius: 8px; font-weight: bold; font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.2); box-sizing: border-box; margin-bottom: 12px;
}
.status-box {
    width: 100%; background: rgba(241, 196, 15, 0.12); border: 1px solid #f1c40f;
    padding: 12px; text-align: center; border-radius: 8px; font-size: 0.95rem;
    color: #f1c40f; margin-top: -5px; margin-bottom: 12px;
    box-sizing: border-box; white-space: pre-line; box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.table-area, .player-area { width: 100%; display: flex; flex-direction: column; align-items: center; }
.area-title { font-size: 1.1rem; font-weight: bold; color: #f1c40f; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); margin-bottom: 12px; display: block; }

.card-container { 
    display: flex; 
    flex-direction: row; 
    justify-content: center; 
    gap: 8px; 
    width: 100%; 
    flex-wrap: wrap;
}

.card {
    background: #ffffff; color: #2c3e50;
    width: 75px; 
    height: 112px;
    border-radius: 10px; box-shadow: 0 5px 12px rgba(0,0,0,0.4); border: 1px solid #e2e8f0;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 8px; position: relative; user-select: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer;
    box-sizing: border-box; flex-shrink: 0;
}

.card.back {
    background: repeating-linear-gradient(45deg, #e74c3c, #e74c3c 8px, #c0392b 8px, #c0392b 16px);
    border: 3px solid #ffffff;
    box-shadow: 0 6px 15px rgba(0,0,0,0.5);
}
.card.back:hover {
    transform: translateY(-5px);
}

.card.red { color: #e74c3c; }
.card:hover { transform: translateY(-8px); box-shadow: 0 10px 20px rgba(0,0,0,0.6); }
.card.selected { border: 2px solid #f1c40f; box-shadow: 0 0 15px rgba(241, 196, 15, 0.8); transform: translateY(-10px); }

.card-top { display: flex; flex-direction: column; align-items: center; align-self: flex-start; font-size: 0.9rem; font-weight: bold; line-height: 1; }
.card-center { font-size: 2.1rem; text-align: center; align-self: center; line-height: 1; }
.card-bottom { display: flex; flex-direction: column; align-items: center; align-self: flex-end; transform: rotate(180deg); font-size: 0.9rem; font-weight: bold; line-height: 1; }
#playerCountMsg {
    text-align: center !important;
    display: block;
    width: 100%; 
    font-size: 1.1rem;
    color: #bdc3c7;
    margin-top: 15px;
}

#btnMau:not(:disabled) {
    background-color: #7f8c8d !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
}
#btnMau:not(:disabled):hover {
    background-color: #95a5a6 !important; 
}
