.senet-container {
    max-width: 100%;
    margin: 1em auto;
    text-align: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 1em;
    box-sizing: border-box;
    font-family: sans-serif;
}

.senet-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(3, auto);
    aspect-ratio: 10 / 3;
    gap: 2px;
    background-size: contain;
    background-repeat: no-repeat;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.senet-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(0, 0, 0, 0.2);
    flex-direction: row;
    gap: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.senet-cell .piece {
    width: 45%;
    max-height: 90%;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* When both players are on the same cell */
.senet-cell.both-players {
    background: rgba(255, 255, 0, 0.2);
    border: 2px solid #ffaa00;
}

.senet-cell.both-players .piece {
    width: 35%;
    max-height: 75%;
}

.senet-cell .player {
    z-index: 2;
}

.senet-cell .ai {
    z-index: 1;
}

.senet-controls {
    margin-top: 1em;
}

.senet-controls button {
    padding: 10px 20px;
    font-size: 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.senet-controls button:hover {
    background: #45a049;
}

.senet-controls button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

#senet-restart {
    background: #2196F3;
}

#senet-restart:hover {
    background: #1976D2;
}

#senet-message {
    margin-top: 1em;
    font-size: 18px;
    font-weight: bold;
    min-height: 25px;
}

.senet-rules {
    margin-top: 1em;
    text-align: left;
    background: rgba(255,255,255,0.9);
    padding: 1em;
    border-radius: 8px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.senet-rules summary {
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 0.5em;
    text-align: center;
    font-size: 18px;
}

.senet-rules-text h3 {
    color: #8B4513;
    text-align: center;
}

.senet-rules-text ul {
    line-height: 1.6;
}

.senet-rules-text li {
    margin-bottom: 0.5em;
}

/* Responsive design */
@media (max-width: 768px) {
    .senet-container {
        padding: 0.5em;
    }
    
    .senet-controls button {
        padding: 8px 16px;
        font-size: 14px;
        margin: 5px;
    }
    
    .senet-cell .piece {
        width: 40%;
        max-height: 80%;
    }
    
    .senet-cell.both-players .piece {
        width: 30%;
        max-height: 70%;
    }
}