/* ============================================================
   common.css — 公共 HUD 样式、动画、特效（以 match.html 为基准）
   包含：关键帧动画、HUD 边角、玻璃面板、登录容器、按钮基础
   ============================================================ */

/* ═══════════════════════════════════════════════════════════
   关键帧动画
   ═══════════════════════════════════════════════════════════ */

@keyframes page-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes page-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

body {
    animation: page-fade-in 0.35s ease both;
}

@keyframes scanline-move {
    0%   { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

@keyframes container-entrance {
    0%   { opacity: 0; transform: translateY(30px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes header-entrance {
    0%   { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes form-entrance {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes corner-glow {
    0%, 100% { opacity: 0.5; box-shadow: 0 0 5px rgba(255, 70, 85, 0.3); }
    50%      { opacity: 1;   box-shadow: 0 0 15px rgba(255, 70, 85, 0.8); }
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 30px rgba(255, 70, 85, 0.6); }
    50%      { transform: scale(1.05); box-shadow: 0 0 40px rgba(255, 70, 85, 0.9); }
}

@keyframes status-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

@keyframes card-entrance {
    0%   { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes avatar-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 70, 85, 0.5); border-color: #ff4655; }
    50%      { box-shadow: 0 0 30px rgba(255, 70, 85, 0.8); border-color: #ff6b77; }
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes pulse-ring {
    0%   { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}

@keyframes scan-top {
    0%, 100% { opacity: 0; }
    50%      { opacity: 1; }
}

@keyframes fadeInUp {
    0%   { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideDown {
    0%   { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50%      { transform: scale(1.8); opacity: 1; }
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(255, 70, 85, 0.28); }
    50%      { border-color: rgba(255, 70, 85, 0.8); }
}

/* ═══════════════════════════════════════════════════════════
   HUD 角落装饰
   ═══════════════════════════════════════════════════════════ */

.hud-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid #ff4655;
    z-index: 2;
}

.hud-corner.top-left {
    top: 15px; left: 15px;
    border-right: none; border-bottom: none;
    animation: corner-glow 2s ease-in-out infinite;
}

.hud-corner.top-right {
    top: 15px; right: 15px;
    border-left: none; border-bottom: none;
    animation: corner-glow 2s ease-in-out 0.5s infinite;
}

.hud-corner.bottom-left {
    bottom: 15px; left: 15px;
    border-right: none; border-top: none;
    animation: corner-glow 2s ease-in-out 1s infinite;
}

.hud-corner.bottom-right {
    bottom: 15px; right: 15px;
    border-left: none; border-top: none;
    animation: corner-glow 2s ease-in-out 1.5s infinite;
}

/* ═══════════════════════════════════════════════════════════
   登录页 - 玻璃容器（login-wrap-hud / login-container-hud）
   ═══════════════════════════════════════════════════════════ */

.login-wrap-hud {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    font-family: 'Rajdhani', sans-serif;
}

.login-container-hud {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 520px;
    background: var(--glass-bg-main);
    border: var(--glass-border-main);
    clip-path: polygon(
        0 0, calc(100% - 30px) 0, 100% 30px,
        100% 100%, 30px 100%, 0 calc(100% - 30px)
    );
    padding: 50px 40px;
    box-shadow: var(--glass-shadow-main);
    backdrop-filter: var(--glass-filter-main);
    -webkit-backdrop-filter: var(--glass-filter-main);
    animation: container-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-header-hud {
    text-align: center;
    margin-bottom: 40px;
    animation: header-entrance 1s ease-out 0.2s both;
}

/* Agent 图标 */
.agent-icon {
    display: inline-block;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ff4655 0%, #ff6b77 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 30px rgba(255, 70, 85, 0.6);
    animation: icon-pulse 2s ease-in-out infinite;
}

.agent-icon i {
    font-size: 32px;
    color: #0a1423;
}

/* 登录标题 */
.login-title-hud {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.title-main {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #ff4655;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 70, 85, 0.8);
}

.title-sub {
    font-size: 14px;
    font-weight: 400;
    color: rgba(236, 232, 225, 0.7);
    letter-spacing: 2px;
}

/* 状态指示器 */
.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    font-size: 12px;
    color: var(--green-glow);
    letter-spacing: 1px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--green-glow);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--green-glow);
    animation: status-blink 1.5s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════
   登录表单
   ═══════════════════════════════════════════════════════════ */

.login-form-hud {
    animation: form-entrance 1s ease-out 0.4s both;
}

.input-group-hud {
    margin-bottom: 25px;
}

.input-label-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(236, 232, 225, 0.8);
}

.label-text {
    font-family: 'Orbitron', sans-serif;
}

.label-code {
    color: var(--red);
    font-family: 'Courier New', monospace;
}

.input-wrapper-hud {
    position: relative;
}

.input-hud {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 70, 85, 0.3);
    color: #ece8e1;
    font-size: 16px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
    transition: all 0.3s ease;
}

.input-hud::placeholder {
    color: rgba(236, 232, 225, 0.4);
}

.input-hud:focus {
    outline: none;
    border-color: #ff4655;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 20px rgba(255, 70, 85, 0.3);
}

/* ═══════════════════════════════════════════════════════════
   登录按钮 HUD
   ═══════════════════════════════════════════════════════════ */

.btn-hud-login {
    position: relative;
    width: 100%;
    padding: 18px;
    margin-top: 35px;
    background: linear-gradient(135deg, rgba(255, 70, 85, 0.16), rgba(255, 70, 85, 0.04));
    border: 2px solid var(--hud-border-strong);
    color: #ece8e1;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
    transition: all var(--hud-transition-base) var(--hud-ease);
}

.btn-hud-login:hover {
    background: rgba(255, 70, 85, 0.24);
    border-color: #ff4655;
    box-shadow: 0 0 26px var(--hud-glow);
    transform: translateY(-2px);
}

.btn-hud-login:active {
    transform: translateY(0);
}

.btn-hud-login:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(15, 25, 35, 0.8), 0 0 0 4px var(--hud-glow-soft);
}

.btn-bg {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #ff4655, transparent);
    transition: left var(--hud-transition-slow) var(--hud-ease);
}

.btn-hud-login:hover .btn-bg {
    left: 100%;
}

.btn-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* 按钮角标 */
.btn-corners {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

.btn-corners span {
    position: absolute;
    width: 15px; height: 15px;
    border: 2px solid var(--gold);
}

.btn-corners span:nth-child(1) { top: -2px;  left: -2px;   border-right: none; border-bottom: none; }
.btn-corners span:nth-child(2) { top: -2px;  right: -2px;  border-left: none;  border-bottom: none; }
.btn-corners span:nth-child(3) { bottom: -2px; left: -2px;  border-right: none; border-top: none; }
.btn-corners span:nth-child(4) { bottom: -2px; right: -2px; border-left: none;  border-top: none; }

/* ═══════════════════════════════════════════════════════════
   登录页脚
   ═══════════════════════════════════════════════════════════ */

.login-footer-hud {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 70, 85, 0.2);
    text-align: center;
    font-size: 12px;
    color: rgba(236, 232, 225, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-footer-hud i {
    color: var(--red);
}

.service-word-link {
    display: inline-block;
    position: relative;
    margin-left: 2px;
    color: var(--gold-light);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.08em;
    transition: color var(--hud-transition-fast) var(--hud-ease),
                transform var(--hud-transition-fast) var(--hud-ease),
                text-shadow var(--hud-transition-fast) var(--hud-ease);
}

.service-word-link::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 70, 85, 0.1), rgba(255, 201, 111, 0.95), rgba(255, 70, 85, 0.1));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--hud-transition-base) var(--hud-ease);
}

.service-word-link:hover {
    color: #ffe3b0;
    transform: translateY(-1px);
    text-shadow: 0 0 12px rgba(255, 201, 111, 0.45);
}

.service-word-link:hover::after,
.service-word-link:focus-visible::after {
    transform: scaleX(1);
}

.service-word-link:focus-visible {
    outline: none;
    text-shadow: 0 0 14px rgba(255, 201, 111, 0.55);
}

/* ═══════════════════════════════════════════════════════════
   称号 Badge 样式 — 统一定义在 components.css，此处不再重复
   ═══════════════════════════════════════════════════════════ */
