/* 开元棋牌 棋牌娱乐平台 - 主样式文件 */
/* 移动端优先设计 */

/* CSS变量定义 */
:root {
    --primary-color: #1a237e;
    --primary-dark: #0d1442;
    --primary-light: #3949ab;
    --secondary-color: #ffd700;
    --accent-color: #ff6b35;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-color: #f5f5f5;
    --bg-dark: #1a1a2e;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

ul, ol {
    list-style: none;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部导航 */
.site-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.main-nav {
    padding: 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
}

.site-logo {
    height: 40px;
    width: auto;
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    left: 0;
}

.menu-icon::before {
    top: -7px;
}

.menu-icon::after {
    bottom: -7px;
}

.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    padding: 10px 0;
}

.nav-menu.active {
    display: flex;
}

.nav-link {
    color: var(--white);
    padding: 12px 20px;
    display: block;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.1);
    color: var(--secondary-color);
}

.nav-link.cta-btn {
    background: var(--secondary-color);
    color: var(--primary-dark);
    margin: 10px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
}

.nav-link.cta-btn:hover {
    background: #ffea00;
}

/* 面包屑导航 */
.breadcrumb {
    background: var(--white);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.85rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item::after {
    content: '>';
    margin: 0 8px;
    color: var(--text-muted);
}

.breadcrumb-item:last-child::after {
    display: none;
}

.breadcrumb-item a {
    color: var(--text-light);
}

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

.breadcrumb-item.current {
    color: var(--text-color);
    font-weight: 500;
}

/* 主内容区 */
.main-content {
    flex: 1;
}

/* Hero区域 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    color: var(--white);
    padding: 40px 15px;
    text-align: center;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--primary-dark);
    padding: 12px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
}

.hero-cta:hover {
    background: #ffea00;
    transform: translateY(-2px);
    color: var(--primary-dark);
}

/* 游戏卡片网格 */
.games-section {
    padding: 40px 15px;
    background: var(--white);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-dark);
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.game-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.game-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.game-card-content {
    padding: 15px;
}

.game-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.game-card-title a {
    color: inherit;
}

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

.game-card-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.5;
}

.game-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.game-card-link {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.game-card-link:hover {
    background: var(--primary-light);
    color: var(--white);
}

/* 文章详情页 */
.game-detail {
    background: var(--white);
}

.article-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 30px 15px;
}

.article-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.article-hero {
    width: 100%;
}

.hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.article-body {
    padding: 30px 15px;
}

.content-section {
    margin-bottom: 30px;
}

.content-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.content-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 20px 0 10px;
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.content-image {
    width: 100%;
    border-radius: var(--radius-md);
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

/* 表格样式 */
.rules-table,
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
}

.rules-table caption {
    font-weight: 600;
    margin-bottom: 10px;
    text-align: left;
}

.rules-table th,
.rules-table td,
.info-table th,
.info-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.rules-table th,
.info-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--primary-dark);
}

.rules-table tr:hover,
.info-table tr:hover {
    background: var(--bg-color);
}

/* 特色列表 */
.feature-list {
    margin: 20px 0;
}

.feature-list li {
    padding: 10px 0 10px 25px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* CTA区域 */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 30px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-top: 30px;
}

.cta-section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    border: none;
    padding: 0;
    color: var(--white);
}

.cta-section p {
    margin-bottom: 20px;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--primary-dark);
    padding: 12px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    background: #ffea00;
    transform: translateY(-2px);
    color: var(--primary-dark);
}

/* 标签页面 */
.tags-page {
    padding: 30px 0;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.page-intro {
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.tag-category {
    margin-bottom: 30px;
}

.tag-category h2 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.tag-link:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.tag-large {
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.tag-medium {
    font-size: 0.95rem;
}

.tag-small {
    font-size: 0.85rem;
}

/* 下载页面 */
.download-page {
    padding: 30px 0;
}

.download-header {
    text-align: center;
    margin-bottom: 30px;
}

.download-header h1 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.download-intro {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 500;
}

.download-hero {
    margin-bottom: 30px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.download-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.download-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.platform-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ios-icon {
    background: #000;
    color: #fff;
}

.android-icon {
    background: #3ddc84;
    color: #fff;
}

.download-card h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.download-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.download-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
}

.ios-btn {
    background: #000;
    color: #fff;
}

.ios-btn:hover {
    background: #333;
    color: #fff;
}

.android-btn {
    background: #3ddc84;
    color: #fff;
}

.android-btn:hover {
    background: #2bc46a;
    color: #fff;
}

.version-info {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* APP特色 */
.app-features {
    margin-bottom: 40px;
}

.app-features h2 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 25px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.feature-item {
    background: var(--white);
    padding: 20px 15px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.feature-item h4 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* 安装指南 */
.install-guide {
    margin-bottom: 40px;
}

.install-guide h2 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.guide-section {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.guide-section h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.guide-steps {
    counter-reset: step;
}

.guide-steps li {
    padding: 10px 0 10px 35px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    counter-increment: step;
}

.guide-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* FAQ */
.faq-section {
    margin-bottom: 40px;
}

.faq-section h2 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.faq-item {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
}

.faq-item h4 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.faq-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* 页脚 */
.site-footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: 40px 15px 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin: 0 auto 15px;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.footer-column h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

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

.footer-license {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-license p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 5px;
}

/* 首页内容区 */
.intro-section {
    padding: 40px 15px;
    background: var(--white);
}

.intro-content h2 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.intro-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 特色区域 */
.features-section {
    padding: 40px 15px;
    background: var(--bg-color);
}

.features-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.feature-card {
    background: var(--white);
    padding: 25px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.feature-card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

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

/* 作者信息 */
.author-section {
    padding: 40px 15px;
    background: var(--white);
}

.author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-color);
    padding: 25px 20px;
    border-radius: var(--radius-lg);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.author-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 平板端适配 */
@media (min-width: 768px) {
    .container {
        padding: 0 30px;
    }

    .hero-section {
        padding: 60px 30px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-card-image {
        height: 200px;
    }

    .article-header {
        padding: 50px 30px;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-body {
        padding: 50px 30px;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .download-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .features-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-main {
        grid-template-columns: 1fr 2fr;
        text-align: left;
    }

    .footer-brand {
        text-align: left;
    }

    .footer-logo {
        margin: 0 0 15px;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 桌面端适配 */
@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }

    .nav-menu {
        display: flex;
        position: static;
        background: none;
        flex-direction: row;
        padding: 0;
    }

    .nav-link {
        padding: 10px 15px;
        border-bottom: none;
    }

    .nav-link.cta-btn {
        margin: 0 0 0 10px;
    }

    .hero-section {
        padding: 80px 30px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .game-card-image {
        height: 220px;
    }

    .article-header h1 {
        font-size: 2.5rem;
    }

    .content-image {
        max-width: 600px;
    }

    .features-list {
        grid-template-columns: repeat(4, 1fr);
    }

    .author-card {
        flex-direction: row;
        text-align: left;
    }

    .author-avatar {
        margin-right: 20px;
        margin-bottom: 0;
    }
}

/* 大屏幕适配 */
@media (min-width: 1200px) {
    .container {
        padding: 0 40px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .games-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 打印样式 */
@media print {
    .site-header,
    .site-footer,
    .cta-section,
    .download-buttons {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* 无障碍访问 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
