#viewer-container {
    position: relative;
    width: 100%;
    height: 640px;
    margin: 30px 0;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

#info {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(45, 45, 45, 0.95);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
    max-width: 300px;
}

#info h3 {
    margin-top: 0;
    color: #e0e0e0;
}

#volume-display,
#weight-display {
    margin-top: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #e0e0e0;
    line-height: 1.5;
    white-space: pre-wrap;
    text-align: left;
}

#material-details {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 0.85em;
    color: #b0b0b0;
    line-height: 1.4;
}

#price-display {
    margin-top: 10px;
    font-weight: bold;
    color: #4a9eff;
    font-size: 1.1em;
}

#min-price-message {
    font-size: 0.85em;
    color: #888;
    margin-top: 5px;
}

#infill-display {
    font-size: 0.85em;
    color: #b0b0b0;
    margin-bottom: 10px;
    text-align: center;
}

#info label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
    color: #e0e0e0;
}

#file-input {
    margin-bottom: 10px;
}

input[type="file"]::file-selector-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4a9eff 0%, #3d7fd8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}

input[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, #5aa8ff 0%, #4a8de8 100%);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.5);
    transform: translateY(-2px);
}

input[type="file"]::file-selector-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(74, 158, 255, 0.3);
}

#material-select {
    width: 100%;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #2d2d2d;
    color: #e0e0e0;
}

#wall-thickness {
    width: 100%;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #2d2d2d;
    color: #e0e0e0;
    margin-bottom: 10px;
}

#infill-percentage {
    width: 100%;
    margin-bottom: 5px;
}

.viewer-controls {
    font-size: 0.8em;
    color: #b0b0b0;
    margin-top: 5px;
}

.calculator-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Hide controls until file is loaded */
#info .hidden-until-load {
    display: none;
}

#info.file-loaded .hidden-until-load {
    display: block;
}

/* Mobile responsive layout */
@media (max-width: 768px) {
    #viewer-container {
        height: auto;
        min-height: 400px;
        display: flex;
        flex-direction: column;
    }

    #info {
        position: relative;
        top: 0;
        left: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        order: 1;
    }

    #viewer-container canvas {
        order: 2;
        min-height: 400px;
        width: 100% !important;
        height: 400px !important;
    }

    #calculator {
        display: none;
    }
}
