/* Isolated Container to protect Sidebar/Tools */
#math-archer-root {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
    font-family: 'Segoe UI', Arial, sans-serif;
}

#math-archer-viewport {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 600px;
    background: linear-gradient(to bottom, #87ceeb 70%, #2ecc71 70%);
    border: 6px solid #2c3e50;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    touch-action: manipulation;
}

.math-archer-ui {
    position: absolute;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    z-index: 100;
}

.ui-target span {
    background: #e74c3c;
    padding: 2px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 22px;
}

.ui-item { font-size: 14px; font-weight: bold; }

/* BLUE TARGET BOARDS */
.target-board {
    position: absolute;
    width: 50px;
    height: 50px;
    background: #3498db; /* Solid Blue Color */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: white; /* White text for blue background */
    border: 2px solid #2980b9;
    z-index: 50;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Static Bow - Stays in place */
#math-static-bow {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) rotate(50deg); 
    font-size: 55px;
    z-index: 80;
    user-select: none;
    pointer-events: none;
}

#math-arrow-projectile {
    position: absolute;
    width: 4px;
    height: 40px;
    background: #5d4037;
    display: none;
    z-index: 70;
    border-radius: 2px;
}

#math-arrow-projectile::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -5px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 12px solid #bdc3c7;
}

#math-feedback {
    position: absolute;
    top: 55%;
    width: 100%;
    text-align: center;
    font-size: 26px;
    font-weight: bold;
    opacity: 0;
    z-index: 110;
    pointer-events: none;
    transition: opacity 0.3s;
}

#math-victory-screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    color: white;
    text-align: center;
}

.math-hidden { display: none !important; }

.btn-group button {
    padding: 12px 25px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}

.btn-group .close-btn { background: #e74c3c; color: white; }
.btn-group button:not(.close-btn) { background: #2ecc71; color: white; }