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

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #ffd700, #ff69b4);
    min-height: 100vh;
    height: 100vh;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.game-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 20px;
    width: 100%;
    height: 100%;
    max-height: 100%;
}

.controls {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 300px;
    min-width: 300px;
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ffd700 #fff;
}

.controls::-webkit-scrollbar {
    width: 8px;
}

.controls::-webkit-scrollbar-track {
    background: #fff;
    border-radius: 4px;
}

.controls::-webkit-scrollbar-thumb {
    background-color: #ffd700;
    border-radius: 4px;
}

.control-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #ffd700;
}

.control-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.control-group h3 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 1.2em;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #4a4a4a;
}

input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

select {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: 2px solid #ffd700;
    margin-top: 5px;
}

.color-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.color-btn {
    width: 35px;
    height: 35px;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-btn:hover {
    transform: scale(1.1);
    border-color: #ffd700;
}

.color-btn.active {
    border-color: #ffd700;
    transform: scale(1.1);
}

.color-btn.rainbow-btn {
    background-size: 200% 100%;
    animation: rainbow-shift 3s linear infinite;
}

@keyframes rainbow-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.reset-btn {
    width: 100%;
    padding: 12px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.reset-btn:hover {
    background: #ff5252;
}

#gameCanvas {
    flex: 1;
    min-width: 0;
    height: 100%;
    background: #000;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas canvas {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    aspect-ratio: 1;
}

.rotation-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.rotation-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.arrow-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.arrow-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #ffd700;
    color: #4a4a4a;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-btn:hover {
    background: #ffed4a;
    transform: scale(1.1);
}

.arrow-btn:active {
    background: #f4c400;
    transform: scale(0.95);
}

input[type="number"] {
    width: 70px;
    padding: 8px;
    border: 2px solid #ffd700;
    border-radius: 8px;
    text-align: center;
    font-family: inherit;
    font-size: 14px;
}

input[type="number"]:focus {
    outline: none;
    border-color: #ffed4a;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.copyright {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px dashed #ffd700;
    text-align: center;
    color: #4a4a4a;
    font-size: 0.9em;
    font-style: italic;
}

.object-select {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: 2px solid #ffd700;
    background-color: white;
    font-family: inherit;
    font-size: 1em;
    color: #4a4a4a;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.1s;
}

.object-select:hover {
    border-color: #ffed4a;
    transform: scale(1.02);
}

.object-select:focus {
    outline: none;
    border-color: #ffed4a;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
} 