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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.game-ui {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.game-ui div {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.score span, .moves span, .timer span {
    color: #007aff; /* Apple blue */
    font-weight: 600;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-gap: 4px;
    background-color: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.star {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.star::before {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: white;
}

.star:hover {
    transform: scale(1.05);
}

.star.selected {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.5);
}

.star.blue {
    background-color: #007aff; /* Apple blue */
}

.star.red {
    background-color: #ff3b30; /* Apple red */
}

.star.green {
    background-color: #34c759; /* Apple green */
}

.star.yellow {
    background-color: #ffcc00; /* Apple yellow */
}

.star.purple {
    background-color: #5856d6; /* Apple purple */
}

.star.removing {
    animation: remove 0.5s forwards;
}

@keyframes remove {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.star.falling {
    animation: fall 0.5s forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0);
    }
}

.game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 10;
    width: 80%;
    max-width: 400px;
}

.game-message h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.game-message p {
    color: #666;
    margin-bottom: 20px;
}

#startBtn {
    background-color: #007aff; /* Apple blue */
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#startBtn:hover {
    background-color: #0062cc; /* Darker Apple blue */
}

/* Responsive design */
@media (max-width: 600px) {
    .game-board {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 400px) {
    .game-ui {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .game-board {
        grid-template-columns: repeat(5, 1fr);
    }
} 