body {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    color: #e0e0e0;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0 0 40px 0;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1,
h2 {
    color: #a8ff78;
    text-shadow: 1px 1px 8px #222;
    margin-top: 30px;
    letter-spacing: 1px;
    animation: fadeInDown 1s;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em;
    letter-spacing: 2px;
}

h2 {
    margin-bottom: 10px;
    font-size: 1.5em;
    text-align: center;
}

form,
.figura-section {
    background: rgba(34, 40, 49, 0.95);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    padding: 24px 32px 18px 32px;
    margin: 32px auto 0 auto;
    max-width: 600px;
    width: 100%;
    animation: fadeInUp 1.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.figura-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
    margin-bottom: 10px;
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: none;
    width: 100%;
}

.figura-row>div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    width: 220px;
}

.figura-canvas {
    background: #232526;
    border-radius: 10px;
    box-shadow: 0 2px 8px #0004;
    transition: box-shadow 0.3s, transform 0.3s;
    margin-left: 16px;
    margin-right: 16px;
    align-self: center;
}

.figura-canvas:hover {
    box-shadow: 0 6px 24px #39ff1466;
    transform: scale(1.08) rotate(-2deg);
}

label {
    display: flex;
    align-items: center;
    margin: 8px 0 0 0;
    font-weight: 500;
    color: #b7ffd8;
    letter-spacing: 0.5px;
    transition: color 0.2s;
    gap: 8px;
}

input[type="text"],
input[type="number"],
select {
    background: #232526;
    border: 1.5px solid #a8ff78;
    border-radius: 7px;
    color: #e0e0e0;
    padding: 7px 12px;
    margin-bottom: 6px;
    font-size: 1em;
    transition: border 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px #0002;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border: 2px solid #39ff14;
    outline: none;
    box-shadow: 0 2px 12px #39ff1433;
}

button {
    background: linear-gradient(90deg, #a8ff78 0%, #78ffd6 100%);
    color: #232526;
    border: none;
    border-radius: 7px;
    padding: 9px 22px;
    font-size: 1.1em;
    font-weight: bold;
    margin: 18px 0 10px 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(56, 255, 100, 0.10);
    transition: background 0.2s, color 0.2s, transform 0.1s, box-shadow 0.2s;
    letter-spacing: 1px;
    animation: fadeInUp 1.3s;
    align-self: center;
}

button:hover {
    background: linear-gradient(90deg, #39ff14 0%, #a8ff78 100%);
    color: #232526;
    transform: scale(1.04);
    box-shadow: 0 4px 24px #39ff1466;
}

span[id^="resultado"] {
    display: inline-block;
    margin-left: 12px;
    font-size: 1.1em;
    color: #39ff14;
    font-weight: bold;
    text-shadow: 0 1px 8px #232526;
    transition: color 0.2s, text-shadow 0.2s;
    animation: fadeIn 1.5s;
}

label>span {
    color: #78ffd6;
    font-weight: 400;
    margin-left: 6px;
}

small {
    color: #b7ffd8;
    font-size: 0.95em;
    margin-left: 8px;
    opacity: 0.8;
}

::-webkit-scrollbar {
    width: 10px;
    background: #232526;
}

::-webkit-scrollbar-thumb {
    background: #39ff14;
    border-radius: 8px;
}

.form-controls label {
    font-size: 1.3em;
    font-weight: bold;
    color: #a8ff78;
    margin-bottom: 12px;
    margin-right: 16px;
    display: block;
    text-align: left;
}

.form-controls input[list] {
    font-size: 1.15em;
    padding: 10px 14px;
    border-radius: 7px;
    border: 2px solid #a8ff78;
    margin-top: 6px;
    margin-bottom: 10px;
    width: 220px;
    box-sizing: border-box;
    background: #232526;
    color: #e0e0e0;
}

@media (max-width: 700px) {
    .form-controls label {
        font-size: 1.1em;
    }

    .form-controls input[list] {
        font-size: 1em;
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .figura-row {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    form,
    .figura-section {
        padding: 14px 8px 10px 8px;
        max-width: 98vw;
    }

    h1 {
        font-size: 1.5em;
    }

    .figura-row>div {
        width: 100%;
        min-width: 0;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}