/* 妖精漫画 - 完整样式表 */
:root {
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #6d28d9;
    --bg-dark: #0a0a18;
    --bg-card: #1a1a35;
    --bg-widget: #14142e;
    --border-color: #2d2d55;
    --text-main: #e0e0f0;
    --text-bright: #f0f0ff;
    --text-dim: #d0d0e8;
    --text-muted: #8888aa;
    --gold: #f59e0b;
    --silver: #94a3b8;
    --bronze: #b45309;
    --glass-bg: rgba(26, 26, 53, 0.7);
    --glass-border: rgba(139, 92, 246, 0.2);
    --shadow-primary: rgba(139, 92, 246, 0.3);
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a18 0%, #14142a 100%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

::selection {
    background: var(--primary);
    color: #fff;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header 头部 ===== */
header {
    background: rgba(13, 13, 32, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--text-bright);
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #f0f0ff 0%, #c4b5fd 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform var(--transition-normal);
}

.logo h1:hover {
    transform: scale(1.05);
}

.logo h1 span {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
    font-size: 2.2rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color var(--transition-normal);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-normal);
}

nav a:hover {
    color: var(--primary-light);
    text-decoration: none;
}

nav a:hover::after {
    width: 100%;
}

nav a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* ===== Main 主区域 ===== */
.main {
    display: flex;
    gap: 30px;
    padding: 30px 0;
    flex-wrap: wrap;
}

.content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
}

