* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f0c29;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    position: relative;
    overflow: hidden;
}

/* 动态背景粒子效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 60% 20%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 80% 80%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 10% 90%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.15), transparent);
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 光晕效果 */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 50%, rgba(118, 75, 162, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: glow 8s ease-in-out infinite alternate;
}

@keyframes glow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-2%, -2%) rotate(3deg); }
}

.login-container {
    width: 960px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 50px 45px 40px;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header .logo {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.login-header h1 {
    font-size: 26px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.login-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    letter-spacing: 1px;
}

/* 角色网格 */
.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.role-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px 14px 22px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

/* 卡片悬停光效 */
.role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.role-card:hover::before {
    left: 100%;
}

.role-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
}

.role-card:active {
    transform: translateY(-1px);
}

.role-card .role-icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.1));
    transition: transform 0.3s ease;
}

.role-card:hover .role-icon {
    transform: scale(1.15);
}

.role-card .role-name {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    display: block;
    letter-spacing: 0.5px;
}

.role-card .role-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 6px;
    display: block;
    line-height: 1.4;
}

/* 底部 */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.login-footer a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
}

.login-footer a:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

/* 响应式 */
@media (max-width: 820px) {
    .login-container {
        width: 95%;
        padding: 30px 20px;
    }
    .role-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .role-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .role-card {
        padding: 16px 8px;
    }
    .role-card .role-icon {
        font-size: 28px;
    }
}
