/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 背景 */
.background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-image,
.background-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.background-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
}

.background-gradient {
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* 玻璃态卡片 */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* 导航栏 */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand .logo {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s;
}

/* Flash消息 */
.flash-message {
    padding: 15px;
    margin: 20px auto;
    max-width: 1200px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.close-flash {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 主内容 */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* 英雄区 */
.hero-section {
    padding: 80px 0;
    text-align: center;
}

.hero-avatar {
    margin-bottom: 30px;
}

.hero-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: var(--shadow);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s;
}

.social-btn i {
    font-size: 1.5rem;
}

/* 作品区 */
.works-section,
.latest-devlogs {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.work-card {
    overflow: hidden;
    cursor: pointer;
}

.work-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.work-card:hover .work-image img {
    transform: scale(1.1);
}

.work-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
}

.work-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.status-developing {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.status-released {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.status-discontinued {
    background: #999;
}

.work-info {
    padding: 20px;
}

.work-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.work-info p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.work-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 开发日志 */
.devlog-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.devlog-card {
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.devlog-cover {
    height: 200px;
    overflow: hidden;
}

.devlog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.devlog-card:hover .devlog-cover img {
    transform: scale(1.1);
}

.devlog-card-body {
    padding: 20px;
}

.devlog-card-body h3 {
    margin-bottom: 15px;
}

.devlog-meta {
    display: flex;
    gap: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* 页面头部 */
.page-header {
    text-align: center;
    padding: 60px 0 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
}

/* 页脚 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer h3,
.footer h4 {
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-social a {
    color: white;
    font-size: 1.5rem;
    margin-right: 15px;
    transition: transform 0.3s;
    display: inline-block;
}

.footer-social a:hover {
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--glass-bg);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .works-grid,
    .devlog-cards {
        grid-template-columns: 1fr;
    }
}

/* 联系表单 */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.required {
    color: #f5576c;
}

.btn-block {
    width: 100%;
}

.form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
}

.contact-info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.contact-info-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* 赞助页面 */
.sponsor-intro {
    padding: 40px;
    margin-bottom: 40px;
}

.sponsor-intro ul {
    list-style: none;
    margin-top: 20px;
}

.sponsor-intro li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sponsor-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.sponsor-card {
    padding: 40px;
    text-align: center;
}

.sponsor-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2.5rem;
    color: white;
}

.sponsor-icon.wechat {
    background: linear-gradient(135deg, #09bb07, #00d100);
}

.sponsor-icon.alipay {
    background: linear-gradient(135deg, #1677ff, #00a0e9);
}

.sponsor-thanks {
    padding: 60px 40px;
    text-align: center;
}

.sponsor-thanks i {
    font-size: 4rem;
    color: #f5576c;
    margin-bottom: 20px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    max-width: 500px;
    width: 90%;
    padding: 40px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
}

.qrcode-display {
    text-align: center;
}

.qrcode-display img {
    max-width: 300px;
    margin: 20px 0;
}

/* 开发日志详情 */
.devlog-detail-content {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.devlog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.devlog-cover-full {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
}

.devlog-cover-full img {
    width: 100%;
    height: auto;
}

.devlog-video {
    margin: 30px 0;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.devlog-body {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-top: 30px;
}

.devlog-body img {
    max-width: 100%;
    border-radius: 10px;
    margin: 20px 0;
}

/* 游戏下载 */
.game-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 30px;
    margin-bottom: 30px;
}

.game-image {
    border-radius: 15px;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info h2 {
    margin-bottom: 15px;
}

.game-version {
    margin-bottom: 15px;
}

.version-badge {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
}

.download-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.btn-success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
}

/* 开发日志列表 */
.devlog-list-section {
    padding: 40px 0;
}

.devlog-item {
    margin-bottom: 30px;
    padding: 0;
    overflow: hidden;
}

.devlog-item-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 0;
}

.devlog-item-image {
    height: 100%;
    min-height: 250px;
}

.devlog-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.devlog-item:hover .devlog-item-image img {
    transform: scale(1.05);
}

.devlog-item-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.devlog-item-body h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.devlog-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

.devlog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 5rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .contact-wrapper,
    .game-item,
    .devlog-item-content {
        grid-template-columns: 1fr;
    }
    
    .game-image {
        height: 250px;
    }
    
    .devlog-item-image {
        height: 200px;
        min-height: 200px;
    }
}