@import url('css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary: #6c5ce7;
    --primary-hover: #5b4bc4;
    --bg-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --card-radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout Container */
.app-layout {
    display: flex;
    flex-direction: row;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
    gap: 20px;
    flex: 1;
}

/* Sidebar & Categories */
.sidebar {
    width: 260px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.cat-btn {
    width: 213px;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid transparent;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}


@media (max-width: 900px) {
    .cat-btn { width: 21px;}
}

.cat-btn i {
    width: 24px;
    text-align: center;
    color: var(--primary);
}

.cat-btn:hover {
    background: white;
    border-color: #d1d8e0;
    transform: translateX(5px);
}

.cat-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 15px rgba(108, 92, 231, 0.3);
}
.cat-btn.active i {
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Top Header / Search */
.top-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-container input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s;
}

.search-container input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.2);
}

.search-container i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* ===== 新增：网站描述横幅 (Website Description Banner) ===== */
.site-description {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.site-description h1 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.site-description p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.game-item-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border: 1px solid white;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.game-item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.15);
}

/* Restricted Image Size */
.game-img-box {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #eee;
}

.game-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-item-card:hover .game-img-box img {
    transform: scale(1.08);
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.game-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.game-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #4b6584;
    font-weight: 600;
    margin-bottom: 15px;
}

.game-stats .rating i { color: #f39c12; }

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.btn-play {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-play:hover { background: var(--primary-hover); }

.btn-share {
    background: #f1f2f6;
    color: var(--text-dark);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-share:hover {
    background: #dfe4ea;
    color: var(--primary);
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.footer-desc {
    max-width: 600px;
    margin: 0 auto 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--text-dark);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 100;
    transition: transform 0.3s;
}

#backToTop:hover { transform: translateY(-5px); }

/* Share Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.modal-box h3 {
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1.4rem;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.social-btn:hover { opacity: 0.85; }

.btn-google { background: #EA4335; }
.btn-fb { background: #1877F2; }
.btn-twitter { background: #1DA1F2; }
.btn-linkedin { background: #0A66C2; }
.btn-stumbleupon { background: #EB4924; }

.close-modal {
    background: #f1f2f6;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.2s;
}
.close-modal:hover { background: #dfe4ea; }

/* Responsive */
@media (max-width: 992px) {
    .app-layout { flex-direction: column; }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
    }
    .category-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .cat-btn { flex: 1; min-width: 120px; justify-content: center; }
}
a{
    text-decoration: none;
}