/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
}

.login-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.login-btn:hover {
    background-color: #45a049;
}

/* Hero区域 */
.hero {
    background-image: url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=news%20and%20games%20hero%20banner%20with%20modern%20design&image_size=landscape_16_9');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* 新闻游戏卡片区域 */
.news-games {
    padding: 50px 0;
    background-color: #f5f5f5;
}

.news-games h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

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

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.card-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.game-entry {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.game-entry h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.choice-buttons {
    display: flex;
    gap: 10px;
}

.choice-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.choice-btn-a {
    background-color: #2196F3;
    color: white;
}

.choice-btn-a:hover {
    background-color: #0b7dda;
}

.choice-btn-b {
    background-color: #f44336;
    color: white;
}

.choice-btn-b:hover {
    background-color: #d32f2f;
}

.comments-section {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.comments-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #666;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-username {
    font-weight: bold;
    color: #2196F3;
    margin-right: 8px;
    min-width: 60px;
}

.comment-content {
    color: #666;
    flex: 1;
    word-break: break-word;
}

.comment-btn {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.comment-btn:hover {
    background-color: #45a049;
}

/* 模态弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

#commentContent {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    resize: vertical;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.modal-btn-submit {
    background-color: #4CAF50;
    color: white;
}

.modal-btn-submit:hover {
    background-color: #45a049;
}

.modal-btn-cancel {
    background-color: #f0f0f0;
    color: #333;
}

.modal-btn-cancel:hover {
    background-color: #e0e0e0;
}

/* 登录弹窗样式 */
.login-username-input {
    margin-bottom: 20px;
}

.login-username-input label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.login-username-input input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.login-username-input input:focus {
    outline: none;
    border-color: #4CAF50;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-option {
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.temp-login {
    background-color: #2196F3;
    color: white;
}

.temp-login:hover {
    background-color: #0b7dda;
}

.gmail-login {
    background-color: #DB4437;
    color: white;
}

.gmail-login:hover {
    background-color: #c23321;
}

.facebook-login {
    background-color: #4267B2;
    color: white;
}

.facebook-login:hover {
    background-color: #365899;
}

/* 游戏页面样式 */
.game-page {
    padding: 40px 0;
    min-height: 80vh;
}

.game-page h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
}

/* 选择弹窗 */
.choice-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s ease;
}

.choice-content {
    background-color: white;
    margin: 15% auto;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.choice-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

.choice-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.choice-options .choice-btn {
    padding: 15px;
    font-size: 16px;
}

/* 游戏容器 */
.game-container {
    display: none;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.game-iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 结果弹窗 */
.result-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s ease;
}

.result-content {
    background-color: white;
    margin: 10% auto;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.result-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.result-score {
    font-size: 36px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 15px;
}

.result-camp {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* 结果弹窗评论区域样式 */
.result-comment-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.result-comment-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

#resultCommentContent {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    resize: vertical;
    font-size: 14px;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.result-comment-section .result-actions {
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    margin-top: 0;
}

.result-comment-section .result-btn {
    flex: 1;
    min-width: 100px;
}

.result-comment-section .result-btn:first-child {
    background-color: #4CAF50;
    color: white;
}

.result-comment-section .result-btn:first-child:hover {
    background-color: #45a049;
}

.result-comment-section .result-btn:last-child {
    background-color: #f0f0f0;
    color: #333;
}

.result-comment-section .result-btn:last-child:hover {
    background-color: #e0e0e0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .choice-options {
        gap: 10px;
    }
    
    .game-iframe {
        height: 400px;
    }
    
    .result-content {
        padding: 20px;
    }
    
    .result-score {
        font-size: 28px;
    }
    
    .result-camp {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .choice-content {
        padding: 20px;
    }
    
    .choice-title {
        font-size: 20px;
    }
    
    .game-iframe {
        height: 300px;
    }
}
