* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    color: white;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.game-setup {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.setup-section {
    margin-bottom: 15px;
}

.setup-section h3 {
    margin-bottom: 10px;
    color: #ffcc00;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-btn {
    background: #4a4a8a;
    border: none;
    border-radius: 8px;
    color: white;
    padding: 10px 5px;
    cursor: pointer;
    transition: all 0.3s;
}

label,input.username {
    background: #4a4a8a;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #fff;
    padding: 10px 5px;
    transition: all 0.3s;
}
input.username{
    background: #fff;
    color: #000;
    width: 20%;
    border: 1px solid #4a4a8a;
}

.option-btn:hover {
    background: #5a5aaa;
    transform: translateY(-2px);
}

.option-btn.active {
    background: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.7);
}

.start-btn {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
}

.start-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(255, 75, 43, 0.7);
}

.game-area {
    display: none;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.phase-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #ffcc00;
}

.players-info {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 20px;
}

.player-panel {
    background: rgba(74, 74, 138, 0.7);
    border-radius: 10px;
    padding: 15px;
    width: 40%;
    text-align: center;
}

.active{
    /*background: rgba(0, 0, 255, 0.8);*/
    border:2px solid blue;
}

.player-name {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.active .player-name{
    font-size: 2rem;
}

.lives {
    font-size: 1.2rem;
}

.heart {
    color: #ff6b6b;
    margin: 0 2px;
}

.game-grid {
    display: grid;
    gap: 10px;
    margin: 20px auto;
    max-width: 600px;
}

.grid-3x3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4x4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-4x5 {
    grid-template-columns: repeat(5, 1fr);
}

.grid-5x5 {
    grid-template-columns: repeat(5, 1fr);
}

.grid-item {
    aspect-ratio: 1;
    background: #4a4a8a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.grid-item:hover {
    transform: scale(1.05);
    background: #5a5aaa;
}

.grid-item.selected {
    animation: pulse 1.5s infinite;
    border: 2px solid #ff0000;
}

.grid-item.poisoned {
    color: #ff0000;
}

.grid-item.hit {
    color: #000000;
    background: #cccccc;
}

.grid-item.safe {
    color: #cccccc;
}

.controls {
    text-align: center;
    margin-top: 20px;
}

.next-phase-btn {
    padding: 12px 25px;
    font-size: 1.1rem;
    background: linear-gradient(to right, #00b09b, #96c93d);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.next-phase-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 176, 155, 0.7);
}

.next-phase-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.instructions {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.instructions h2 {
    color: #ffcc00;
    margin-bottom: 15px;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 10px;
    line-height: 1.5;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.flash {
    animation: flash 0.5s ease-in-out;
}

.hidden {
    display: none;
}

.message {
    text-align: center;
    font-size: 1.5rem;
    margin: 20px 0;
    min-height: 2rem;
}

.winner-message {
    font-size: 2rem;
    color: #ffcc00;
    text-align: center;
    margin: 20px 0;
}
