body {
    font-family: 'Courier New', monospace;
    background-color: #0a0a12;
    color: #00ff9d;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 80, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 100, 0.1) 0%, transparent 20%);
}

h1 {
    color: #ff073a;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff073a, 0 0 20px #ff073a;
    font-weight: 700;
    letter-spacing: 3px;
    border-bottom: 3px solid #00ff41;
    padding-bottom: 15px;
    background: rgba(0, 10, 20, 0.7);
    width: 100%;
    padding: 15px;
    border-top: 1px solid #ff073a;
    font-family: 'Orbitron', sans-serif;
    position: relative;
}

h1::after {
    content: "TACTICAL SIMULATION";
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    font-size: 12px;
    color: #00ff41;
    text-align: center;
    letter-spacing: 5px;
}

#chessboard {
    display: grid;
    grid-template-columns: repeat(10, 80px);
    grid-template-rows: repeat(10, 80px);
    gap: 0;
    border: 3px solid #00f0ff;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
    position: relative;
    margin-bottom: 20px;
    background-color: #000022;
}

.square {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.square.light {
    background-color: #001a33;
}

.square.dark {
    background-color: #0d0033;
}

.piece {
    width: 70px;
    height: 70px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    pointer-events: none;
    transition: all 0.3s ease;
    will-change: transform;
    filter: drop-shadow(0 0 5px currentColor);
}

.piece.selected {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px gold) brightness(1.3);
}

.piece.moving {
    z-index: 20;
    filter: drop-shadow(0 0 10px #00ff9d);
}

.highlight {
    box-shadow: inset 0 0 15px 5px rgba(0, 240, 255, 0.5);
    cursor: pointer;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.2) 0%, transparent 70%);
}

.attack-highlight {
    box-shadow: inset 0 0 15px 5px rgba(255, 0, 100, 0.7);
    background: radial-gradient(circle, rgba(255, 0, 100, 0.3) 0%, transparent 70%);
    animation: pulse-red 1.5s infinite;
}

.path-highlight {
    box-shadow: inset 0 0 15px 5px rgba(0, 255, 150, 0.5);
    background: radial-gradient(circle, rgba(0, 255, 150, 0.2) 0%, transparent 70%);
}

.retreat-highlight {
    box-shadow: inset 0 0 15px 5px rgba(0, 100, 255, 0.7);
    background: radial-gradient(circle, rgba(0, 100, 255, 0.3) 0%, transparent 70%);
    animation: pulse-blue 1.5s infinite;
}

.push-highlight {
    box-shadow: inset 0 0 15px 5px rgba(255, 165, 0, 0.7);
    background: radial-gradient(circle, rgba(255, 165, 0, 0.3) 0%, transparent 70%);
    animation: pulse-orange 1.5s infinite;
}

.destroy-highlight {
    box-shadow: inset 0 0 15px 5px rgba(255, 0, 255, 0.7);
    background: radial-gradient(circle, rgba(255, 0, 255, 0.3) 0%, transparent 70%);
}

@keyframes pulse-red {
    0% { box-shadow: inset 0 0 15px 5px rgba(255, 0, 100, 0.7); }
    50% { box-shadow: inset 0 0 25px 10px rgba(255, 0, 100, 0.9); }
    100% { box-shadow: inset 0 0 15px 5px rgba(255, 0, 100, 0.7); }
}

@keyframes pulse-blue {
    0% { box-shadow: inset 0 0 15px 5px rgba(0, 100, 255, 0.7); }
    50% { box-shadow: inset 0 0 25px 10px rgba(0, 100, 255, 0.9); }
    100% { box-shadow: inset 0 0 15px 5px rgba(0, 100, 255, 0.7); }
}

@keyframes pulse-orange {
    0% { box-shadow: inset 0 0 15px 5px rgba(255, 165, 0, 0.7); }
    50% { box-shadow: inset 0 0 25px 10px rgba(255, 165, 0, 0.9); }
    100% { box-shadow: inset 0 0 15px 5px rgba(255, 165, 0, 0.7); }
}

