body {
    margin: 0;
    background: linear-gradient(to bottom right, #667eea, #764ba2);
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    height: 100vh;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 300px;
}

.info {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 100;
    transition: all 0.3s ease;
}

.error {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 100;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 100;
}

.side-panel {
    width: 350px;
    min-width: 350px;
    max-width: 350px;
    flex-shrink: 0;
    background: linear-gradient(145deg, #2a2d3a, #212529);
    padding: 24px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    max-height: 100vh;
    word-break: normal;
    overflow-wrap: normal;
    white-space: nowrap;
}

.side-panel h3,
.side-panel label,
.side-panel .value {
    white-space: normal;
    word-wrap: break-word;
}

.side-panel::-webkit-scrollbar {
    width: 6px;
}

.side-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.side-panel::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.side-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.side-panel h3 {
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #667eea;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.parameters {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.parameter-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.parameter-group:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.parameter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 6px;
    min-height: 32px;
}

.parameter-row:last-child {
    margin-bottom: 0;
}

.parameter-row label {
    flex: 1;
    font-size: 13px;
    margin-right: 10px;
    color: #e0e0e0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.parameter-row input[type="number"] {
    width: 80px;
    min-width: 80px;
    padding: 10px 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.parameter-row input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.parameter-row input[type="range"] {
    flex: 2;
    margin: 0 10px;
    min-width: 100px;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #667eea 0%, rgba(255, 255, 255, 0.2) 0%);
    outline: none;
    transition: all 0.3s ease;
}

.parameter-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.parameter-row input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.6);
}

.parameter-row input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.parameter-row .value {
    width: 45px;
    min-width: 45px;
    text-align: center;
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.15);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.section-title {
    font-size: 16px;
    margin: 10px 0 5px;
    color: #bbbbbb;
}

button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    margin-top: 15px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

button:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

button.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.figure-select {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.figure-select label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: #e0e0e0;
    font-size: 14px;
}

.figure-select select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.figure-select select:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.figure-select select option {
    background-color: #2a2d3a;
    color: white;
    padding: 8px;
}

.view-buttons {
    margin-top: 5px;
}

.view-buttons label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button-row {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.view-button {
    flex: 1;
    margin-top: 0;
    padding: 8px 12px;
    font-size: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.view-button:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.view-button.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 120px;
}

.parameter-row input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}

.parameter-row label[for^="show-"],
.parameter-row label[for$="cross-section"] {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    min-width: auto;
    margin: 0;
    white-space: nowrap;
}

.no-uppercase {
    text-transform: none !important;
}

@media (max-width: 700px) {
    
    body {
        flex-direction: column;
    }
    
    #container {
        flex: 1;
        height: auto;
        min-height: 40vh;
    }
    
    .side-panel {
        position: static;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        max-height: none;
        height: auto;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
        box-sizing: border-box;
        
    }
    
    .parameter-group {
        padding: 16px;
    }
    
    .parameter-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .parameter-row label {
        min-width: 100px;
        font-size: 12px;
    }
    
    .parameter-row input[type="number"] {
        width: 70px;
        min-width: 70px;
    }
    
    .parameter-row .value {
        width: 40px;
        min-width: 40px;
        font-size: 12px;
    }
    
    .checkbox-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .checkbox-item {
        min-width: 100%;
    }
    
    .info {
        font-size: 12px;
        padding: 8px;
        bottom: calc(60vh + 10px);
    }
    
    .side-panel h3 {
        font-size: 18px;
        margin-bottom: 16px;
    }
}
