/* 城市恶魔：重启 City Devil:Restart 官网样式 */
/* 2024-2025 SEO优化样式，移动优先，符合Core Web Vitals */

/* 基础变量 */
:root {
    /* 主色调 - 深玫瑰粉色系 */
    --primary-color: #c2185b;
    --primary-dark: #ad1457;
    --primary-light: #e91e63;
    
    /* 背景色系 - 粉白配色 */
    --bg-dark: #ffffff;
    --bg-darker: #fdf2f8;
    --bg-light: #ffffff;
    --bg-secondary: #fce7f3;
    
    /* 文字色系 - 粉白配色 */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    
    /* 渐变色 - 粉白配色 */
    --gradient-primary: linear-gradient(135deg, #c2185b 0%, #e91e63 100%);
    --gradient-dark: linear-gradient(135deg, #ffffff 0%, #fdf2f8 100%);
    --gradient-overlay: linear-gradient(rgba(194, 24, 91, 0.75), rgba(194, 24, 91, 0.75));
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.1);
    
    /* 动画 */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* 基础重置和字体 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* 字体显示优化 */
@font-face {
    font-family: 'Segoe UI';
    font-display: swap;
}

/* Bootstrap组件覆盖 */
.bg-primary {
    --bs-bg-opacity: 1;
    background-color: #c2185b !important;
}

/* 橙色下载按钮 */
.btn-download {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-download:hover {
    background: linear-gradient(135deg, #ff5722 0%, #ff7043 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-download:focus {
    background: linear-gradient(135deg, #ff5722 0%, #ff7043 100%);
    color: white;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.25);
}

.btn-download:active {
    background: linear-gradient(135deg, #e64a19 0%, #ff5722 100%);
    transform: translateY(0);
}

/* 导航栏样式 - 粉白配色 */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(194, 24, 91, 0.1);
    transition: var(--transition-normal);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(194, 24, 91, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-primary) !important;
}

.brand-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    margin: 0 0.5rem;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* 英雄区域样式 */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--text-white);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(3px);
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-overlay);
    z-index: -1;
}

.hero-content {
    padding: 2rem 0;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    margin-bottom: 2rem;
}

.title-main {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-sub {
    display: block;
    font-size: 1.8rem;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #ffffff;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    margin-bottom: 3rem;
}

.hero-actions .btn {
    margin: 0.5rem 0.5rem 0.5rem 0;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.hero-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    color: #ffffff;
    font-weight: 500;
}

.stat-item i {
    font-size: 1.2rem;
    color: var(--primary-light);
    margin-right: 0.5rem;
}

.hero-media {
    text-align: center;
    animation: fadeInRight 1s ease-out 0.3s both;
}

.hero-media img {
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    transition: var(--transition-slow);
}

.hero-media img:hover {
    transform: scale(1.05) rotateY(5deg);
}

/* 通用区域样式 */
.section-padding {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* 关于部分样式 */
.about-content h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.about-content h3:first-child {
    margin-top: 0;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* 特色功能卡片 */
.feature-card {
    background: var(--text-white);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition-normal);
    border: 1px solid #e9ecef;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--text-white);
    transition: var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: rotateY(180deg);
}

.feature-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 截图展示 */
.screenshot-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: var(--transition-normal);
    height: 100%;
}

.screenshot-item img {
    transition: var(--transition-slow);
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.screenshot-item:hover img {
    transform: scale(1.1);
}

.screenshot-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--text-white);
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: var(--transition-normal);
}

.screenshot-item:hover .screenshot-overlay {
    transform: translateY(0);
}

.screenshot-overlay h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.screenshot-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 宣传轮播 */
.promo-carousel {
    margin-top: 3rem;
}

.promo-carousel img {
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 20px 20px;
}

/* FAQ样式 */
.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-button {
    background: var(--text-white);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1.5rem 2rem;
    border: none;
    transition: var(--transition-fast);
}

.accordion-button:not(.collapsed) {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-body {
    padding: 1.5rem 2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
}

/* 下载区域 */
.download-buttons .btn {
    margin: 0.5rem;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.download-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.download-info {
    color: rgba(255, 255, 255, 0.8);
}

/* 页脚样式 - 粉白配色 */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(194, 24, 91, 0.15);
}

.footer h5, .footer h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer a:hover {
    color: var(--primary-color);
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(194, 24, 91, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: var(--transition-fast);
    color: var(--primary-color);
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-3px);
}

.friendly-links a {
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: var(--text-white);
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .title-main {
        font-size: 2.5rem;
    }
    
    .title-sub {
        font-size: 1.4rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1rem;
    }
    
    .stat-item {
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .screenshot-item {
        margin-bottom: 1.5rem;
    }
    
    .promo-carousel img {
        height: 250px;
    }
    
    .hero-actions {
        text-align: center;
    }
    
    .hero-actions .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .download-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .title-main {
        font-size: 2rem;
    }
    
    .title-sub {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
        font-size: 1rem;
    }
}

/* 高性能优化 */
.hero-bg-image,
.screenshot-item img,
.promo-carousel img {
    will-change: transform;
}

/* 深色模式支持 - 保持粉白主题 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #0f0a0e;
        --bg-secondary: #1a0e16;
        --bg-dark: #0f0a0e;
        --bg-darker: #1a0e16;
        --text-primary: #ffffff;
        --text-secondary: #e5d1dc;
        --gradient-overlay: linear-gradient(rgba(15, 10, 14, 0.85), rgba(15, 10, 14, 0.85));
    }
    
    .feature-card {
        background: var(--bg-darker);
        border-color: rgba(194, 24, 91, 0.2);
    }
    
    .accordion-button {
        background: var(--bg-darker);
        color: var(--text-primary);
    }
    
    .navbar {
        background: rgba(15, 10, 14, 0.95) !important;
        border-bottom: 1px solid rgba(194, 24, 91, 0.2);
    }
    
    .footer {
        background: var(--bg-darker);
        border-top: 1px solid rgba(194, 24, 91, 0.2);
    }
}

/* 可访问性改进 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .back-to-top,
    .hero-actions,
    .download-buttons {
        display: none;
    }
    
    .hero-section {
        min-height: auto;
        color: black;
    }
    
    .hero-overlay {
        display: none;
    }
}

/* Focus样式优化 */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 选择文本样式 */
::selection {
    background: var(--primary-light);
    color: var(--text-white);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* 图片懒加载占位符 */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}