:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --background-color: #0a0a1a;
    --text-color: #f5f7fa;
    --border-color: #444;
    --panel-bg: #1a1a2a;
    --elevator-color: #95a5a6;
    --scale-color: #7f8c8d;
    --shaft-color: rgba(0, 0, 0, 0.5);
    --elevator-border: #d3d3d3;
    --elevator-reflection: rgba(255, 255, 255, 0.1);
    --star-color: rgba(255, 255, 255, 0.8);
}

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

.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: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.logo-container {
    flex: 0 0 150px;
    margin-right: 20px;
}

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

.title-container {
    flex: 1;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.author-info {
    font-size: 0.8rem;
    opacity: 0.9;
}

.author-info p {
    margin: 0;
    line-height: 1.3;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.simulator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 2rem;
}

.visualization {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.space-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px;
    background-color: #050510;
    overflow: hidden;
    border-radius: 8px;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: var(--star-color);
    border-radius: 50%;
    z-index: 1;
}

.elevator-shaft {
    height: 400px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
    z-index: 2;
    border: 2px solid var(--elevator-border);
    background-color: transparent;
}

.elevator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 150px;
    background: linear-gradient(135deg, var(--elevator-color) 0%, #7a8c8d 70%, var(--elevator-reflection) 100%);
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 10px;
    border: 2px solid var(--elevator-border);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1), 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 3;
}

.elevator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 50%);
    border-radius: 8px 8px 0 0;
    pointer-events: none;
}

.person {
    width: 40px;
    height: 80px;
    position: relative;
    margin-bottom: 10px;
    transition: transform 0.3s ease-out;
    z-index: 4;
}

.head {
    width: 20px;
    height: 20px;
    background-color: #f39c12;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.body {
    width: 20px;
    height: 30px;
    background-color: #3498db;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.arms {
    width: 40px;
    height: 5px;
    background-color: #f39c12;
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.legs {
    width: 30px;
    height: 30px;
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
}

.legs:before, .legs:after {
    content: '';
    position: absolute;
    width: 5px;
    height: 30px;
    background-color: #34495e;
    border-radius: 3px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

.legs:before {
    left: 5px;
}

.legs:after {
    right: 5px;
}

.scale {
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, #95a5a6, #7f8c8d);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2), 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-out;
    z-index: 3;
}

.scale-display {
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.scale.highlight {
    box-shadow: 0 0 10px #e74c3c, 0 0 20px rgba(231, 76, 60, 0.5);
}

.physics-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    z-index: 5;
    position: relative;
}

.info-box {
    flex: 1;
    min-width: 120px;
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.info-box h3 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.value-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.large-value {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.controls-container {
    flex: 1;
    min-width: 300px;
    z-index: 5;
    position: relative;
}

.control-panel {
    background-color: var(--panel-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.panel-section {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.panel-section:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.panel-section h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

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

.input-group label {
    flex: 0 0 140px;
    margin-right: 10px;
}

.input-group input,
.input-group select {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 8px 15px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
}

.tab-btn.active {
    opacity: 1;
    font-weight: bold;
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    margin-top: 15px;
}

.slider-container {
    margin-top: 20px;
}

input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.slider-value {
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
}

.action-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    margin-top: 10px;
}

.action-btn:hover {
    background-color: #2980b9;
}

.action-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.controls-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.charts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 2rem;
    position: relative;
    z-index: 5;
}

.chart-wrapper {
    flex: 1;
    min-width: 300px;
    background-color: var(--panel-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.chart-wrapper h3 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

canvas {
    width: 100% !important;
    height: 250px !important;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--secondary-color);
    color: white;
    font-size: 0.8rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .logo-container {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .simulator-container,
    .charts-container {
        flex-direction: column;
    }
    
    .elevator-shaft {
        height: 300px;
    }
    
    .controls-footer {
        justify-content: center;
    }
    
    .action-btn {
        flex: 1 1 calc(50% - 10px);
        margin: 5px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .input-group label {
        margin-bottom: 5px;
    }
    
    .input-group input,
    .input-group select {
        width: 100%;
    }
}