/* 联系方式弹出窗口 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.modal.hide {
    animation: fadeOut 0.3s ease forwards;
}

.modal-content {
    background: linear-gradient(135deg, rgba(10, 20, 40, 0.98) 0%, rgba(15, 30, 60, 0.98) 100%);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center;
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    animation: scaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-content.slide-out {
    animation: scaleOut 0.25s ease forwards;
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(56, 189, 248, 0.1) 0%, transparent 50%);
    border-radius: 24px;
    z-index: 1;
    pointer-events: none;
}

.close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    font-weight: 300;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    text-align: center;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    transform: scale(1) rotate(0deg);
    z-index: 1000;
}

.close:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
    transform: scale(1.1) rotate(90deg);
}

.close:active {
    transform: scale(0.95) rotate(90deg);
    transition: transform 0.1s ease;
}

.modal-content h3 {
    color: #e0f2fe;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
    letter-spacing: -0.5px;
}

.contact-option {
    margin: 1rem 0;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 2;
}

.contact-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.contact-option p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0.5rem 0;
    font-size: 1rem;
}

.contact-option .email-address {
    font-family: 'SF Mono', monospace;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    display: inline-block;
    margin: 0.25rem;
    color: rgba(255, 255, 255, 0.85);
    transition: background 0.3s ease, transform 0.3s ease;
}

.contact-option .email-address:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.02);
}

.contact-btn {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #7dd3fc;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-top: 0.75rem;
    position: relative;
    z-index: 2;
}

.contact-btn:hover {
    background: rgba(56, 189, 248, 0.18);
    color: #e0f2fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.15);
}

.contact-link {
    cursor: pointer;
}

/* 工具详情弹窗样式 */
#tool-modal .modal-content {
    max-width: 480px;
    text-align: center;
}

#tool-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(56, 189, 248, 0.1) 0%, transparent 50%);
    border-radius: 24px;
    z-index: 1;
    pointer-events: none;
}

#tool-modal-content,
#tool-modal-content p {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1rem 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-size: 0.9375rem;
}

#tool-modal .btn,
#tool-modal .btn-primary,
#tool-modal .btn-secondary {
    background: rgba(56, 189, 248, 0.1) !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    color: #7dd3fc !important;
    border-radius: 50px !important;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

#tool-modal .btn:hover,
#tool-modal .btn-primary:hover,
#tool-modal .btn-secondary:hover {
    background: rgba(56, 189, 248, 0.18) !important;
    color: #e0f2fe !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.15);
}

/* 展开卡片标题毛玻璃悬停动效 - 定制渐变 */
.modal-header-glass {
    padding: 2rem;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.15) 30%,
        rgba(255, 255, 255, 0.08) 60%,
        rgba(255, 255, 255, 0.02) 85%,
        rgba(255, 255, 255, 0) 100%);
    border-radius: 20px 20px 0 0;
    backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: none;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, transform 0.5s ease;
    position: relative;
    overflow: hidden;
}

.modal-header-glass:hover {
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        rgba(255, 255, 255, 0.1) 60%,
        rgba(255, 255, 255, 0.03) 85%,
        rgba(255, 255, 255, 0) 100%);
    backdrop-filter: blur(25px) saturate(160%);
    transform: translateY(-2px);
}

.modal-body {
    padding: 0 2rem 2rem;
    background: transparent;
    border-radius: 0 0 20px 20px;
    border: none;
    border-top: none;
}

/* 工具弹窗标题 */
#tool-modal-title {
    margin-bottom: 1.25rem;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

#tool-modal-title:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}
