/* Fondo y tipografía */
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;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Título principal */
h1 {
    color: #a8ff78;
    text-shadow: 1px 1px 8px #222;
    margin-top: 30px;
    margin-bottom: 40px;
    font-size: 2.5em;
    letter-spacing: 2px;
    text-align: center;
    font-weight: bold;
    animation: fadeInDown 1s;
}

/* Imagen de Pitágoras */
.img-pitagoras {
    display: block;
    margin: 0 auto 18px auto;
    border-radius: 50%;
    box-shadow: 0 2px 12px #0006;
    width: 90px;
    height: 90px;
    object-fit: cover;
}

/* Controles principales */
.form-controls {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.form-controls label {
    font-size: 1.3em;
    font-weight: bold;
    color: #a8ff78;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.form-controls select {
    font-size: 1.15em;
    padding: 10px 14px;
    border-radius: 7px;
    border: 2px solid #a8ff78;
    margin-top: 2px;
    margin-bottom: 2px;
    width: 240px;
    box-sizing: border-box;
    background: #232526;
    color: #e0e0e0;
}

.form-controls button {
    background: linear-gradient(90deg, #a8ff78 0%, #78ffd6 100%);
    color: #232526;
    border: none;
    border-radius: 7px;
    padding: 10px 30px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 10px;
    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;
}

.form-controls button:hover {
    background: linear-gradient(90deg, #39ff14 0%, #a8ff78 100%);
    color: #232526;
    transform: scale(1.04);
    box-shadow: 0 4px 24px #39ff1466;
}

/* Fórmulas */
.formula-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 18px;
    margin-top: 10px;
}
.formula-area span {
    background: #232526;
    color: #a8ff78;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 1.1em;
    font-family: 'Segoe UI', Arial, sans-serif;
    box-shadow: 0 2px 8px #0002;
}

/* Figuras y campos */
.figura-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
    margin-bottom: 10px;
    width: 100%;
}

.figura-row > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    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;
    gap: 8px;
}

input[type="number"] {
    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: 100px;
    box-sizing: border-box;
}

input[type="number"]:focus {
    border: 2px solid #39ff14;
    outline: none;
    box-shadow: 0 2px 12px #39ff1433;
}

button:not(.form-controls button) {
    background: linear-gradient(90deg, #a8ff78 0%, #78ffd6 100%);
    color: #232526;
    border: none;
    border-radius: 7px;
    padding: 10px 30px;
    font-size: 1.2em;
    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;
}

button:not(.form-controls 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;
}

.autor {
    margin-top: 40px;
    color: #b7ffd8;
    font-size: 1em;
    text-align: center;
    opacity: 0.7;
}

@media (max-width: 700px) {
    .form-controls select {
        width: 100%;
        min-width: 0;
    }
    .formula-area {
        flex-direction: column;
        gap: 10px;
    }
    .figura-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        width: 100%;
    }
    .figura-row > div {
        width: 100%;
        min-width: 0;
        align-items: stretch;
    }
    .figura-canvas {
        margin: 0 auto 12px auto;
        display: block;
    }
    h1 {
        font-size: 1.5em;
    }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}



@media (max-width: 700px) {
    .figura-row > div label {
        padding-left: 28px !important;
        width: 100%;
        box-sizing: border-box;
    }
}