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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow-x: hidden;
}

/* 高科技背景动效 */
.tech-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00ffff;
    border-radius: 50%;
    animation: particleFloat 8s infinite linear;
    opacity: 0.7;
    box-shadow: 0 0 6px #00ffff;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

.circuit-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 255, 0.1) 25%, rgba(0, 255, 255, 0.1) 26%, transparent 27%, transparent 74%, rgba(0, 255, 255, 0.1) 75%, rgba(0, 255, 255, 0.1) 76%, transparent 77%, transparent),
        linear-gradient(0deg, transparent 24%, rgba(0, 255, 255, 0.1) 25%, rgba(0, 255, 255, 0.1) 26%, transparent 27%, transparent 74%, rgba(0, 255, 255, 0.1) 75%, rgba(0, 255, 255, 0.1) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    animation: circuitMove 10s infinite linear;
}

@keyframes circuitMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-elements::before,
.floating-elements::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    animation: floatRotate 15s infinite linear;
}

.floating-elements::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-elements::after {
    top: 60%;
    right: 10%;
    animation-delay: -7s;
}

@keyframes floatRotate {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
        opacity: 0.6;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 0.3;
    }
}

/* Header */
.navbar {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 255, 255, 0.2);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    animation: navGlow 3s ease-in-out infinite alternate;
}

@keyframes navGlow {
    from {
        box-shadow: 0 2px 20px rgba(0, 255, 255, 0.2);
    }
    to {
        box-shadow: 0 2px 30px rgba(0, 255, 255, 0.4);
    }
}

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

.logo h1 {
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

.tagline {
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #ffd700;
}

/* Main Content */
main {
    margin-top: 80px;
}

.hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    color: white;
    padding: 6rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
    animation: heroPattern 8s ease-in-out infinite;
}

@keyframes heroPattern {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(0, 255, 255, 0.8), 0 0 40px rgba(255, 0, 255, 0.3);
    }
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

/* 二维码样式 */
.qr-section {
    display: flex;
    justify-content: center;
}

.qr-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    animation: qrFloat 3s ease-in-out infinite alternate;
    transition: all 0.3s ease;
}

.qr-container:hover {
    transform: scale(1.05);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
}

@keyframes qrFloat {
    from {
        transform: translateY(0);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }
    to {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
}

.qr-code {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    filter: brightness(1.1) contrast(1.2);
}

.qr-text {
    color: #00ffff;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.cta-button {
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.5s;
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.5);
}

.cta-button:hover::before {
    left: 100%;
}

/* Games Section */
.games-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.games-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    animation: sectionTitleGlow 3s ease-in-out infinite alternate;
}

@keyframes sectionTitleGlow {
    from {
        text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(0, 255, 255, 0.8), 0 0 40px rgba(0, 255, 255, 0.3);
    }
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 255, 255, 0.3);
    border-color: rgba(0, 255, 255, 0.5);
}

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

.game-preview {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, rgba(0, 255, 255, 0.3), rgba(255, 0, 255, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
}

.game-info {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.game-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.game-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
}

.game-author {
    font-weight: 500;
}

.game-stats {
    display: flex;
    gap: 1rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.game-modal {
    max-width: 800px;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.3s;
}

button[type="submit"]:hover {
    opacity: 0.9;
}

/* Game Actions */
.game-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.like-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: background-color 0.3s;
}

.like-btn:hover {
    background-color: #e9ecef;
}

.like-btn.liked {
    background-color: #ffe6e6;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    display: flex;
    gap: 0.2rem;
}

.star {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.3s;
}

.star:hover,
.star.active {
    color: #ffd700;
}

/* Comments */
.comments-section {
    margin-top: 2rem;
}

.add-comment {
    margin-bottom: 2rem;
}

.add-comment textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1rem;
}

.add-comment button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.comment {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.comment-time {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.5rem;
}

/* Admin Interface */
.admin-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.admin-btn:hover {
    background: #ff5252;
}

.admin-modal {
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.admin-logout-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.admin-logout-btn:hover {
    background: #ff5252;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.stat-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    opacity: 0.9;
}

.stat-card span {
    font-size: 2rem;
    font-weight: bold;
}

.admin-games-table {
    overflow-x: auto;
}

.admin-games-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-games-table th,
.admin-games-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-games-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.admin-games-table tr:hover {
    background: #f8f9fa;
}

.admin-delete-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s;
}

.admin-delete-btn:hover {
    background: #ff5252;
}

.game-card .admin-delete-btn {
    margin-top: 0.5rem;
    width: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    .game-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .rating {
        justify-content: center;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-games-table {
        font-size: 0.8rem;
    }
    
    .admin-games-table th,
    .admin-games-table td {
        padding: 0.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 2rem;
    }
    
    .qr-container {
        padding: 1rem;
    }
    
    .qr-code {
        width: 100px;
        height: 100px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .games-section h2 {
        font-size: 2rem;
    }
    
    /* 移动端粒子效果优化 */
    .particle {
        width: 1px;
        height: 1px;
    }
    
    .floating-elements::before,
    .floating-elements::after {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .games-section {
        padding: 2rem 1rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .tagline {
        font-size: 0.8rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}