* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #f6f7fb;
}

body {
    min-height: 100%;
    margin: 0;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #f6f7fb;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    width: 100%;
    max-width: 600px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 20px 14px 32px;
}

.page-header {
    padding: 8px 2px 18px;
}

.page-header h1 {
    margin: 0;
    color: #111827;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}

.page-header p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

.recent-section {
    margin-bottom: 18px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 0 2px;
}

.section-title h2 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.clear-recent {
    min-height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    color: #6b7280;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    background: #e5e7eb;
}

.recent-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.recent-item {
    overflow: hidden;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.recent-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #e5e7eb;
}

.recent-item span {
    display: block;
    min-height: 34px;
    padding: 7px 6px 8px;
    overflow: hidden;
    color: #111827;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.game-card {
    overflow: hidden;
    border: 1px solid #eef0f4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.game-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #e5e7eb;
}

.game-content {
    padding: 14px;
}

.game-content h2 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

.game-content p {
    display: -webkit-box;
    margin: 8px 0 14px;
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.play-button {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #16a34a;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.play-button:active {
    background: #15803d;
}

.empty-state {
    padding: 36px 18px;
    border: 1px solid #eef0f4;
    border-radius: 16px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.empty-state h2 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    line-height: 1.35;
}

.empty-state p {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
}

.pager-link,
.pager-info {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.pager-link {
    min-width: 88px;
    padding: 0 14px;
    background: #ffffff;
    color: #16a34a;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.pager-link-disabled {
    color: #9ca3af;
    box-shadow: none;
}

.pager-info {
    flex: 1;
    color: #6b7280;
    font-weight: 600;
}

@media (min-width: 480px) {
    .page {
        padding-right: 20px;
        padding-left: 20px;
    }
}
