body {
    font-family: Arial, sans-serif;
    background-color: white;
    color: white;
    text-align: center;
    padding: 40px;
    margin: 0;
}
h1 {
    font-family: 'Orbitron', sans-serif;
    color: black;
    text-align: center;
    font-size: 80px;
    padding: 20px;
    margin: 0; 
}

#builder {
    display: grid;
    grid-template-columns: 420px 600px;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin: 40px auto 30px;
}
#left-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
#controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}
#element-info {
    width: 320px;
    padding: 20px;
    background-color: #20202c;
    border: 1px solid #4a4a68;
    border-radius: 10px;
    text-align: left;
}
#element-info p {
    background-color: #2a2a38;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

.particle-control {
    background-color: #2a2a38;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    white-space: nowrap;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.particle-control span {
    display: inline-block;
    min-width: 3ch;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.particle-control button {
    flex-shrink: 0;
    margin: 0;
}

button {
    font-size: 1.2rem;
    padding: 5px 15px;
    margin: 0 10px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4a4a68;
    color: white;
}

button:hover{
    background-color: #6a6a88;
}

#nucleus-container {
    width: 600px;
    height: 600px;
    margin: 0;
    border: 2px dashed #000094;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #340275;
}

#nucleus {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;

}

.particle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    position: absolute;
    transition: all 0.3s ease;
}
.particle:nth-child(even) {
    transform: translateY(6px);
}
.particle:nth-child(3n) {
    transform: translateX(-4px);
}

.particle:hover {
    transform: scale(1.15);
    z-index: 10;
}
.proton {
    background: radial-gradient(circle at 30% 30%, #66b2ff, #0056b3 70%, #002b5b);
    box-shadow: 1px 2px 4px rgba(0,0,0,0.6);
}
.neutron {
    background: radial-gradient(circle at 30% 30%, #ffffff, #d9d9d9 70%, #002b5b);
    box-shadow: 1px 2px 4px rgba(0,0,0,0.6);
}
.element-builder {
    position: absolute;
    top: 20px;
    left: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #2a2a38;
    color: #ffffff;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #4a4a68;
    transition: all 0.2s ease;
    }
.element-builder:hover {
    background-color: #3a3a4d;
    border-color: #007bff;
    transform: translateY(-2px);
}
.link-text {
    font-size: 0.95rem;
    font-weight: bold;
}

@media (max-width: 700px) {
    #builder {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    #left-panel {
        width: min(100%,600px);
    }
    #nucleus-container {
        width: min(600px, 90vw);
        height: min(600px, 90vw);
    }
}
