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

.construccion {
    background-color: #9b5951;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 6px;
    width: 100%;
    margin: 0;
}

.construccion svg {
    margin-right: 10px;
}

.construccion p {
    font-weight: 500;
    color: white;
    font-size: 1.2rem;
}


body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f0f8ff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.logo-container {
    flex: 0 0 100px;
}

.logo {
    max-width: 100%;
    height: auto;
}

header h1 {
    flex: 1;
    text-align: center;
    color: #034f84;
    font-size: 1.8rem;
}

.author-info {
    flex: 0 0 250px;
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.simulator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
}

.venturi-visualization {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    min-height: 400px;
}

#venturi-diagram {
    width: 100%;
    height: 380px;
    position: relative;
}

#cavitation-warning {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 0, 0, 0.2);
    color: red;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid red;
    animation: blink 1s infinite;
}

.hidden {
    display: none !important;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.controls-container {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.parameters {
    margin-bottom: 1.5rem;
}

.parameters h2 {
    color: #034f84;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.parameter-group {
    margin-bottom: 1rem;
}

.parameter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.slider-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.slider-container input[type="range"] {
    flex: 1;
}

.slider-container input[type="number"] {
    width: 80px;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.slider-container select {
    flex: 1;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
}

.slider-container span {
    min-width: 80px;
    text-align: right;
    font-weight: bold;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

button {
    background-color: #1e90ff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0078d7;
}

#toggle-errors.active {
    background-color: #ff6347;
}

#admin-mode.active {
    background-color: #32cd32;
}

.results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.data-table, #errors-table {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-table h2, #errors-table h2 {
    color: #034f84;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    font-weight: bold;
    background-color: #f8f8f8;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        margin-bottom: 0.5rem;
    }
    
    .author-info {
        text-align: center;
        margin-top: 0.5rem;
    }
    
    .simulator-container, .results-container {
        flex-direction: column;
    }
}

/* Estilos específicos para los manómetros y elementos SVG */
.manometer text {
    fill: #333;
    font-size: 12px;
}

.manometer .dial {
    fill: none;
    stroke: #666;
    stroke-width: 2;
}

.manometer .needle {
    fill: none;
    stroke: red;
    stroke-width: 3;
}

.manometer .value-text {
    font-weight: bold;
    font-size: 14px;
}

.pipe {
    fill: #92d9f7;
    stroke: #333;
    stroke-width: 2;
}

.water {
    fill: #51a3d3;
}

.water.cavitation {
    fill: url(#cavitationGradient);
}