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

/* 1. GRUND-SETUP */
html, body {
    margin: 0; padding: 0;
    width: 100%; height: 100%;
    overflow: hidden;             
    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;
    align-items: 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;
    height: 100vh;    
    height: 100dvh;   
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    box-sizing: border-box;
}

/* 2. LAYOUT */
.screen {
    padding: 20px; 
    width: 100%;
    height: 100%;
    display: flex; 
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

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

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

/* 4. SPIELFELD INFOS */
#infoBox {
    margin-bottom: 25px;
}

.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;
    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; 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; }

/* 5. KARTEN-CONTAINER & KARTEN */
.play-area {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    grid-template-rows: repeat(8, 1fr);    
    gap: 8px;
    width: 100%;
    max-width: 300px;    
    aspect-ratio: 1 / 2; 
    margin: 0 auto;
    box-sizing: border-box;
}

.memory-card {
    background: #ffffff;
    color: #2c3e50;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border: 3px solid #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem; 
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
}

.memory-card.back {
    background: repeating-linear-gradient(45deg, #e74c3c, #e74c3c 6px, #c0392b 6px, #c0392b 12px);
    border: 3px solid #ffffff; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.memory-card.red {
    color: #e74c3c;
}

.memory-card.solved {
    opacity: 0.15 !important;
    pointer-events: none !important;
    box-shadow: none !important;
}

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