* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: #0b0f1a;
    color: #e2e8f0;
    line-height: 1.5;
}

header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid #2d3a5e;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, #fbbf24, #eab308);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

h2 {
    font-weight: 400;
    color: #94a3b8;
    font-size: 1.2rem;
}

.miembros {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #cbd5e1;
    background: #0f172a80;
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    backdrop-filter: blur(4px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.card {
    background: #111827cc;
    backdrop-filter: blur(2px);
    background: #111827;
    border-radius: 28px;
    padding: 1.8rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
    border: 1px solid #1f2a3e;
    transition: transform 0.1s ease;
}

.card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #facc15;
    border-left: 5px solid #facc15;
    padding-left: 1rem;
}

.card p, .card li {
    margin-bottom: 0.8rem;
    color: #cbd5e6;
}

.analogia, .tip {
    background: #1e293b;
    padding: 1rem;
    border-radius: 20px;
    margin: 1rem 0;
    border-left: 6px solid #facc15;
    font-style: normal;
}

.ecuacion {
    background: #0f172a;
    padding: 1rem;
    border-radius: 16px;
    text-align: center;
    margin: 1.2rem 0;
    overflow-x: auto;
    font-size: 1rem;
}

.sim1d-container, .nodal2d-panel {
    background: #0a0f1e;
    border-radius: 24px;
    padding: 1rem;
    margin: 1rem 0;
}

.controls-1d, .controls-2d {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.ctrl-group {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    background: #1e293b;
    padding: 0.5rem 1rem;
    border-radius: 40px;
}

.ctrl-group label {
    font-weight: 500;
}

/* Estilos para la sección de curvas nodales */
.curved-nodal-container {
    background: #0a0f1e;
    border-radius: 24px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: flex-start;
}

.controls-curved {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.controls-curved .ctrl-group {
    background: #1e293b;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.controls-curved .ctrl-group label {
    font-weight: 500;
    font-size: 0.9rem;
}

.controls-curved input[type="range"] {
    width: 120px;
}

@media (max-width: 700px) {
    .curved-nodal-container {
        flex-direction: column;
        align-items: center;
    }
    .controls-curved {
        width: 100%;
    }
}

input[type="range"] {
    width: 200px;
    cursor: pointer;
    background: #334155;
    height: 4px;
    border-radius: 10px;
}

.badge {
    background: #facc15;
    color: #0f172a;
    padding: 0.1rem 0.6rem;
    border-radius: 30px;
    font-weight: bold;
}

button {
    background: #3b4b6e;
    border: none;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

button:hover {
    background: #facc15;
    color: #0f172a;
    transform: scale(1.02);
}

.hint, .small {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.fullwidth-sim .iframe-wrapper {
    margin-top: 1rem;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #2d3a5e;
    background: #000;
}

iframe {
    display: block;
    width: 100%;
    min-height: 700px;
}

footer {
    text-align: center;
    padding: 2rem;
    background: #030712;
    font-size: 0.85rem;
    color: #5b6e8c;
    border-top: 1px solid #1e293b;
}

.referencias ul {
    list-style: none;
    padding-left: 0;
}

.referencias li {
    margin-bottom: 0.5rem;
}

.referencias a {
    color: #facc15;
    text-decoration: none;
    border-bottom: 1px dotted #facc15;
}

.referencias a:hover {
    color: #ffb347;
    border-bottom: 1px solid;
}



.figure-group {
    margin: 2rem auto;
    max-width: 900px;
    text-align: center;
}

.figure-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.figure-grid img {
    width: 100%;
    max-width: 300px;
    height: auto;
    justify-self: center;
    border: 1px solid #ccc;
}

.figure-group figcaption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #555;
}


@media (max-width: 700px) {
    .container {
        padding: 1rem;
    }
    .ctrl-group {
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-between;
    }
    input[type="range"] {
        width: 150px;
    }
    .figure-grid {
        grid-template-columns: 1fr;
    }
}
