* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-image: url('headerbg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #333;
    position: relative;
}

.container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #e91e63;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #666;
}

button {
    background-color: #e91e63;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

button:hover {
    background-color: #c2185b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(233, 30, 99, 0.6);
}

button:active {
    transform: translateY(0);
}

#stop-btn {
    background-color: #666;
    box-shadow: 0 4px 12px rgba(102, 102, 102, 0.4);
}

#stop-btn:hover {
    background-color: #555;
    box-shadow: 0 6px 16px rgba(102, 102, 102, 0.6);
}

.popup {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease, float 3s ease-in-out infinite;
    z-index: 999;
    max-width: 250px;
    text-align: center;
    border-left: 4px solid #e91e63;
}

.popup p {
    font-size: 1rem;
    margin: 0;
    color: #333;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    html, body {
        height: 100%;
        width: 100%;
        overflow: hidden;
    }
    
    body {
        background-attachment: scroll;
        background-size: cover;
        background-position: center;
        min-height: 100%;
    }
    
    .popup {
        max-width: 200px;
        padding: 12px;
    }
    
    .popup p {
        font-size: 0.9rem;
    }
    
    .heart {
        width: 15px;
        height: 15px;
    }
    
    .heart::before,
    .heart::after {
        width: 15px;
        height: 15px;
    }
    
    .heart::before {
        top: -7.5px;
    }
    
    .heart::after {
        left: -7.5px;
    }
}

@media (max-width: 480px) {
    .popup {
        max-width: 150px;
        padding: 10px;
    }
    
    .popup p {
        font-size: 0.8rem;
    }
    
    .heart {
        width: 10px;
        height: 10px;
    }
    
    .heart::before,
    .heart::after {
        width: 10px;
        height: 10px;
    }
    
    .heart::before {
        top: -5px;
    }
    
    .heart::after {
        left: -5px;
    }
}

.popup::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(255, 255, 255, 0.95);
}

.popup p {
    font-size: 1rem;
    margin: 0;
    color: #333;
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.popup.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

/* 背景效果 */
.background-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(233, 30, 99, 0.3);
    transform: rotate(45deg);
    animation: fall linear infinite;
}

.heart::before,
.heart::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(233, 30, 99, 0.3);
    border-radius: 50%;
}

.heart::before {
    top: -10px;
    left: 0;
}

.heart::after {
    top: 0;
    left: -10px;
}

@keyframes fall {
    0% {
        transform: rotate(45deg) translateY(-100px);
        opacity: 1;
    }
    100% {
        transform: rotate(45deg) translateY(calc(100vh + 100px));
        opacity: 0;
    }
}