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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    display: flex;
    flex-direction: row;
    height: 100vh;
    width: 100vw;
}

#cube-container {
    flex: 1;
    position: relative;
}

#controls {
    width: 300px;
    background-color: #f0f0f0;
    border-left: 1px solid #ddd;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

h3 {
    margin-bottom: 15px;
    color: #444;
}

.control-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

button {
    padding: 8px 12px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #3a80d2;
}

#instructions p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.game-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.action-row {
    display: flex;
    gap: 10px;
}

.action-row button {
    flex: 1;
    padding: 10px;
    font-weight: bold;
}

#shuffle {
    background-color: #f5a623;
}

#shuffle:hover {
    background-color: #e59613;
}

#reset {
    background-color: #d0021b;
}

#reset:hover {
    background-color: #c0011b;
}

/* Victory notification */
#victory-notification {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

#victory-notification.hidden {
    opacity: 0;
    pointer-events: none;
}

.victory-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
}

.victory-content h2 {
    color: #4a90e2;
    margin-bottom: 15px;
    font-size: 28px;
}

.victory-content p {
    margin-bottom: 20px;
    font-size: 18px;
}

#continue-button {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

#continue-button:hover {
    background-color: #3a80d2;
}

/* Responsive design */
@media (max-width: 768px) {
    #game-container {
        flex-direction: column;
    }
    
    #cube-container {
        height: 60vh;
    }
    
    #controls {
        width: 100%;
        height: 40vh;
        border-left: none;
        border-top: 1px solid #ddd;
    }
}
