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

/* 1. GRUND-SETUP (Typ B - Natürliches Scrolling) */
html, body {
    margin: 0; padding: 0;
    width: 100%; 
    min-height: 100%;             
    overflow-y: auto !important;   
    overscroll-behavior: none;    
    background: radial-gradient(circle at 50% 30%, #2a613b 0%, #0f2e1a 80%, #05140b 100%);
    background-attachment: fixed; 
    color: #ecf0f1;
    display: flex;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}

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

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

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

/* 3. FORMULARE & BUTTONS */
input { text-transform: uppercase; -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text; }
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; width: 100%; }
li { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }

/* 4. SPIELFELD 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; transition: all 0.3s ease; }
.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; text-align: center; }

/* 5. KARTEN-CONTAINER (Tischmitte) */
.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.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; font-size: 1.1rem; color: #bdc3c7; margin-top: 15px; }

/* 6. GENERAL SPEZIAL: ÜBERLAPPENDE HANDKARTEN */
.hand-wrapper {
    width: 100%;
    overflow-x: auto; /* Scrollbar, falls die Hand extrem groß wird */
    padding: 15px 0;
    scrollbar-width: none;
    margin-bottom: 20px;
}
.hand-wrapper::-webkit-scrollbar { display: none; }

.hand-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
}

/* Die Magie: Jede Karte rückt 35px nach links unter die vorherige! */
.hand-cards .card {
    margin-left: -35px; 
    box-shadow: -4px 0 10px rgba(0,0,0,0.3); /* Schatten nach links zur Abgrenzung */
}
.hand-cards .card:first-child {
    margin-left: 0;
    box-shadow: 0 5px 12px rgba(0,0,0,0.4);
}
.hand-cards .card:hover {
    transform: translateY(-15px);
    z-index: 10;
}

