/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 滚动通知条 */
.scrolling-notice {
    background: linear-gradient(90deg, #e55c6f, #ff7b8a);
    color: white;
    height: 28px;
    overflow: hidden;
    position: relative;
    font-size: 11px;
    line-height: 28px;
    white-space: nowrap;
}

.scrolling-text {
    display: inline-block;
    animation: scroll-left 35s linear infinite;
    -webkit-animation: scroll-left 35s linear infinite;
}

@keyframes scroll-left {
    0% {
        transform: translate3d(120%, 0, 0);
    }

    100% {
        transform: translate3d(-120%, 0, 0);
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Global Styles */
body {
    margin: 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #fdeff2 0%, #fce4ec 50%, #f8bbd9 100%);
    background-attachment: fixed;
    color: #555;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* 页面加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.1);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.1);
    }

    70% {
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 微信支付按钮成功状态 */
.wechat-pay-button.success {
    background: linear-gradient(135deg, #4CAF50, #45a049) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4) !important;
}

.wechat-pay-button.success::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent) !important;
    animation: shimmer 0.6s ease !important;
}

/* 页面加载动画 */
@keyframes pageLoad {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动进入动画 */
@keyframes scrollIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 星级评分逐个显示动画 */
@keyframes starAppear {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }

    50% {
        transform: scale(1.2) rotate(0deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* 鼠标跟随粒子动画 */
@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    50% {
        opacity: 0.7;
        transform: translate(10px, -10px) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translate(20px, -20px) scale(0);
    }
}

/* 分析项目悬停动画 */
@keyframes itemHover {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-5px) scale(1.02);
    }
}

/* 支付保障闪烁动画 */
@keyframes guaranteeBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* 自定义提示框样式 */
.custom-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 30px;
    min-width: 300px;
    max-width: 400px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid #e55c6f;
}

.custom-alert.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.custom-alert .alert-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    background: linear-gradient(135deg, #e55c6f, #ff8a80);
    color: white;
    animation: pulse 2s infinite;
}

.custom-alert .alert-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}

.custom-alert .alert-message {
    font-size: 16px;
    color: #666;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 25px;
}

.custom-alert .alert-button {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #e55c6f, #ff8a80);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.custom-alert .alert-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 92, 111, 0.4);
}

.custom-alert .alert-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.custom-alert .alert-button:hover::before {
    left: 100%;
}

.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.alert-overlay.show {
    opacity: 1;
}

/* 成功提示样式 */
.custom-alert.success .alert-icon {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.custom-alert.success {
    border-color: #4CAF50;
}

/* 警告提示样式 */
.custom-alert.warning .alert-icon {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.custom-alert.warning {
    border-color: #ff9800;
}

/* 提示框进入动画 */
@keyframes alertSlideIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotateY(90deg);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotateY(0deg);
    }
}

.custom-alert.slide-in {
    animation: alertSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1), 0 0 60px rgba(229, 92, 111, 0.1);
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
    padding-bottom: 90px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

a {
    text-decoration: none;
    color: #e55c6f;
    transition: color 0.3s ease;
}

a:hover {
    color: #d44a5c;
}

/* Header */
.header .banner {
    width: 100%;
    display: block;
}

/* 加载动画 */
@keyframes loadingPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

.loading {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

/* 成功动画 */
@keyframes successBounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.success {
    animation: successBounce 0.6s ease;
}

/* 错误动画 */
@keyframes errorShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.error {
    animation: errorShake 0.5s ease;
    border-color: #dc3545 !important;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.3) !important;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e55c6f, #ff8a80);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #d44a5c, #ff7a7a);
}

/* 选择文本样式 */
::selection {
    background: rgba(229, 92, 111, 0.3);
    color: #333;
}

::-moz-selection {
    background: rgba(229, 92, 111, 0.3);
    color: #333;
}

/* 焦点可见性 */
*:focus {
    outline: 2px solid rgba(229, 92, 111, 0.5);
    outline-offset: 2px;
}

/* 禁用元素样式 */
.disabled {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(50%);
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .container {
        border: 2px solid #000;
    }

    .test-button {
        border: 2px solid #000;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2d1b2e 0%, #3d2a3e 50%, #4a3549 100%);
    }

    .container {
        background-color: #2a2a2a;
        color: #e0e0e0;
    }

    .main-content {
        background: linear-gradient(135deg, #3a3a3a 0%, #2e2e2e 100%);
    }

    .input-group input {
        background: #3a3a3a;
        color: #e0e0e0;
        border-color: #555;
    }

    .notice {
        background: linear-gradient(135deg, #3a3a3a, #2e2e2e);
        color: #ccc;
    }
}

/* Common Header for inner pages */
.result-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #fff 0%, #fef7f7 100%);
    border-bottom: 1px solid #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 10;
    animation: slideInDown 0.6s ease-out;
    box-shadow: 0 2px 10px rgba(229, 92, 111, 0.1);
}

.result-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #e55c6f, #ff8a80, #ffb6c1, #e55c6f);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.result-header .back-arrow {
    font-size: 28px;
    margin-right: 15px;
    cursor: pointer;
    color: #e55c6f;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, transparent, rgba(229, 92, 111, 0.1));
}

.result-header .back-arrow:hover {
    color: #d44a5c;
    transform: translateX(-3px) scale(1.1);
    background: linear-gradient(135deg, rgba(229, 92, 111, 0.1), rgba(229, 92, 111, 0.2));
    box-shadow: 0 4px 15px rgba(229, 92, 111, 0.2);
}

.result-header h1 {
    font-size: 18px;
    margin: 0;
    text-align: center;
    flex-grow: 1;
    font-weight: 600;
    background: linear-gradient(135deg, #e55c6f, #ff8a80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

/* 悬浮历史订单查询按钮 - 已隐藏 */
.floating-history-button {
    display: none;
}

/* 图片悬浮历史订单查询按钮 */
.image-floating-button {
    position: fixed;
    right: 20px;
    top: 10%;
    z-index: 1000;
    width: auto;
    height: auto;
    border-radius: 0;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: float 3s ease-in-out infinite;
    display: inline-block;
}

.image-floating-button img {
    width: auto;
    height: auto;
    border: none;
    outline: none;
    display: block;
    max-width: 150px;
}

.image-floating-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 - 移动端调整图片悬浮按钮 */
@media (max-width: 768px) {
    .image-floating-button {
        right: 6px;
        top: 15%;
        width: 35px;
        height: auto;
        border-radius: 3px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
        animation: float 3s ease-in-out infinite;
    }

    .image-floating-button img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 3px;
    }

    /* 更小屏幕的进一步调整 */
    @media (max-width: 480px) {
        .image-floating-button {
            right: 5px;
            top: 12%;
            width: 20px;
        }
    }
}

/* 反馈按钮 */
.feedback-button {
    position: fixed;
    right: 20px;
    bottom: 120px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50% !important;
    overflow: visible;
    background: linear-gradient(135deg, #e55c6f, #ff8a80);
    color: white;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(229, 92, 111, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: float 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.feedback-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(229, 92, 111, 0.6);
    background: linear-gradient(135deg, #d44a5c, #ff7a7a);
}

/* 反馈弹窗 */
.feedback-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.feedback-modal-content {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: fadeInScale 0.3s ease;
    border: 2px solid #e55c6f;
}

.feedback-modal-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(135deg, #e55c6f, #ff8a80);
}

.feedback-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.feedback-modal-close {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.feedback-modal-close:hover {
    transform: scale(1.2);
}

.feedback-modal-body {
    padding: 25px;
}

.feedback-form-group {
    margin-bottom: 20px;
}

.feedback-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.feedback-form-group input,
.feedback-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.feedback-form-group input:focus,
.feedback-form-group textarea:focus {
    outline: none;
    border-color: #e55c6f;
    box-shadow: 0 0 10px rgba(229, 92, 111, 0.2);
}

.feedback-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #e55c6f, #ff8a80);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feedback-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 92, 111, 0.4);
}

.feedback-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.feedback-submit-btn:hover::before {
    left: 100%;
}

/* 响应式设计 - 移动端调整反馈按钮 */
@media (max-width: 768px) {
    .feedback-button {
        right: 15px;
        bottom: 100px;
        width: 45px;
        height: 45px;
        border-radius: 50% !important;
        overflow: visible;
        background: linear-gradient(135deg, #e55c6f, #ff8a80);
        color: white;
        font-size: 12px;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(229, 92, 111, 0.4);
        transition: all 0.3s ease;
        cursor: pointer;
        animation: float 3s ease-in-out infinite;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
        border: 2px solid rgba(255, 255, 255, 0.8);
    }

    .feedback-modal-content {
        width: 95%;
        margin: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .feedback-modal-header {
        padding: 15px;
    }

    .feedback-modal-header h3 {
        font-size: 16px;
    }

    .feedback-modal-body {
        padding: 20px;
    }

    /* 更小屏幕的进一步调整 */
    @media (max-width: 480px) {
        .feedback-button {
            right: 10px;
            bottom: 80px;
            width: 40px;
            height: 40px;
            font-size: 11px;
        }
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 0 !important;
        border-radius: 0 !important;
        min-height: 100vh !important;
        box-shadow: none !important;
    }

    .main-content {
        padding: 20px;
    }

    .title h1 {
        font-size: 36px;
    }

    .input-section {
        flex-direction: row;
        gap: 10px;
    }

    .input-group {
        width: 48%;
    }

    .gender-tab {
        padding: 10px 8px;
        font-size: 14px;
    }

    .input-group input {
        padding: 15px 8px;
        font-size: 14px;
    }

    .test-button {
        font-size: 18px;
        padding: 16px;
        margin: 0 auto 20px auto;
        display: block;
        max-width: 280px;
    }
}