body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 800px;
    width: 100%;
}

header {
    margin-bottom: 20px;
}

.avatar-container {
    position: relative;
    display: inline-block; /* 让容器包裹头像大小 */
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px; /* Intentionally keeping the 20px from the user's replace_block if it was a desired change */
    cursor: pointer; /* 添加指针样式，提示可点击 */
    border: 3px solid #ddd; /* Retaining original border */
    animation: pulse 2s infinite; /* Retaining original animation */
}

.tooltip {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 9999; /* 保证气泡在最上层 */
    bottom: 125%; /* 定位在头像上方 */
    left: 50%;
    margin-left: -100px; /* 使用负边距将提示居中 */
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    word-break: break-all;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%; /* 提示框下方的小箭头 */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.avatar-container:hover .tooltip, 
.avatar-container.active .tooltip {
    visibility: visible;
    opacity: 1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(204,169,44, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(204,169,44, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(204,169,44, 0);
    }
}

h1 {
    color: #333;
    margin-bottom: 10px;
}

main p {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 30px;
}

.donation-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    padding: 10px;
    border: none;
    border-radius: 50%; /* Make buttons circular for icons */
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 60px; /* Fixed width for circular buttons */
    height: 60px; /* Fixed height for circular buttons */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0; /* Default background for icon buttons */
}

.btn img {
    width: 24px; /* Adjust icon size */
    height: 24px;
}


.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Specific icon button styles can be added here if needed, e.g., for hover effects that change icon color or background */

/* Responsive adjustments for donation buttons */
@media (max-width: 600px) {
    body {
        padding: 5px;
    }
    .container {
        padding: 10px 2vw;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }
    header {
        margin-bottom: 10px;
    }
    .avatar-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        margin-bottom: 10px;
    }
    .avatar {
        width: 72px;
        height: 72px;
        margin-bottom: 8px;
    }
    .tooltip {
        width: 90vw;
        max-width: 260px;
        min-width: 120px;
        left: 50%;
        margin-left: -45vw;
        font-size: 0.95em;
        padding: 10px 8px;
        z-index: 9999;
        bottom: 110%;
        box-sizing: border-box;
        word-break: break-all;
    }
    .tooltip::after {
        left: 50%;
        margin-left: -5px;
    }
    .donation-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 18px;
    }
    .btn {
        width: 100%;
        max-width: 260px;
        border-radius: 10px;
        padding: 12px 0;
        font-size: 1em;
        margin: 0 auto 8px auto;
    }
    .btn img {
        margin-right: 0;
    }
    h1 {
        font-size: 1.2em;
        margin-bottom: 6px;
    }
    main p {
        font-size: 1em;
        margin-bottom: 18px;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 4px 1vw;
    }
    .btn {
        max-width: 98vw;
        font-size: 0.95em;
    }
    .avatar {
        width: 56px;
        height: 56px;
    }
    .tooltip {
        width: 98vw;
        min-width: 80px;
        max-width: 180px;
        margin-left: -49vw;
        font-size: 0.85em;
        bottom: 120%;
        padding: 8px 4px;
    }
}
.btn.paypal-icon:hover {
    background-color: #e0e0e0;
}
.btn.wechat-icon:hover {
    background-color: #e0e0e0;
}
.btn.alipay-icon:hover {
    background-color: #e0e0e0;
}
.btn.btc-icon:hover {
    background-color: #e0e0e0;
}
.btn.eth-icon:hover {
    background-color: #e0e0e0;
}

footer {
    margin-top: 30px;
    font-size: 0.9em;
    color: #777;
}

footer a {
    color: #0070ba;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #005ea6;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: slideIn 0.5s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-btn:hover,
.close-btn:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

#modal-qr-image {
    max-width: 60%; /* 缩小二维码图片 */
    height: auto;
    margin-top: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
}

#modal-title {
    margin-top: 0;
    color: #333;
}

#modal-text {
    font-size: 1em;
    line-height: 1.5;
    color: #555;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 20px;
    }
    .donation-buttons {
        flex-direction: column;
    }
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}
