body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background: linear-gradient(to right, #a8edea, #fed6e3);
    font-family: 'Arial', sans-serif;
    font-size: 15px;
    overflow: auto; /* 允许滚动，确保内容可以完全展示 */
    padding: 20px; /* 添加安全边距 */
    box-sizing: border-box; /* 确保padding不会影响整体布局 */
    --primary-color: #ff6f61;
    --primary-dark: #e55b50;
    --primary-light: #ff856e;
    --gradient-start: #a8edea;
    --gradient-end: #fed6e3;
    --text-color: #333;
    --white: #fff;
    --shadow: rgba(0, 0, 0, 0.2);
}

.container, .wheel-container, .animation-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}

.wheel-container, .animation-container {
    display: none;
}

.active {
    opacity: 1;
}

h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    letter-spacing: 2px;
}

#avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 15px var(--shadow);
    border: 4px solid var(--white);
    transition: transform 0.3s ease;
}

#avatar:hover {
    transform: scale(1.05);
}

#message {
    margin-top: 20px;
    text-align: center;
    font-size: 15px;
    color: var(--text-color);
    line-height: 1.6;
}

.highlight {
    font-weight: bold;
    color: var(--primary-color);
}

#my-lucky {
    border: 10px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--shadow);
    max-width: 90vw;
    max-height: 90vh;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
}

#startButton {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 15px;
    color: var(--white);
    background-color: var(--primary-color);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px var(--primary-dark);
    transition: all 0.3s ease;
    outline: none;
}

#startButton:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

#startButton:active {
    box-shadow: 0 2px var(--primary-dark);
    transform: translateY(3px);
}

.falling-emojis {
    position: fixed;
    top: -50px;
    font-size: 30px;
    animation: fall linear infinite;
    z-index: 5;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

#prizeMapping {
    margin-top: 30px;
    font-size: 14px;
    color: var(--text-color);
    text-align: left;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    box-sizing: border-box;
}

.prize-card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow);
    padding: 15px;
    position: relative;
    flex: 1 1 calc(50% - 20px);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: calc(50% - 20px);
    overflow: hidden;
    border-left: 4px solid var(--primary-color);
}

.prize-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--shadow);
}

.prize-icon {
    font-size: 24px;
    margin-right: 15px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    padding: 10px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.prize-description {
    font-size: 16px;
    color: var(--text-color);
    font-weight: 500;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    color: rgba(254, 214, 227, 0.3);
    pointer-events: none;
    white-space: nowrap;
}

.log-container {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px var(--shadow);
    width: 80%;
    max-width: 800px;
    overflow: auto;
    box-sizing: border-box;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: var(--primary-light);
    color: var(--white);
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.pagination {
    text-align: center;
    margin: 20px 0;
}

.page-link {
    display: inline-block;
    margin: 0 5px;
    padding: 5px 10px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-link.active {
    background-color: var(--primary-dark);
}

.page-link:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    body {
        font-size: 13px;
    }

    #avatar {
        width: 100px;
        height: 100px;
    }

    h1 {
        font-size: 1.5rem;
    }

    #startButton {
        padding: 12px 25px;
        font-size: 14px;
    }

    .prize-card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .prize-icon {
        font-size: 20px;
    }

    .prize-description {
        font-size: 14px;
    }

    .watermark {
        font-size: 40px;
    }

    .log-container {
        width: 95%;
    }

    table, th, td {
        padding: 8px;
    }

    button {
        padding: 8px 16px;
    }
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    width: 80%;
    max-width: 400px;
    box-shadow: 0 5px 30px var(--shadow);
    text-align: center;
    transform: translateY(20px);
    transition: all 0.3s ease;
    position: relative;
    border-top: 5px solid var(--primary-color);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-icon {
    font-size: 50px;
    margin-bottom: 15px;
    display: block;
}

.modal-title {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 15px;
}

.modal-content {
    color: var(--text-color);
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.modal-button:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

@media (max-width: 600px) {
    .modal-container {
        width: 90%;
        padding: 20px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-content {
        font-size: 14px;
    }
}