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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.corePage {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: #333;
    font-size: 2.2em;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

label {
    font-weight: bold;
    color: #555;
    font-size: 1.1em;
    flex: 1;
    text-align: left;
}

select {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    padding: 12px 18px;
    font-size: 1em;
    color: #444;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    flex: 1;
    min-width: 120px;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.1);
    font-weight: 500;
    backdrop-filter: blur(5px);
}

select:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 8px 20px rgba(102, 126, 234, 0.25);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
}

/* 下拉框选项样式 */
select option {
    background: rgba(255, 255, 255, 0.95);
    color: #444;
    padding: 10px;
    border: none;
}

select option:hover,
select option:checked {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
}

.show {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    outline: none;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(-1px);
}

.result {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.result:not(:empty) {
    animation: bounceIn 0.6s ease-out;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background-color: #4caf50;
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0px);
    pointer-events: auto;
}

/* 添加关闭动画 */
.toast.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0.8);
}

.footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 10px 20px;
    text-decoration: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.github-link:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    color: #764ba2;
}

.github-icon {
    transition: all 0.3s ease;
}

.github-link:hover .github-icon {
    transform: rotate(360deg);
}

.history-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid rgba(102, 126, 234, 0.1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-header h3 {
    color: #667eea;
    font-size: 1.2em;
    margin: 0;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.clear-history-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
}

.clear-history-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff5252 0%, #ff7979 100%);
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.3);
    padding: 10px;
}

.history-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
}

.history-item:hover::before {
    transform: scaleY(1);
}

.history-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    transform: translateX(8px) translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
}

.history-item:active {
    transform: translateX(6px) translateY(-1px);
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-name {
    font-weight: 600;
    color: #333;
    flex: 1;
    font-size: 1.1em;
    background: linear-gradient(45deg, #333, #555);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}


.history-time {
    font-size: 0.85em;
    color: #888;
    margin-left: 15px;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 500;
}

.history-empty {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 5px 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    border: 2px dashed rgba(102, 126, 234, 0.3);
    font-size: 1.1em;
}

.history-empty::before {
    content: "📝";
    display: block;
    font-size: 2em;
}

/* 滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}


@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 中奖动画样式 */
.surprise-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: surpriseIn 0.5s ease-out;
    backdrop-filter: blur(5px);
}

.surprise-container.fade-out {
    animation: surpriseOut 0.5s ease-in;
}

@keyframes surpriseIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

@keyframes surpriseOut {
    from {
        opacity: 1;
        backdrop-filter: blur(5px);
    }

    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

.surprise-content {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    padding: 50px 60px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    animation: surpriseContentIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.surprise-content::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }

    100% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
}

@keyframes surpriseContentIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.2) rotate(-90deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.surprise-title {
    font-size: 3em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: titleBounce 1s ease-out 0.3s both;
}

@keyframes titleBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

.surprise-subtitle {
    font-size: 2.5em;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 15px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    animation: subtitleGlow 2s ease-in-out infinite alternate;
}

@keyframes subtitleGlow {
    from {
        text-shadow: 0 0 20px #ffd700, 0 0 30px #ffd700, 0 0 40px #ffd700;
    }

    to {
        text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700, 0 0 30px #ffd700;
    }
}

.surprise-message {
    font-size: 1.3em;
    color: #fff;
    font-style: italic;
    opacity: 0.9;
    animation: messageSlide 0.8s ease-out 0.6s both;
}

@keyframes messageSlide {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 0.9;
    }
}

/* 烟花效果 */
.fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: fireworksExplode linear infinite;
}

@keyframes fireworksExplode {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 1;
    }

    15% {
        transform: translateY(50vh) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-10vh) scale(0);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .surprise-content {
        padding: 30px 40px;
        margin: 20px;
    }

    .surprise-title {
        font-size: 2em;
    }

    .surprise-subtitle {
        font-size: 1.8em;
    }

    .surprise-message {
        font-size: 1em;
    }
}