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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #228B22, #1E3A8A);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    overflow: hidden;
}

canvas {
    border: 3px solid #32CD32;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 90vw;
    max-height: 70vh;
}

.ui {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

h1 {
    font-size: 2rem;
    color: #32CD32;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #60A5FA;
}

.controls {
    font-size: 0.9rem;
    opacity: 0.8;
}

.restart-btn {
    background: #32CD32;
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.restart-btn:hover,
.restart-btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.9);
    padding: 2rem;
    border-radius: 20px;
    display: none;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(50, 205, 50, 0.3);
}

.game-over h2 {
    color: #32CD32;
    font-size: 1.8rem;
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    .score { font-size: 1.2rem; }
    canvas { max-height: 60vh; }
    .ui { gap: 0.8rem; }
    .restart-btn { padding: 0.7rem 1.5rem; font-size: 1rem; }
}

.home-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    background: rgba(50, 205, 50, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s;
    z-index: 10;
}

.home-link:hover {
    background: rgba(50, 205, 50, 0.4);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .home-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}
