body {
    margin: 0;
    overflow: hidden;
    background-color: #0c081f;
    background-image: radial-gradient(circle at center, #1e0940 0%, #0c081f 100%);
    color: #fff;
    font-family: 'Orbitron', 'Segoe UI', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.home-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    opacity: 0.8;
    z-index: 1000;
    transition: opacity 0.3s, transform 0.2s;
}

.home-link:hover {
    opacity: 1;
    transform: scale(1.1);
}

.game-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.glass-effect {
    background: rgba(20, 10, 50, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

.ui-panel {
    width: 200px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #bfa1ff;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(191, 161, 255, 0.5);
}

.next-piece-container {
    height: 120px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid #00f260;
}

.stat-box:nth-child(2) {
    border-color: #0575e6;
}

.stat-box:nth-child(3) {
    border-color: #ff416c;
}

.stat-label {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.controls-hint {
    margin-top: auto;
    font-size: 0.85rem;
    color: #888;
    text-align: left;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
}

.controls-hint p {
    margin: 5px 0;
}

.board-wrapper {
    position: relative;
    padding: 15px;
}

canvas#game-canvas {
    background: #000;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8) inset;
    border-radius: 4px;
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 5, 25, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    flex-direction: column;
    z-index: 10;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    background: linear-gradient(to right, #bf00ff, #00f260);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(191, 0, 255, 0.5));
}

button {
    background: linear-gradient(135deg, #bf00ff 0%, #0575e6 100%);
    border: none;
    padding: 12px 30px;
    color: white;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(191, 0, 255, 0.6);
}

.final-score {
    font-size: 1.5rem;
    margin-bottom: 20px;
}