/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background-color: #34495e;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    list-style: none;
}

.navbar-menu li {
    margin-left: 20px;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar-menu a:hover, .navbar-menu a.active {
    color: #3498db;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #e0e0e0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

/* 搜索框样式 */
.search-box {
    margin-top: 0;
}

.search-box form {
    display: flex;
    gap: 15px;
    background: white;
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-box form:focus-within {
    box-shadow: 0 5px 25px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: #333;
}

.search-box input::placeholder {
    color: #999;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

.btn-search {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 12px 30px;
    font-weight: 700;
}

.btn-search:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

/* 主内容区 */
.main {
    padding: 40px 0;
    margin-top: 0;
}

/* 标题样式 */
.section-title {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: white;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 28px;
    margin-top: 20px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 游戏列表样式 */
.game-list {
    margin-top: 30px;
}

/* 游戏卡片网格布局 */
.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    align-items: start;
}

/* 游戏卡片样式 */
.game-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* 游戏编号样式 */
.game-number {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 1;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.game-card:hover::before {
    transform: scaleX(1);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.98);
}

.game-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 800;
    line-height: 1.3;
    position: relative;
    padding-bottom: 10px;
}

.game-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.game-description {
    color: #666;
    line-height: 1.7;
    font-size: 1rem;
    margin: 0;
    overflow: visible;
}

/* 无结果提示 */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    color: #95a5a6;
    font-size: 1.3rem;
    font-weight: 600;
}

/* 添加游戏表单样式 */
.add-game-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group label {
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    padding: 18px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
    color: #333;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-actions {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    justify-content: center;
}

/* 设备卡片样式 */
.device-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.device-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.98);
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.device-info {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
}

.date-info {
    color: #666;
    font-size: 14px;
}

.progress-info {
    font-weight: bold;
    color: #3498db;
    font-size: 1.1rem;
}

/* 游戏状态样式 */
.game-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.game-item:last-child {
    border-bottom: none;
}

.game-item:hover {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    padding-left: 20px;
}

.game-name {
    font-weight: 600;
    color: #333;
}

.game-status {
    display: flex;
    gap: 10px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.status-true {
    background-color: #d4edda;
    color: #155724;
    box-shadow: 0 2px 8px rgba(21, 87, 36, 0.2);
}

.status-false {
    background-color: #f8d7da;
    color: #721c24;
    box-shadow: 0 2px 8px rgba(114, 28, 36, 0.2);
}

.status-error {
    background-color: #fff3cd;
    color: #856404;
    box-shadow: 0 2px 8px rgba(133, 100, 4, 0.2);
}

/* 无数据提示 */
.no-data {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    color: #95a5a6;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 30px 0;
}

/* 成功消息 */
.success-message {
    text-align: center;
    padding: 20px;
    background: rgba(212, 237, 218, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(21, 87, 36, 0.2);
    color: #155724;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 20px 0;
    border-left: 4px solid #27ae60;
}

/* 章节样式 */
.section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section h2 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 22px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    font-weight: 800;
}

/* 响应式设计 */
/* 大屏设备 */
@media (min-width: 1200px) {
    .game-list {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    }
}

/* 平板设备 */
@media (max-width: 1024px) {
    .game-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .navbar-menu {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .navbar-menu li {
        margin: 0 10px;
    }
    
    .device-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* 手机设备 */
@media (max-width: 768px) {
    .game-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .search-box form {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        border-radius: 20px;
    }
    
    .search-box input,
    .search-box button {
        width: 100%;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .add-game-section {
        padding: 25px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .header {
        padding: 15px 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .main {
        padding: 30px 0;
    }
    
    .game-card {
        padding: 25px;
    }
    
    .section {
        padding: 25px;
    }
    
    .device-card {
        padding: 20px;
    }
    
    .game-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .game-status {
        width: 100%;
        justify-content: space-between;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

/* 应用动画 */
.game-card,
.device-card,
.add-game-section,
.section {
    animation: fadeInUp 0.6s ease forwards;
}

/* 添加延迟动画 */
.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }
.game-card:nth-child(5) { animation-delay: 0.5s; }
.game-card:nth-child(6) { animation-delay: 0.6s; }

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 响应式网格调整 */
@media (max-width: 480px) {
    .game-card {
        padding: 20px;
    }
    
    .game-title {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .section {
        padding: 20px;
    }
    
    .device-card {
        padding: 15px;
    }
}

/* 页面过渡效果 */
.page-transition {
    transition: all 0.3s ease-in-out;
}

/* 导航栏活动状态 */
.navbar-menu a.active {
    position: relative;
}

.navbar-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #3498db;
    border-radius: 2px;
    animation: fadeInUp 0.3s ease;
}