/* UnifiedLogin Web Portal - 样式文件 */

:root {
    --primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --surface: rgba(255, 255, 255, 0.95);
    --text: #1a1a2e;
    --muted: #94a3b8;
    --qq: #12B7F5;
    --ms: #00A4EF;
    --tw: #1DA1F2;
    --dt: #1677FF;
    --fs: #00C4C4;
    --ok: #10B981;
    --er: #EF4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 背景效果 */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; top: 80%; animation-delay: 2s; }
.particle:nth-child(3) { left: 80%; top: 10%; animation-delay: 4s; }
.particle:nth-child(4) { left: 70%; top: 70%; animation-delay: 1s; }
.particle:nth-child(5) { left: 30%; top: 40%; animation-delay: 3s; }
.particle:nth-child(6) { left: 90%; top: 50%; animation-delay: 5s; }
.particle:nth-child(7) { left: 50%; top: 90%; animation-delay: 2.5s; }
.particle:nth-child(8) { left: 60%; top: 30%; animation-delay: 1.5s; }

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb1 {
    width: 400px;
    height: 400px;
    background: #667eea;
    top: -100px;
    right: -100px;
    animation: pulse 8s ease-in-out infinite;
}

.orb2 {
    width: 300px;
    height: 300px;
    background: #764ba2;
    bottom: -50px;
    left: -50px;
    animation: pulse 8s ease-in-out infinite 4s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translate(100px, -50px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translate(50px, -100px) rotate(180deg);
        opacity: 0.3;
    }
    75% {
        transform: translate(-50px, -50px) rotate(270deg);
        opacity: 0.6;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

/* 主容器 */
.container {
    background: var(--surface);
    border-radius: 24px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.4);
}

.logo svg {
    width: 36px;
    height: 36px;
    color: white;
}

.header h1 {
    color: var(--text);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    color: #64748b;
    font-size: 15px;
}

/* 玩家卡片 */
.player-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.player-avatar {
    width: 52px;
    height: 52px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.player-avatar svg {
    width: 28px;
    height: 28px;
    color: white;
    stroke: white;
    fill: none;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 4px;
}

.player-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 状态徽章 */
.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--ok);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--er);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 登录提供商按钮 */
.login-providers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.provider-btn {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 20px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.provider-btn:nth-child(1) { animation: slideUp 0.6s ease-out 0.15s both; }
.provider-btn:nth-child(2) { animation: slideUp 0.6s ease-out 0.2s both; }
.provider-btn:nth-child(3) { animation: slideUp 0.6s ease-out 0.25s both; }
.provider-btn:nth-child(4) { animation: slideUp 0.6s ease-out 0.3s both; }
.provider-btn:nth-child(5) { animation: slideUp 0.6s ease-out 0.35s both; }

.provider-btn:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.provider-btn:active:not(:disabled) {
    transform: translateY(-2px);
}

.provider-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.provider-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.provider-icon svg {
    width: 28px;
    height: 28px;
    color: white;
    fill: currentColor;
}

.provider-btn:hover:not(:disabled) .provider-icon {
    transform: scale(1.1);
}

.provider-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

/* 提供商颜色 */
.provider-btn.qq .provider-icon { background: linear-gradient(135deg, var(--qq), #1a9fe8); }
.provider-btn.microsoft .provider-icon { background: linear-gradient(135deg, var(--ms), #0078d4); }
.provider-btn.twitter .provider-icon { background: linear-gradient(135deg, var(--tw), #0d8ed9); }
.provider-btn.dingtalk .provider-icon { background: linear-gradient(135deg, var(--dt), #0958d9); }
.provider-btn.feishu .provider-icon { background: linear-gradient(135deg, var(--fs), #00a3a3); }

.provider-btn.qq:hover:not(:disabled) { border-color: var(--qq); }
.provider-btn.microsoft:hover:not(:disabled) { border-color: var(--ms); }
.provider-btn.twitter:hover:not(:disabled) { border-color: var(--tw); }
.provider-btn.dingtalk:hover:not(:disabled) { border-color: var(--dt); }
.provider-btn.feishu:hover:not(:disabled) { border-color: var(--fs); }

/* 状态面板 */
.status-panel {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 16px 20px;
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.status-panel.show {
    display: flex;
}

.status-panel.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.status-panel.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.status-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.status-icon svg {
    width: 24px;
    height: 24px;
}

.status-panel.success .status-icon svg {
    color: var(--ok);
}

.status-panel.error .status-icon svg {
    color: var(--er);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(245, 158, 11, 0.3);
    border-top-color: #F59E0B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status-text {
    font-size: 14px;
    font-weight: 500;
    color: #92400e;
}

.status-panel.success .status-text {
    color: #065f46;
}

.status-panel.error .status-text {
    color: #991b1b;
}

/* 信息卡片 */
.info-card {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    width: 20px;
    height: 20px;
    color: #4f46e5;
}

.info-content h3 {
    color: #3730a3;
    font-size: 14px;
    margin-bottom: 8px;
}

.info-content ol {
    padding-left: 18px;
    color: #4338ca;
    font-size: 13px;
    line-height: 1.8;
}

.info-content code {
    background: rgba(255, 255, 255, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 12px;
}

/* 提供商预览 */
.providers-preview {
    text-align: center;
}

.providers-preview h3 {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.provider-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.provider-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}

.provider-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.provider-icon.qq { background: var(--qq); }
.provider-icon.microsoft { background: var(--ms); }
.provider-icon.twitter { background: var(--tw); }
.provider-icon.dingtalk { background: var(--dt); }
.provider-icon.feishu { background: var(--fs); }

/* 页脚 */
.footer {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    animation: slideUp 0.6s ease-out 0.4s both;
}

.footer p {
    margin-bottom: 8px;
}

.footer p:last-child {
    margin-bottom: 0;
}

.divider {
    display: block;
    width: 40px;
    height: 2px;
    background: rgba(0, 0, 0, 0.1);
    margin: 12px auto;
    border-radius: 1px;
}

/* 错误消息 */
.error-message {
    text-align: center;
    padding: 40px;
    color: #ef4444;
    font-size: 16px;
}

.error-message small {
    display: block;
    margin-top: 8px;
    color: #94a3b8;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .container {
        padding: 24px;
        border-radius: 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .login-providers {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .provider-btn {
        padding: 16px 10px;
    }

    .provider-icon {
        width: 42px;
        height: 42px;
    }

    .provider-icon svg {
        width: 24px;
        height: 24px;
    }

    .player-card {
        padding: 16px;
    }
}
