/**
 * API 提示页共用样式（维护中 / 已下架 / 密钥错误 / 付费提示等）
 * 由 IndexController 输出的独立 HTML 引用：/assets/template/css/api-tip.css
 */
*, *::before, *::after {
    box-sizing: border-box;
}
html {
    -webkit-text-size-adjust: 100%;
}
html, body {
    min-height: 100%;
    min-height: 100dvh;
    margin: 0;
}
body {
    padding: max(12px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    background-color: #f5f7ff;
    overflow-x: hidden;
}
.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card {
    width: 100%;
    padding: clamp(18px, 4.5vw, 28px);
    background: #fff;
    border-radius: 14px;
    position: relative;
    z-index: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    box-shadow: 0 4px 28px rgba(15, 23, 42, 0.07);
}
.card > * {
    position: relative;
    z-index: 1;
}
.card::before {
    content: "";
    position: absolute;
    z-index: -2;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: 0 0;
    background-image: conic-gradient(#ff6b6b, #4ecdc4, #45b7d1, #96c93d, #ff6b6b);
    animation: api-tip-rotate 4s linear infinite;
}
.card::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 2px;
    top: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background: #fff;
    border-radius: 13px;
}
@keyframes api-tip-rotate {
    100% {
        transform: rotate(1turn);
    }
}
.card h3 {
    font-size: 1.5em;
    margin-bottom: 25px;
    text-align: center;
}
.message-box {
    margin: 20px 0;
    padding: 20px;
    background: #f2f4f6;
    border-radius: 12px;
}
.maint-message {
    color: #dc2626;
    font-size: 18px;
    margin: 0;
    text-align: center;
    padding: 15px;
    background: linear-gradient(45deg, rgba(254, 226, 226, 0.9) 25%, transparent 25%, transparent 50%, rgba(254, 226, 226, 0.9) 50%, rgba(254, 226, 226, 0.9) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    border-radius: 10px;
}
.maint-message strong {
    color: inherit;
    font-weight: 700;
}
.error-message {
    color: #e11d48;
    font-size: 18px;
    margin: 0;
    text-align: center;
    padding: 15px;
    background: linear-gradient(45deg, rgba(255, 228, 235, 0.95) 25%, transparent 25%, transparent 50%, rgba(255, 228, 235, 0.95) 50%, rgba(255, 228, 235, 0.95) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    border-radius: 10px;
}
.error-message strong {
    color: inherit;
    font-weight: 700;
}
.error-message.error-message--pay {
    color: #92400e;
    background: linear-gradient(45deg, rgba(254, 243, 199, 0.88) 25%, rgba(255, 251, 235, 0.92) 25%, rgba(255, 251, 235, 0.92) 50%, rgba(254, 243, 199, 0.88) 50%, rgba(254, 243, 199, 0.88) 75%, rgba(255, 251, 235, 0.92) 75%, rgba(255, 251, 235, 0.92));
    background-size: 20px 20px;
}
.qq-box {
    margin: 20px 0;
    padding: 20px;
    background: #fff7f7;
    border-radius: 12px;
}
.qq-box p {
    color: #666;
    font-size: 16px;
    margin: 0 0 10px 0;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.tpl-qq-group-link {
    position: relative;
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    padding-bottom: 2px;
    transition: color 0.2s ease;
}
.tpl-qq-group-link:hover {
    color: #5dade2;
}
.tpl-qq-group-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.tpl-qq-group-link:hover::after {
    transform: scaleX(1);
}
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 28px;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.home-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}
.home-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}
@media (max-width: 640px) {
    .card {
        padding: clamp(14px, 4vw, 20px);
        border-radius: 12px;
    }
    .card::after {
        border-radius: 10px;
    }
    .card h3 {
        font-size: clamp(1.15rem, 4vw, 1.35rem);
        margin-bottom: 16px;
    }
    .message-box,
    .qq-box {
        padding: 14px;
        margin: 12px 0;
    }
    .maint-message,
    .error-message {
        font-size: 15px;
        padding: 12px;
    }
    .home-btn {
        width: 100%;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
        font-size: 15px;
        padding: 12px 20px;
        min-height: 44px;
    }
}
