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

body {
    background: #0d1117;
    color: #3fb950;
    font-family: 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    perspective: 1000px;
    overflow-x: hidden;
    overflow-y: auto;
}

.controls {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.controls button {
    background: transparent;
    color: #3fb950;
    border: 1px solid #3fb950;
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s;
}

.controls button:hover {
    background: #3fb950;
    color: #0d1117;
}

.controls button:active {
    transform: scale(0.95);
}

.container {
    perspective: 1000px;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.container:active {
    cursor: grabbing;
}

.cube {
    width: 200px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid #3fb950;
    background: rgba(63, 185, 80, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    user-select: none;
}

.front  { transform: rotateY(0deg) translateZ(100px); }
.back   { transform: rotateY(180deg) translateZ(100px); }
.right  { transform: rotateY(90deg) translateZ(100px); }
.left   { transform: rotateY(-90deg) translateZ(100px); }
.top    { transform: rotateX(90deg) translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }

.instructions {
    position: fixed;
    bottom: 80px;
    text-align: center;
    color: #3fb950;
    opacity: 0.7;
    font-size: 14px;
}

footer {
    position: fixed;
    bottom: 20px;
    text-align: center;
}

footer a {
    color: #3fb950;
    text-decoration: none;
    border: 1px solid #3fb950;
    padding: 10px 20px;
    transition: all 0.3s;
}

footer a:hover {
    background: #3fb950;
    color: #0d1117;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        justify-content: flex-start;
        padding-top: 100px;
        padding-bottom: 100px;
    }
    
    .container {
        padding: 50px;
        margin: 20px 0;
    }
    
    .cube,
    .face {
        width: 150px;
        height: 150px;
    }
    
    .front  { transform: rotateY(0deg) translateZ(75px); }
    .back   { transform: rotateY(180deg) translateZ(75px); }
    .right  { transform: rotateY(90deg) translateZ(75px); }
    .left   { transform: rotateY(-90deg) translateZ(75px); }
    .top    { transform: rotateX(90deg) translateZ(75px); }
    .bottom { transform: rotateX(-90deg) translateZ(75px); }
    
    .controls {
        flex-direction: column;
        gap: 5px;
        top: 10px;
    }
    
    .controls button {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .instructions {
        bottom: 60px;
        font-size: 12px;
    }
    
    footer {
        bottom: 10px;
    }
}