/* app_alpha/public/css/game.css */
/* Version: FINAL GOLD STANDARD (Full Width + Start Fix) 🏆 */

/* --- LAYOUT CONTAINER --- */
#game-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#screenGame {
    width: 100%;
    /* Keine künstliche Begrenzung, nutzt die volle Breite der Box */
    max-width: 100%; 
    margin: 0 auto;
    
    /* WICHTIG: Standardmäßig ausgeblendet! 
       Das JS schaltet dies auf 'flex', sobald man Start klickt. */
    display: none; 
    
    flex-direction: column;
    gap: 20px;
    padding-bottom: 40px; 
}

#game-container { 
    margin-top: 10px; 
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* === SORTIER-ELEMENTE (DIE KARTEN) === */
.line-item { 
    position: relative;
    width: 100% !important;
    box-sizing: border-box !important;
    
    /* Flexibel für Text */
    display: flex;
    justify-content: space-between;
    align-items: center; 
    
    padding: 16px 20px;
    background-color: #ffffff; 
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    cursor: pointer; 
    transition: all 0.2s ease;
    
    /* Text Styles */
    font-size: var(--card-font-size, 1.5rem);
    font-weight: var(--app-font-weight, 400);
    color: #334155;
    user-select: none;
    line-height: 1.4;
    
    /* Höhe muss wachsen können für lange Sätze */
    min-height: 70px; 
    height: auto; 
}

.line-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
    z-index: 2;
}

/* Status: Ausgewählt (zum Tauschen) */
.line-item.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    transform: scale(1.005);
    z-index: 10;
}

/* Ergebnis-Status (Statisch) */
.line-item.correct {
    background-color: #dcfce7; 
    border-color: #22c55e; 
    color: #15803d; 
    cursor: default;
}

.line-item.wrong {
    background-color: #fee2e2; 
    border-color: #ef4444; 
    color: #b91c1c; 
    cursor: default;
}

/* --- TEXT LOGIK --- */
.item-text {
    flex-grow: 1;           
    white-space: normal;    /* Erlaubt Umbruch */
    word-break: break-word; 
    padding-right: 20px;    
    text-align: left;
}

/* Die Nummer rechts */
.position-badge {
    background-color: #94a3b8;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-left: auto;      
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.line-item.selected .position-badge { background-color: #3b82f6; }
.line-item.correct .position-badge { background-color: #22c55e; }
.line-item.wrong .position-badge { background-color: #ef4444; }

/* Artikel-Highlighting (optional) */
.article-hint {
    color: #94a3b8;
    font-size: 0.85em;
    font-weight: normal;
    margin-right: 6px;
    display: inline-block;
}

/* --- ERGEBNIS-LISTE (Protokoll Styles) --- 
#result-summary {
    width: 100%;
    margin-bottom: 25px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden; 
}*/

/* === RESULT TABLE === */
/* Now using global .gr-table from /assets/css/games.css */

/* Responsive Anpassungen */
@media (max-width: 600px) {
    #screenGame { padding: 0; }
    .line-item { padding: 12px 15px; font-size: 1.1rem !important; } 
    .position-badge { width: 28px; height: 28px; font-size: 0.8rem; }
}