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

body {
    font-family: 'Noto Sans', sans-serif;
    background: #fafafa;
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: #455a64;
    color: white;
    padding: 30px;
    text-align: center;
}

.equation-display {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.equals {
    margin: 0 20px;
    color: #e74c3c;
}

#result {
    color: #27ae60;
}

.input-area {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    min-height: 60px;
}

#user-input {
    font-size: 1.5rem;
    font-weight: bold;
}

.game-area {
    height: 500px;
    position: relative;
    background: linear-gradient(135deg, #b3c6f2 0%, #d1c4e9 100%);
    overflow: hidden;
}

.calc-button {
    position: absolute;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.calc-button.number {
    background: #81c784;
    color: white;
}

.calc-button.operator {
    background: #ffb74d;
    color: white;
}

.calc-button.collected {
    opacity: 0.3;
    transform: scale(0.8);
    pointer-events: none;
}

.ui {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f5f5;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#clear-btn {
    background: #b0bec5;
    color: white;
}

#clear-btn:hover {
    background: #90a4ae;
}

#next-btn {
    background: #a5d6a7;
    color: white;
}

#next-btn:hover:not(:disabled) {
    background: #81c784;
}

#next-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.score {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

#success-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#success-message:not(.hidden) {
    opacity: 1;
}

#success-message.hidden {
    opacity: 0;
    pointer-events: none;
}

.message-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.4s ease;
}

#success-message:not(.hidden) .message-content {
    transform: scale(1) translateY(0);
}

.message-content h2 {
    color: #27ae60;
    font-size: 2rem;
    margin-bottom: 10px;
}

.message-content p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.calc-button:active {
    animation: bounce 0.3s ease;
}