* { box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body {
    margin: 0;
    background: radial-gradient(circle at center, #1e1b4b 0%, #090a0f 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}
.hidden { display: none !important; }
.screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 15px; }

/* Lobby */
.lobby-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 35px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    width: 100%;
    max-width: 380px;
}
.lobby-card input {
    width: 100%; padding: 12px; margin: 8px 0; border-radius: 8px;
    border: none; font-size: 16px; text-align: center;
}
.btn-primary, .btn-start, .btn-uno {
    padding: 12px 24px; border: none; border-radius: 8px; font-weight: bold;
    cursor: pointer; font-size: 16px; transition: transform 0.15s;
}
.btn-primary { width: 100%; background: #f59e0b; color: #111; margin-top: 10px; }
.btn-start { background: #10b981; color: #fff; }
.btn-uno { background: linear-gradient(45deg, #ef4444, #f97316); color: #fff; box-shadow: 0 0 15px rgba(239,68,68,0.6); }
button:hover { transform: scale(1.05); }
.error { color: #f87171; margin-top: 10px; }

/* Masa de joc */
#game { justify-content: space-between; }
.top-bar {
    width: 100%; max-width: 1000px; display: flex; justify-content: space-between;
    align-items: center; background: rgba(0,0,0,0.4); padding: 10px 20px; border-radius: 12px;
}
.turn-badge { background: #3b82f6; padding: 6px 14px; border-radius: 20px; font-weight: bold; }

.opponents-row { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.opponent {
    background: rgba(255,255,255,0.08); padding: 10px 18px; border-radius: 12px;
    border: 2px solid transparent; text-align: center;
}
.opponent.active { border-color: #fbbf24; box-shadow: 0 0 12px rgba(251,191,36,0.5); }

.table-center { display: flex; gap: 25px; align-items: center; margin: 15px 0; }

/* Design Cărți Fantasy */
.card {
    width: 105px; height: 155px; border-radius: 14px; padding: 8px;
    display: flex; flex-direction: column; justify-content: space-between;
    align-items: center; position: relative; user-select: none;
    box-shadow: 0 8px 18px rgba(0,0,0,0.6); border: 3px solid #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}
.my-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 1000px; padding-bottom: 10px; }
.my-hand .card { cursor: pointer; }
.my-hand .card:hover { transform: translateY(-16px) scale(1.05); z-index: 10; }

.card.red { background: linear-gradient(135deg, #dc2626, #7f1d1d); }
.card.blue { background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.card.green { background: linear-gradient(135deg, #16a34a, #14532d); }
.card.yellow { background: linear-gradient(135deg, #eab308, #854d0e); }
.card.wild { background: conic-gradient(from 45deg, #dc2626, #2563eb, #16a34a, #eab308, #dc2626); }

.back-card {
    background: linear-gradient(135deg, #312e81, #1e1b4b);
    border-color: #fbbf24; justify-content: center; cursor: pointer;
}
.card-corner { align-self: flex-start; font-weight: 900; font-size: 16px; text-shadow: 1px 1px 2px #000; }
.card-art { font-size: 42px; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.6)); }
.card-title { font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; text-shadow: 1px 1px 2px #000; text-align: center; }

/* Modal & Toast */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8);
    display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal-content { background: #1e293b; padding: 25px; border-radius: 16px; text-align: center; }
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; }
.color-choice { padding: 15px; border: none; border-radius: 10px; color: #fff; font-weight: bold; font-size: 16px; cursor: pointer; }
.color-choice.red { background: #dc2626; }
.color-choice.blue { background: #2563eb; }
.color-choice.green { background: #16a34a; }
.color-choice.yellow { background: #ca8a04; }

.toast {
    position: fixed; top: 75px; background: #fbbf24; color: #111;
    padding: 10px 20px; border-radius: 20px; font-weight: bold; z-index: 90;
}