/* style.css */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: #333;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    text-decoration: none;
}

body {
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: #333;
}

header {
    background-color: #fff;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

header h1 {
    margin: 0;
    color: #007bff;
}

header p {
    max-width: 785px;
    margin: 20px auto;
    /* 隐藏溢出部分 */
    overflow: hidden;
    /* 用省略号表示溢出部分 */
    text-overflow: ellipsis;
    /* 显示为块级元素 */
    display: -webkit-box;
    /* 限制行数 */
    -webkit-line-clamp: 3;
    /* 垂直布局 */
    -webkit-box-orient: vertical;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
}

.container {
    max-width: 785px;
    margin: 20px auto;
    padding: 0 20px;
}

.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.game-card {
    min-height: 450px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s;
    text-align: center;
}

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

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

.game-card h3 {
    margin: 15px 0 10px;
}

.game-card p {
    color: #666;
    font-size: 1.0em;
    padding: 0 15px 15px;
    margin: 20px auto 10px auto;
    text-align: left;
}

.card-footer {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content p {
    /* 隐藏溢出部分 */
    overflow: hidden;
    /* 用省略号表示溢出部分 */
    text-overflow: ellipsis;
    height: 115px;
}

.card-loading {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.card-loading img {
    height: 200px;
    width: 200px;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.game-p {
    margin: 20px 0;
}

.list-game-category {
    display: inline-block;
    padding: 4px 10px;
    margin: 5px;
    font-family: 'Arial', sans-serif;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    color: #00e0ff;
    background-color: rgba(0, 224, 255, 0.1);
    border: 1px solid #00e0ff;
    border-radius: 4px;
    text-shadow: 0 0 5px #00e0ff;
    box-shadow: 0 0 5px rgba(0, 224, 255, 0.5);
    transition: all 0.3s ease;
}

.list-game-category:hover {
    background-color: rgba(0, 224, 255, 0.2);
    box-shadow: 0 0 15px #00e0ff;
    transform: translateY(-2px);
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.button:hover {
    background-color: #0056b3;
}

.cyberpunk-button {
    --color-primary: #00e0ff;
    --color-secondary: #ff00c8;
    --bg-color: #1a1a2e;

    /* 基础样式 */
    position: relative;
    display: inline-block;
    padding: 15px 40px;
    font-family: 'Arial', sans-serif;
    font-size: 1.5em;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--color-primary);
    background-color: var(--bg-color);
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 224, 255, 0.5);
    text-shadow: 0 0 5px rgba(0, 224, 255, 0.8);
}

/* 悬停效果 */
.cyberpunk-button:hover {
    color: var(--color-secondary);
    background-color: var(--bg-color);
    border-color: var(--color-secondary);
    box-shadow: 0 0 20px var(--color-secondary);
    text-shadow: 0 0 10px var(--color-secondary);
    transform: translateY(-3px);
}

/* 内部动态光效 */
.cyberpunk-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

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

@keyframes gradient-move {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-button {
    /* 基础样式 */
    display: inline-block;
    padding: 15px 40px;
    font-family: 'Arial', sans-serif;
    font-size: 1.5em;
    font-weight: 600;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;

    /* 渐变背景 */
    background-image: linear-gradient(to right, #6a11cb, #2575fc, #6a11cb);
    background-size: 200% auto;
    animation: gradient-move 3s linear infinite;
}

/* 悬停效果 */
.gradient-button:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
    background-position: right center;
}

.glass-button {
    /* 基础样式 */
    display: inline-block;
    padding: 15px 40px;
    font-family: 'Arial', sans-serif;
    font-size: 1.5em;
    font-weight: 600;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* 兼容性 */
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* 悬停效果 */
.glass-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

.game-detail img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.play-page {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.play-page iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.back-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-top: 1px solid #ddd;
    margin-top: 20px;
    color: #666;
}

.footer-content {
    /* 使用 Flexbox 布局，让链接居中且有间距 */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; /* 增加链接之间的间距 */
    padding: 20px 0;

    /* 深色背景和浅色文字，与网站主体风格统一 */
    background-color: #1a1a2e;
    color: #f0f2f5;

    /* 增加一个顶部边框，形成分隔线效果 */
    border-top: 1px solid rgba(255, 255, 255, 0.1);

    /* 设置字体和大小 */
    font-family: 'Arial', sans-serif;
    font-size: 0.9em;
}

.footer-content a {
    /* 移除下划线，让链接更简洁 */
    text-decoration: none;

    /* 默认颜色设置为柔和的灰色 */
    color: #b0b0b0;

    /* 添加平滑过渡效果 */
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-content a:hover {
    /* 鼠标悬停时，文字颜色变为亮眼的霓虹蓝，并略微放大 */
    color: #00e0ff;
    transform: scale(1.1);
}

.footer-content a:active {
    /* 鼠标点击时，添加轻微的压缩效果，模拟按钮被按下的感觉 */
    transform: scale(0.95);
    color: #00c0e0;
}

/* Modal Overlay - covers the entire screen */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal Content Box */
.modal-content {
    background-color: #1a1a2e; /* Dark theme background */
    color: #f0f2f5;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 500px;
    position: relative;
    font-family: Arial, sans-serif;
    animation: modal-fade-in 0.3s ease-out;
}

/* Animation for the modal content */
@keyframes modal-fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #f0f2f5;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ff00c8; /* A vibrant hover color */
}

/* Form Styling */
.modal-content h2 {
    text-align: center;
    color: #00e0ff;
    margin-top: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #2c2c3e;
    border: 1px solid #444;
    color: #fff;
    border-radius: 6px;
    box-sizing: border-box; /* Ensures padding is included in the element's total width and height */
    transition: border-color 0.3s;
}

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

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    background-image: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 117, 252, 0.4);
}