body {
    margin: 0;
    padding: 0;
    background-color: #0d0114;
    color: white;
    font-family: 'Cairo', sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.game-header {
    width: 100%;
    padding: 10px 20px;
    background: rgba(26, 4, 37, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #5d4037;
    position: absolute;
    top: 0;
    z-index: 100;
}

.game-title {
    font-weight: 900;
    font-size: 1.5rem;
    color: #fbc02d;
    text-shadow: 0 0 10px rgba(251, 192, 45, 0.5);
}

button {
    background: #fbc02d;
    color: #0d0114;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    transform: scale(1.05);
    background: #fdd835;
}

#powerMeter {
    position: absolute;
    left: 40px;
    bottom: 40px;
    width: 25px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(251, 192, 45, 0.5);
    border-radius: 15px;
    z-index: 150;
    overflow: hidden;
    display: flex;
    flex-direction: column-reverse;
}

#powerFill {
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, #4caf50, #fbc02d, #f44336);
    box-shadow: 0 0 15px currentColor;
    transition: height 0.1s linear;
}

.power-label {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: bold;
    color: #fbc02d;
}

main {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: auto;
    aspect-ratio: 2 / 1;
    margin-top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: none; /* لمنع سحب الصفحة أثناء اللعب */
}

canvas {
    position: absolute;
    width: 100% !important;
    height: 100% !important;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

#tableCanvas {
    z-index: 1;
}

#canvas {
    z-index: 2;
    cursor: crosshair;
}

dialog {
    background: rgba(26, 4, 37, 0.95);
    border: 2px solid #fbc02d;
    border-radius: 20px;
    padding: 40px;
    color: white;
    box-shadow: 0 0 50px rgba(0,0,0,1);
    backdrop-filter: blur(10px);
}

dialog::backdrop {
    background: rgba(0,0,0,0.8);
}

.dialog-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#dialogContent {
    font-size: 1.2rem;
    font-weight: bold;
}
