/* Base Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Verdana', sans-serif;
    background-color: #ffffff;
    color: #333333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eeeeee;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 0.2rem;
    font-weight: normal;
    text-transform: uppercase;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background-color: #fcfcfc;
}

#canvas-container {
    position: relative;
    max-width: 100%;
    max-height: 70vh;
    box-shadow: none;
    border: 1px solid #dddddd;
    background-color: #ffffff;
    margin-bottom: 40px;
}

#about {
    max-width: 800px;
    text-align: left;
    color: #666666;
    line-height: 1.8;
}

#about h2 {
    font-size: 1.2rem;
    color: #333333;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    border-left: 3px solid #333333;
    padding-left: 15px;
    margin-bottom: 20px;
}

#about p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.instructions {
    background-color: #ffffff;
    padding: 20px;
    border: 1px solid #eeeeee;
}

.instructions h3 {
    font-size: 1rem;
    color: #333333;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: normal;
}

.instructions ol {
    margin: 0;
    padding-left: 20px;
    font-size: 0.85rem;
}

.instructions li {
    margin-bottom: 10px;
}

.instructions li strong {
    color: #333333;
}

#main-canvas {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    height: auto;
}

#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    color: #999999;
}

#controls {
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid #eeeeee;
}

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

/* Button Styles */
.button {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #333333;
    background-color: #ffffff;
    color: #333333;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 100px;
}

.button:hover {
    background-color: #333333;
    color: #ffffff;
}

.button:active {
    transform: translateY(1px);
}

.button:disabled {
    border-color: #cccccc;
    color: #cccccc;
    cursor: not-allowed;
    background-color: #ffffff;
}

.button.active {
    background-color: #333333;
    color: #ffffff;
}

footer {
    padding: 20px;
    text-align: center;
    font-size: 0.7rem;
    color: #999999;
}

/* Material Selection */
#material-selector .button {
    text-transform: none;
}

@media (max-width: 600px) {
    #controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: center;
    }
}