.column-label, .row-label {
    position: absolute;
    font-size: 12px;
    font-weight: bold;
    color: #ffee00;
    z-index: 5;
    pointer-events: none;
    text-shadow: 0 0 5px #4f5503;
}

.column-label {
    bottom: 2px;
    right: 2px;
}

.row-label {
    top: 2px;
    left: 2px;
}

.region-name {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 0 10px currentColor;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

#status {
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    padding: 15px 30px;
    background-color: rgba(0, 20, 10, 0.8);
    border-radius: 0;
    text-align: center;
    min-width: 400px;
    border: 2px solid #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    color: #00ff41;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'VT323', monospace;
    position: relative;
    border-left: 10px solid #ff073a;
}

#status::before {
    content: "BATTLE STATUS:";
    position: absolute;
    top: -10px;
    left: 10px;
    background: #000a1a;
    padding: 0 10px;
    font-size: 14px;
    color: #ff073a;
}

.button-container {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    border: 1px solid #00ff41;
    padding: 20px;
    background: rgba(0, 10, 20, 0.7);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

button {
    padding: 15px 30px;
    font-size: 20px;
    background-color: rgba(0, 30, 15, 0.8);
    color: #00ff41;
    border: 1px solid #00ff41;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    font-family: 'VT323', monospace;
    position: relative;
    overflow: hidden;
}

button:hover {
    background-color: rgba(255, 7, 58, 0.3);
    box-shadow: 0 0 25px rgba(255, 7, 58, 0.5);
    color: #ffffff;
    border-color: #ff073a;
}

button:active {
    background-color: rgba(255, 7, 58, 0.5);
    transform: translateY(2px);
}

button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 65, 0.4),
        transparent
    );
    transition: 0.5s;
}

button:hover::after {
    left: 100%;
}

.smoke-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: smokeDrift 3s ease-out forwards;
    background: radial-gradient(circle, #00f0ff 0%, transparent 70%);
}

@keyframes smokeDrift {
    0% {
        transform: translate(0, 0);
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--drift-x), var(--drift-y));
        opacity: 0;
    }
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000a1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 1s;
    background-image: 
        radial-gradient(circle at center, rgba(0, 255, 65, 0.1) 0%, transparent 70%),
        repeating-linear-gradient(
            0deg,
            rgba(0, 80, 0, 0.1),
            rgba(0, 80, 0, 0.1) 1px,
            transparent 1px,
            transparent 2px
        );
}

#loading-screen h2 {
    color: #00ff41;
    margin-bottom: 30px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 3px;
    text-shadow: 0 0 10px #00ff41;
    font-size: 2rem;
    position: relative;
}

#loading-screen h2::after {
    content: "SYSTEM INITIALIZATION";
    position: absolute;
    bottom: -25px;
    left: 0;
    width: 100%;
    font-size: 0.8rem;
    color: #ff073a;
    text-align: center;
    letter-spacing: 5px;
}

.loader {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(0, 255, 65, 0.2);
    border-top: 5px solid #ff073a;
    border-bottom: 5px solid #ff073a;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    box-shadow: 0 0 20px rgba(255, 7, 58, 0.5);
    position: relative;
}

.loader::before {
    content: "";
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 3px solid rgba(0, 255, 65, 0.1);
    border-radius: 50%;
    animation: spin-reverse 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

.status-critical {
    position: absolute;
    bottom: 20px;
    color: #ff073a;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    letter-spacing: 2px;
    animation: blink-alert 0.5s step-end infinite alternate;
}

@keyframes blink-alert {
    from { opacity: 1; }
    to { opacity: 0.3; }
}

.dragging {
    opacity: 0.5;
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px #00ff9d);
}

.drop-target {
    box-shadow: inset 0 0 20px 5px rgba(0, 255, 255, 0.7);
}