body {
    font-family: 'Inter', sans-serif;
    background-color: #1a202c; /* Dark background */
    color: #e2e8f0; /* Light text */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #2d3748; /* Darker container */
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    width: 800px; /* Max width for larger screens */
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #fc8181; /* Red for aggression */
}

.game-area {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    justify-content: center;
}

.board-container {
    position: relative;
    width: min(100vw - 40px, 600px); /* Responsive width */
    height: min(100vw - 40px, 600px); /* Responsive height */
    margin-bottom: 1.5rem;
    border: 4px solid #4a5568;
    border-radius: 0.5rem;
    overflow: hidden; /* Ensure pieces don't overflow */
}

.board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    height: 100%;
}

.square {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem; /* Adjust piece size */
    cursor: grab;
    user-select: none;
    transition: background-color 0.2s ease-in-out;
}

.light {
    background-color: #cbd5e0;
}

.dark {
    background-color: #4a5568;
}

.selected {
    background-color: #63b3ed; /* Selected square */
}

.highlight {
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35%;
    height: 35%;
    background-color: rgba(246, 173, 85, 0.7);
    border-radius: 50%;
}

.piece {
    cursor: grab;
    font-size: 3.5rem; /* Increased piece size for visibility */
    line-height: 1; /* Remove extra line height */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 10; /* Ensure piece is above highlight */
    transition: transform 0.2s ease-out; /* Smooth movement */
}

.black-piece {
    color: #2d3748; /* Dark piece color */
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.6); /* IMPROVED: Light glow for visibility on dark squares */
}

.white-piece {
    color: #e2e8f0; /* Light text color for white pieces */
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.6); /* IMPROVED: Dark glow for visibility on light squares */
}

.message-box {
    background-color: #4a5568;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 500px;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.insult-message {
    color: #fc8181; /* Red for insults */
    font-weight: 700;
    animation: shake 0.5s;
    animation-iteration-count: 1;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.turn-indicator {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #a0aec0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.game-button {
    background-color: #c53030; /* Red for aggression */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-button:hover {
    background-color: #9b2c2c;
    transform: translateY(-2px);
}

.game-button:active {
    transform: translateY(0);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 200px;
    align-items: center;
}

.persona-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
    color: #333;
    width: 100%;
}

.persona-pfp {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    .board-container {
        width: min(100vw - 30px, 400px);
        height: min(100vw - 30px, 400px);
    }
    .square {
        font-size: 2rem;
    }
    .piece {
        font-size: 2.5rem; /* Increased from 2rem */
    }
    .message-box {
        font-size: 1rem;
        padding: 0.75rem;
    }
    .turn-indicator {
        font-size: 1rem;
    }
    .action-buttons {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
}