/* public/knack/css/style.css */
/* Copyright (C) 2026 Hauke Christoph, Wellenweg GbR - All rights reserved */

/* 1. GRUND-SETUP (Poker-Tisch Hintergrund, Schriftfarbe & PWA-Sperren) */
html, body {
    margin: 0; padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;             /* Verhindert das Browser-Hintergrund-Scrollen */
    overscroll-behavior: none;    /* Deaktiviert Pull-to-refresh (Nach-unten-Wischen)! */
    background: radial-gradient(circle at 50% 30%, #2a613b 0%, #0f2e1a 80%, #05140b 100%); /* DER GRÜNE POKERTISCH-VERLAUF */
    color: #ecf0f1;               /* Edles, helles Wonnemo-Lichtgrau */
    display: flex;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#game-container {
    width: 100%;
    max-width: 450px; /* Perfekter Mobile-Viewport */
    height: 100vh;    /* Fallback */
    height: 100dvh;   /* Nutzt Dynamic Viewport Height für exakte PWA-Höhenanpassung */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Sperrt Scrollbalken aus */
}

/* 2. DIE SCREENS (Saubere, weite Puffer-Abstände für PC/Handy) */
.screen {
    padding: 45px 20px 35px 20px; 
    height: 100%;
    display: flex; 
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

#login-screen {
    justify-content: center;
    text-align: center;
}

/* Automatische Großbuchstaben im Eingabefeld */
input {
    text-transform: uppercase;
}

/* Formularkomponenten */
input, button {
    padding: 15px;
    margin: 10px 0;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}
button {
    background-color: #f1c40f; /* Goldener Button */
    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; }

/* Deaktivierte Buttons optisch entkräften */
button:disabled, 
button.danger:disabled,
button.btn-secondary:disabled {
    background-color: #4a4a4a !important; /* Dunkles Grau */
    color: #888888 !important;            /* Muted Textfarbe */
    border: 1px solid #3a3a3a !important;
    cursor: not-allowed !important;       /* Blockiert-Mauszeiger */
    box-shadow: none !important;          /* Kein Glühen */
    transform: none !important;           /* Kein Hochspringen beim Drüberfahren */
    opacity: 0.65 !important;             /* Leicht transparent */
}

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

/* Sekundärer Button (z.B. Verlassen) - Dezent im Hintergrund (Grauer Outline-Look) */
button.btn-secondary {
    background-color: transparent !important;
    color: #bdc3c7 !important;
    border: 1px solid #7f8c8d !important;
    box-shadow: none !important;
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}
button.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
    border-color: #bdc3c7 !important;
}

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); text-align: center; }

/* 3. SPIELFELD ELEMENTE (Tisch, Hand & Infobox) */
.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: 15px;
    transition: all 0.3s ease;
}

/* Stil für die dezente Info- und Ergebnisbox */
.status-box {
    width: 100%;
    background: rgba(241, 196, 15, 0.12); /* Zartes Gold */
    border: 1px solid #f1c40f;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #f1c40f;
    margin-top: -5px;
    margin-bottom: 15px;
    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; /* Edles Gold für die Beschriftung */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    margin-bottom: 10px;
    display: block;
}

/* 4. KARTEN-CONTAINER */
.card-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 30px; /* Schön weit für griffsichere Bedienung */
}

/* 5. DAS PREMIUM KISS-KARTEN DESIGN (Groß, prächtig und scharf) */
.card {
    background: #ffffff;
    color: #2c3e50;
    width: 90px;       
    height: 135px;      
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    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);
}

/* Erweitertes Styling für ausgewählte Karten beim Tauschen */
.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: 1rem;
    font-weight: bold;
    line-height: 1;
}

.card-center {
    font-size: 2.8rem; 
    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: 1rem;
    font-weight: bold;
    line-height: 1;
}

/* Buttons unten nebeneinander */
.actions {
    display: flex;
    gap: 10px;
    width: 100%;
}
.actions button {
    flex: 1;
    margin: 0;
}

#playerCountMsg {
    text-align: center;
    font-size: 1.1rem;
    color: #bdc3c7;
    margin-top: 15px;
}
