body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: white;
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    overflow: hidden;
}

#ui {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 10;
    pointer-events: none;
    background: rgba(10, 25, 47, 0.6);
    padding: 30px;
    border-radius: 28px;
    border: 1px solid rgba(0, 242, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 242, 255, 0.1);
    backdrop-filter: blur(12px);
    min-width: 320px;
    transition: all 0.5s ease;
}

h1 {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: #00f2ff;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
    padding-bottom: 15px;
    text-align: center;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label {
    font-size: 0.8rem;
    color: #88a;
    font-weight: bold;
}

.value {
    font-size: 1.1rem;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
}

#message {
    margin-top: 25px;
    background: linear-gradient(135deg, #00ff88, #00ffcc);
    color: #002211;
    padding: 12px;
    text-align: center;
    font-weight: 800;
    border-radius: 16px;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    animation: pulse 1.5s infinite ease-in-out;
}

.hidden {
    display: none;
}

@keyframes pulse {
    0% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.8; transform: scale(1); }
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#game-container canvas {
    display: block;
}

/* Estilos do Transferidor */
#toggle-protractor {
    margin-top: 20px;
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.1), rgba(0, 242, 255, 0.05));
    border: 1px solid rgba(0, 242, 255, 0.5);
    color: #00f2ff;
    padding: 12px 20px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    pointer-events: auto;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
}

#toggle-protractor:hover {
    background: rgba(0, 242, 255, 0.2);
    border-color: #00f2ff;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
    transform: translateY(-2px);
}

#protractor-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    z-index: 100;
    pointer-events: none;
}

#protractor {
    width: 100%;
    height: 100%;
    pointer-events: auto;
    cursor: move;
    position: relative;
    /* Remover background-image antigo */
}

/* Estilos para o SVG Gerado */
.protractor-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.prot-text {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    fill: #00f2ff;
    text-anchor: middle;
    dominant-baseline: middle;
    user-select: none;
}

#rotate-handle {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: #ff0055;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: crosshair;
    box-shadow: 0 0 15px #ff0055;
    z-index: 101;
    transition: transform 0.2s;
}

#rotate-handle:hover {
    transform: translateX(-50%) scale(1.2);
}
