/* 公共样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

/* 首页导航栏 */
.navbar {
    margin-bottom: 0;
    border: none;
    border-radius: 0;
}
.navbar-brand {
    color: #fff !important;
    font-size: 1.5em;
    font-weight: bold;
}
.navbar-nav > li > a {
    color: rgba(255,255,255,0.9) !important;
}
.navbar-nav > li > a:hover {
    color: #fff !important;
}

/* 首页搜索区域 */
.hero-section {
    padding: 170px 20px;
    text-align: center;
    color: #444;
}
.hero-section h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
    font-weight: 300;
}
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.search-box {
    display: flex;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}
.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 20px 25px;
    font-size: 16px;
}
.search-box button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    padding: 0 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}
.search-box button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}


.game-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.game-card:hover {
    box-shadow: 0 5px 25px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.game-title {
    font-size: 1.1em;
    color: #333;
    margin: 0;
}
.btn-detail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}
.btn-detail:hover {
    color: #fff;
    text-decoration: none;
    transform: scale(1.05);
}

/* 随机游戏列表 */
.random-section {
    padding: 20px 0;
}
.random-section .list-group {
    margin: 0 auto;
}
.random-section .list-group-item {
    border: 1px solid #dee2e6;
    margin-bottom: -1px;
}
.random-section .list-group-item:first-child {
    border-radius: 4px 4px 0 0;
}
.random-section .list-group-item:last-child {
    border-radius: 0 0 4px 4px;
}
.game-link {
    color: #333;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}
.game-link:hover {
    color: #667eea;
    text-decoration: none;
}


/* 首页页脚 */
.footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 30px 20px;
}
.footer p {
    margin: 0;
    opacity: 0.8;
}

/* 首页响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 15px !important;
    }
    .hero-section h1 {
        font-size: 1.8em !important;
    }
    .search-box {
        flex-direction: column;
        border-radius: 12px;
    }
    .search-box button {
        padding: 15px;
    }
    .game-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .feature-row {
        flex-direction: column;
        align-items: center;
    }
}
.features {
    padding: 60px 0;
}
.feature-item {
    text-align: center;
    padding: 30px;
}
.feature-item .icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 20px;
}
.footer {
    background: #2d3748;
    color: #a0aec0;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

/* 搜索页面样式 */
.navbar {
    border: none;
    border-radius: 0;
}
.navbar-brand, .navbar-nav > li > a {
    color: white !important;
}
.navbar-brand:hover {
    color: #fff;
}
.search-bar {
    background: white;
    padding: 20px 0;
}
.search-bar input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 300px;
}
.search-bar button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.game-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 30px;
}
.game-table table {
    width: 100%;
    margin: 0;
}
.game-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}
.game-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.game-table tr:hover {
    background: #f8f9ff;
}
.btn-download {
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s;
}
.btn-download:hover {
    color: white;
    transform: translateY(-2px);
}
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}
.empty-state .icon {
    font-size: 64px;
    margin-bottom: 20px;
    color: #ccc;
}

/* 详情页样式 */
.detail-container {
    max-width: 800px;
    margin: 30px auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}
.detail-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
}
.detail-body {
    padding: 40px;
}
.download-section {
    margin-bottom: 30px;
}
.download-section h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    padding-left: 15px;
}
.download-btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.download-btn:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}
.download-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.password-form {
    text-align: center;
    padding: 30px;
}
.password-form input {
    width: 100%;
    max-width: 300px;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}
.password-form button {
    padding: 12px 40px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}
.password-form button:hover {
    background: #764ba2;
}
.password-tip {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 10px;
}
.password-tip a {
    color: #667eea;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #667eea;
    text-decoration: none;
}
.back-link:hover {
    text-decoration: underline;
}

/* 后台公共样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: white;
}
.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
}
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    color: #a0aec0;
    text-decoration: none;
    transition: all 0.3s;
}
.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}
.sidebar-menu li a .glyphicon {
    margin-right: 10px;
}
.main-content {
    margin-left: 220px;
    padding: 30px;
}
.header {
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}
.form-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}
.btn-submit {
    padding: 12px 40px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}
.btn-submit:hover {
    background: #764ba2;
}
.btn-danger {
    padding: 12px 40px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}
.btn-danger:hover {
    background: #c0392b;
}
.btn-default {
    padding: 12px 30px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    margin-left: 10px;
}
.btn-default:hover {
    background: #7f8c8d;
    color: white;
}

/* 后台列表页样式 */
.content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.content table {
    width: 100%;
}
.content th, .content td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}
.content th {
    background: #f8f9fa;
    font-weight: 600;
}
.content tr:hover {
    background: #f8f9ff;
}
.btn-sm {
    padding: 5px 15px;
    font-size: 12px;
}

/* 后台统计卡片 */
.stat-card {
    text-align: center;
    padding: 30px;
}
.stat-card .number {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
}
.stat-card .label {
    color: #666;
    margin-top: 10px;
}

/* 登录页面样式 */
.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}
.login-card h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

/* 打开密码设置页面样式 */
.radio-group {
    margin-bottom: 15px;
}
.radio-group label {
    font-weight: normal;
    margin-right: 20px;
    cursor: pointer;
}
.current-password {
    background: #f0f0f0;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}
.tips {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}