:root {
    --primary-color: #FFD700;
    --secondary-color: #FF6B6B;
    --background-color: #F8F9FA;
    --hole-color: #4A4A4A;
}

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

body {
    font-family: 'Arial Rounded MT Bold', 'Arial', sans-serif;
    background-color: var(--background-color);
    min-height: 100vh;
    /* display: flex; */
    justify-content: center;
    align-items: center;
}
header>h1{

    text-align: center;

}
.game-container {
    display: flex;
    gap: 20px;
    max-width: 1000px;
    width: 95%;
    margin: 20px auto;
    align-items: flex-start;
}

.inventory-panel {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 240px;
    max-width: 300px;
    flex-shrink: 0;
}

.inventory-panel h2 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.3em;
    text-align: center;
}

.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inventory-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: var(--background-color);
    border-radius: 8px;
    transition: transform 0.2s;
    animation: fadeIn 0.5s ease-out;
}

.inventory-item:hover {
    transform: translateX(5px);
}

.inventory-item .item-icon {
    font-size: 1.5em;
    margin-right: 10px;
    min-width: 30px;
    text-align: center;
}

.inventory-item .item-name {
    flex-grow: 1;
}

.inventory-item .item-date {
    font-size: 0.8em;
    color: #666;
}

.container {
    flex-grow: 1;
    text-align: center;
    position: relative;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

header {
    margin-bottom: 30px;
    margin-top: 30px;
}

h1 {
    color: var(--secondary-color);
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-info {
    display: flex;
    justify-content: space-around;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 8px;
    padding: 10px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hole {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background-color: var(--hole-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

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

.hole.clicked {
    animation: pop 0.3s ease-out;
}

.hole.coin {
    background-color: var(--primary-color);
}

.hole.reward {
    background-color: var(--secondary-color);
}

.game-message {
    margin: 20px 0;
    font-size: 1.2em;
    min-height: 1.5em;
    color: var(--secondary-color);
}

footer {
    margin-top: 30px;
    color: #666;
}

/* 奖励动画和弹窗 */
.reward-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.reward-popup > div {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    animation: popupAppear 0.5s ease-out;
    max-width: 90%;
    width: 300px;
}

.reward-popup h2 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.5em;
}

.reward-popup .reward-icon {
    font-size: 4em;
    margin: 20px 0;
    animation: bounce 0.5s ease infinite alternate;
}

.reward-popup p {
    font-size: 1.2em;
    margin: 15px 0;
    color: #333;
}

.reward-popup button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 15px;
    transition: transform 0.2s, background-color 0.2s;
}

.reward-popup button:hover {
    transform: scale(1.05);
    background-color: #ff5252;
}

.floating-reward {
    position: fixed;
    animation: floatUp 1s ease-out forwards;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 2em;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

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

@keyframes popupAppear {
    0% { 
        transform: scale(0.5);
        opacity: 0;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-50px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

@keyframes bounce {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
    }

    .inventory-panel {
        min-width: 100%;
        max-width: 100%;
        order: 2;
    }

    .container {
        order: 1;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }

    h1 {
        font-size: 2em;
    }

    .game-info {
        font-size: 1em;
    }

    .game-board {
        gap: 4px;
    }

    .reward-popup > div {
        padding: 20px;
    }

    .reward-popup .reward-icon {
        font-size: 3em;
    }
    
    .inventory-item {
        font-size: 0.9em;
    }
}