.section {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

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

.section:nth-child(1) {
    animation-delay: 0.1s;
}

.section:nth-child(2) {
    animation-delay: 0.2s;
}

.section:nth-child(3) {
    animation-delay: 0.3s;
}

.section-title {
    font-size: 1.6rem;
    color: var(--text-bright);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    font-weight: 700;
    position: relative;
}

.section-title::before {
    content: "◆ ";
    color: var(--primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

/* ===== Banner 横幅 ===== */
.banner {
    background: linear-gradient(135deg, #1c1c3a 0%, #2d2d55 50%, #1c1c3a 100%);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.1);
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.2s forwards;
}

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

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

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

.banner h2 {
    font-size: 2.2rem;
    color: var(--text-bright);
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 20px rgba(139, 92, 246, 0.3);
}

.banner p {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.banner .highlight {
    color: var(--primary-light);
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.banner .highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

/* ===== 卡片网格 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-primary);
    border-color: var(--primary);
}

.card:hover::before {
    opacity: 1;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover img {
    transform: scale(1.05);
}

.card-body {
    padding: 15px;
    position: relative;
}

.card-title {
    color: var(--text-bright);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    transition: color var(--transition-normal);
}

.card:hover .card-title {
    color: var(--primary-light);
}

.card-text {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.card-text span {
    color: var(--primary-light);
}

/* ===== 详细介绍 ===== */
.detail-section {
    background: rgba(22, 22, 48, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
    transition: box-shadow var(--transition-normal);
}

.detail-section:hover {
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.1);
}

.detail-section h3 {
    color: var(--text-bright);
    font-size: 1.3rem;
    margin: 20px 0 10px;
    position: relative;
    padding-left: 15px;
}

.detail-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

.detail-section p {
    color: var(--text-main);
    margin-bottom: 15px;
    text-indent: 2em;
    line-height: 1.8;
}

/* ===== 角色网格 ===== */
.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.role-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-primary);
}

.role-card img {
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--primary);
    transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.role-card:hover img {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--primary-light);
}

.role-name {
    color: var(--text-bright);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.role-identity {
    color: var(--primary-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.role-desc {
    color: var(--text-dim);
    font-size: 0.85rem;
    text-align: left;
    line-height: 1.6;
}

/* ===== 平台介绍 ===== */
.platform-section {
    background: rgba(20, 20, 46, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
}

.platform-section h3 {
    color: var(--text-bright);
    font-size: 1.3rem;
    margin-bottom: 15px;
    position: relative;
    padding-left: 15px;
}

.platform-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

.platform-section p {
    color: var(--text-main);
    margin-bottom: 15px;
    text-indent: 2em;
    line-height: 1.8;
}

/* ===== APP下载 ===== */
.app-download {
    background: linear-gradient(135deg, #1a1a35 0%, #14142e 100%);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.app-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    background-size: 200% 100%;
    animation: gradientMove 3s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.app-download h3 {
    color: var(--text-bright);
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(139, 92, 246, 0.3);
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    color: #fff;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(124, 58, 237, 0.5);
}

/* ===== 评论 ===== */
.comment {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 15px;
    transition: transform var(--transition-normal), border-color var(--transition-normal);
    position: relative;
}

.comment::before {
    content: '"';
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.comment:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.comment-user {
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-user::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
    animation: blink 2s ease-in-out infinite;
}

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

.comment-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.comment-content {
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== 侧边栏 ===== */
.sidebar-widget {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow var(--transition-normal);
}

.sidebar-widget:hover {
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
}

.sidebar-widget h3 {
    color: var(--text-bright);
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-normal);
}

.sidebar-widget:hover h3::after {
    width: 100%;
}

/* ===== 排行榜 ===== */
.rank-list {
    list-style: none;
    counter-reset: rank;
}

.rank-list li {
    counter-increment: rank;
    padding: 8px 0;
    border-bottom: 1px solid rgba(26, 26, 53, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background var(--transition-normal), padding-left var(--transition-normal);
}

.rank-list li:hover {
    background: rgba(139, 92, 246, 0.05);
    padding-left: 10px;
}

.rank-list li::before {
    content: counter(rank);
    background: var(--primary);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: background var(--transition-normal), transform var(--transition-normal);
}

.rank-list li:hover::before {
    background: var(--primary-light);
    transform: scale(1.1);
}

.rank-list li:first-child::before {
    background: var(--gold);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.rank-list li:nth-child(2)::before {
    background: var(--silver);
}

.rank-list li:nth-child(3)::before {
    background: var(--bronze);
}

.rank-list a {
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: color var(--transition-normal);
    flex: 1;
}

.rank-list a:hover {
    color: var(--primary-light);
}

/* ===== 统计 ===== */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-item {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 15px;
    text-align: center;
    transition: transform var(--transition-normal), background var(--transition-normal);
}

.stat-item:hover {
    transform: scale(1.05);
    background: rgba(139, 92, 246, 0.1);
}

.stat-number {
    font-size: 1.5rem;
    color: var(--text-bright);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 5px;
}

/* ===== 标签 ===== */
.tag {
    display: inline-block;
    background: var(--border-color);
    color: var(--text-dim);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 1px solid transparent;
}

.tag:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
    border-color: var(--primary);
}

/* ===== 特性网格 ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-primary);
}

.feature-item h4 {
    color: var(--text-bright);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-item p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary);
    display: inline-block;
    transition: transform var(--transition-normal);
}

.feature-item:hover .feature-icon {
    transform: scale(1.2) rotate(10deg);
}

/* ===== 页脚 ===== */
footer {
    background: rgba(10, 10, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 40px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--primary-light);
    font-size: 0.9rem;
    transition: color var(--transition-normal), transform var(--transition-normal);
    display: inline-block;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.8;
}

.footer-copyright a {
    color: var(--primary-light);
    transition: color var(--transition-normal);
}

.footer-copyright a:hover {
    color: #fff;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .main {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .sidebar-widget {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    nav a {
        font-size: 0.9rem;
    }
    
    .main {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .role-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .detail-section,
    .platform-section {
        padding: 20px;
    }
    
    .btn-group {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .banner {
        padding: 30px 20px;
    }
    
    .banner h2 {
        font-size: 1.8rem;
    }
    
    .banner p {
        font-size: 1rem;
    }
    
    .app-download {
        padding: 30px 20px;
    }
    
    .app-download h3 {
        font-size: 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .comment {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo h1 span {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .card-body {
        padding: 10px;
    }
    
    .card-title {
        font-size: 0.95rem;
    }
    
    .card-text {
        font-size: 0.75rem;
    }
    
    .role-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .banner h2 {
        font-size: 1.5rem;
    }
    
    .banner p {
        font-size: 0.9rem;
    }
    
    .detail-section p,
    .platform-section p {
        font-size: 0.9rem;
        text-indent: 1.5em;
    }
    
    .footer-links {
        gap: 12px;
    }
    
    .footer-links a {
        font-size: 0.8rem;
    }
}

/* ===== 暗色模式 ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-dark: #0a0a18;
        --bg-card: #1a1a35;
        --bg-widget: #14142e;
        --border-color: #2d2d55;
    }
    
    body {
        background: linear-gradient(135deg, #0a0a18 0%, #14142a 100%);
    }
}

/* ===== 打印样式 ===== */
@media print {
    header,
    footer,
    .sidebar,
    .banner,
    .app-download,
    .btn-group {
        display: none;
    }
    
    body {
        background: #fff;
        color: #000;
    }
    
    .main {
        display: block;
    }
    
    .content {
        width: 100%;
    }
    
    .card,
    .detail-section,
    .platform-section,
    .comment,
    .role-card {
        border: 1px solid #ccc;
        background: #fff;
        color: #000;
    }
}

/* ===== 无障碍 ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== 工具类 ===== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* ===== 加载动画 ===== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--border-color) 50%, var(--bg-card) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* ===== 卡片悬停效果增强 ===== */
.card .card-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.card:hover .card-body::after {
    opacity: 1;
    animation: gradientMove 3s ease-in-out infinite;
}

/* ===== 滚动提示 ===== */
.scroll-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-normal), transform var(--transition-normal);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    z-index: 1000;
}

.scroll-hint.visible {
    opacity: 1;
}

.scroll-hint:hover {
    transform: scale(1.1);
}

.scroll-hint::before {
    content: '↑';
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
}

/* ===== 焦点样式 ===== */
:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== 图片优化 ===== */
img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

/* ===== 文本溢出处理 ===== */
.card-title,
.card-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-desc {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 链接状态 ===== */
a:visited {
    color: var(--primary-light);
}

a:active {
    color: var(--primary);
}

/* ===== 列表样式 ===== */
ul {
    list-style: none;
}

/* ===== 表格样式 ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th,
td {
    padding: 10px;
    border: 1px solid var(--border-color);
    text-align: left;
}

th {
    background: var(--bg-card);
    color: var(--text-bright);
    font-weight: 600;
}

/* ===== 代码样式 ===== */
code {
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

pre {
    background: var(--bg-card);
    padding: 15px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 15px 0;
}

pre code {
    background: none;
    padding: 0;
}

/* ===== 表单样式 ===== */
input,
textarea,
select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* ===== 按钮变体 ===== */
.btn-secondary {
    background: var(--border-color);
    color: var(--text-bright);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-light);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.3);
}

/* ===== 分割线 ===== */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 20px 0;
}

/* ===== 徽章 ===== */
.badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
}

.badge-hot {
    background: #ef4444;
}

.badge-new {
    background: #22c55e;
}

.badge-update {
    background: #3b82f6;
}

/* ===== 动画增强 ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
    }
}

.glow-animation {
    animation: glow 2s ease-in-out infinite;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-dark), var(--primary));
    border-radius: 5px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
}

/* ===== 暗色模式增强 ===== */
@media (prefers-color-scheme: dark) {
    .card,
    .role-card,
    .comment,
    .sidebar-widget {
        background: rgba(26, 26, 53, 0.8);
    }
    
    .card:hover,
    .role-card:hover,
    .comment:hover,
    .sidebar-widget:hover {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
}

/* ===== 打印样式优化 ===== */
@media print {
    .card img,
    .role-card img {
        max-width: 150px;
    }
    
    .card-grid,
    .role-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== 最终优化 ===== */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img {
    -webkit-user-drag: none;
    user-select: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}