* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

.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 {
    background-color: #f5f5f5;
    color: #333;
}

#container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #3f51b5;
}

.logo-container {
    width: 60px;
    height: 60px;
    margin-right: 15px;
}

#giedi-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
}

header h1 {
    color: #3f51b5;
    font-size: 24px;
    flex-grow: 1;
}

#langToggle {
    background-color: #3f51b5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#langToggle:hover {
    background-color: #303f9f;
}

#main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#simulation-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#animation-area {
    flex: 1;
    min-width: 300px;
    background-color: #f9f9f9;
    background-image: linear-gradient(#f0f0f0 1px, transparent 1px),
                      linear-gradient(90deg, #f0f0f0 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    padding: 10px;
    transition: all 0.3s ease;
}

#atwood-svg {
    width: 100%;
    height: 500px;
    transition: all 0.5s ease;
}

.pulley-rim {
    fill: #666;
    stroke: #444;
    stroke-width: 1.5;
    filter: drop-shadow(0px 3px 3px rgba(0,0,0,0.2));
}

.pulley-center {
    fill: #aaa;
    stroke: #888;
    stroke-width: 1;
}

.pulley-groove {
    fill: #888;
    stroke: #666;
    stroke-width: 0.5;
}

.mass-label {
    font-size: 14px;
    text-anchor: middle;
    fill: white;
    font-weight: bold;
}

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

.control-group {
    margin-bottom: 20px;
}

.control-group h3 {
    margin-bottom: 10px;
    color: #3f51b5;
    font-size: 18px;
}

.radio-group, .select-group, .checkbox-group {
    margin-bottom: 10px;
}

.select-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

select, input[type="number"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 100px;
}

.range-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

input[type="range"] {
    width: 100%;
    max-width: 200px;
}

#distance-value-display {
    min-width: 60px;
    font-weight: bold;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.toggle-btn {
    background-color: #9e9e9e;
    color: white;
}

.toggle-btn.active {
    background-color: #4CAF50;
}

#pause-btn:disabled {
    background-color: #9e9e9e;
    cursor: not-allowed;
}

button {
    background-color: #3f51b5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 16px;
}

button:hover {
    background-color: #303f9f;
}

#admin-btn {
    background-color: #f44336;
}

#admin-btn:hover {
    background-color: #d32f2f;
}

#data-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#results-table-container {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px;
    overflow-x: auto;
}

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

#results-table th, #results-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

#results-table th {
    background-color: #3f51b5;
    color: white;
}

#data-analysis {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px;
}

.analysis-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.chart-type-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

#chart-type {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#export-chart-btn {
    padding: 8px 12px;
    font-size: 14px;
}

#chart-container {
    height: 300px;
    position: relative;
}

#stats-table {
    margin-bottom: 20px;
    width: 100%;
}

#stats-table td {
    padding: 5px;
}

footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #ddd;
    color: #666;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#password-section {
    margin: 20px 0;
}

#admin-password {
    padding: 8px;
    margin: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.error {
    color: #f44336;
    margin-top: 10px;
}

#true-values-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#true-values-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.trajectory-line {
    opacity: 0.7;
    pointer-events: none;
}

#pulley {
    transition: transform 0.05s linear;
}

#realtime-data {
    font-family: monospace;
}

#simulation-progress {
    transition: width 0.3s linear;
}

/* Responsive styles */
@media (max-width: 768px) {
    #main-content, #simulation-container, #data-container {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    #animation-area, #controls, #results-table-container, #data-analysis {
        width: 100%;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    #realtime-data text {
        font-size: 10px;
    }
    
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}