body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    background: rgba(0,0,0,0.3);
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.back-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: white;
}

.status {
    font-size: 24px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 25px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.status.active {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.status.solved {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.cube-container {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#cubeCanvas {
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    cursor: grab;
}

#cubeCanvas:active {
    cursor: grabbing;
}

.controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(6, 60px);
    gap: 10px;
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.move-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.move-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: linear-gradient(145deg, #764ba2 0%, #667eea 100%);
}

.move-btn:active {
    transform: translateY(-1px);
}

.info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.info-item {
    margin: 10px 0;
    font-size: 16px;
}

.connection-status {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.connected {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.disconnected {
    background: linear-gradient(45deg, #f44336, #d32f2f);
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    text-align: center;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
