﻿/* ============================================
   Main Content
   ============================================ */
.content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: calc(100vh - 200px);
}

/* ============================================
   Advertisement Box
   ============================================ */
.adbox {
    text-align: center;
}

.adbox > p {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.ad {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    background-color: rgba(45, 48, 105, 0.5);
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* ============================================
   Games Grid
   ============================================ */
.content-games {
    margin-top: 15px;
}

.content-games-box {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.content-games-item {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
}

.content-games-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 1;
}

.content-games-item:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-glow);
}

.content-games-item:hover::before {
    opacity: 1;
}

.content-games-item-img {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.content-games-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.content-games-item:hover .content-games-item-img img {
    transform: scale(1.1);
}

.content-games-item-text {
    padding: 12px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition-normal);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
}

.content-games-item:hover .content-games-item-text {
    opacity: 1;
    transform: translateY(0);
}

.content-games-item-text h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* ============================================
   Random Game Button
   ============================================ */
.random-game-btn {
    text-align: center;
    margin: 10px 0;
}

.random-game-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: var(--primary-bg) !important;
    font-weight: 800;
    font-size: 16px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.random-game-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: var(--transition-slow);
}

.random-game-link:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.random-game-link:hover::before {
    left: 100%;
}

.random-game-link svg {
    width: 24px;
    height: 24px;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   Pagination - Redesigned
   ============================================ */
.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 50px 0;
    padding: 30px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
}

.pagination-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-item {
    padding: 14px 28px;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pagination-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.pagination-item:hover:not(:disabled) {
    color: var(--primary-bg);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(174, 232, 78, 0.3);
}

.pagination-item:hover:not(:disabled)::before {
    opacity: 1;
}

.pagination-item:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: transparent;
}

.pagination-numbers {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 16px;
    padding: 10px 20px;
    background: rgba(174, 232, 78, 0.1);
    border-radius: var(--radius-md);
    min-width: 80px;
    text-align: center;
}

/* Pagination arrows */
.pagination-item.pagination-prev,
.pagination-item.pagination-next {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-item.pagination-prev::after {
    content: '鈫?;
    font-size: 16px;
}

.pagination-item.pagination-next::after {
    content: '鈫?;
    font-size: 16px;
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    color: var(--accent-color);
    transition: var(--transition-fast);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   Game Detail Page
   ============================================ */
/* .iframe-container {
    margin: 30px 0;
} */

.game-play {
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 62, 0.8) 0%, rgba(15, 15, 36, 0.9) 100%);
    border: 1px solid var(--card-border);
}

.game-play::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(174, 232, 78, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.mobail-gamebox {
    text-align: center;
    padding: 10px;
    position: relative;
    z-index: 1;
}

.mobail-gamebox img {
    max-width: 200px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--card-border);
}

.mobail-gamebox .title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 25px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#mobile-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: var(--primary-bg) !important;
    font-weight: 800;
    font-size: 16px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

#mobile-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

#mobile-button svg {
    width: 20px;
    height: 20px;
}

/* Game Description */
.game-description {
    margin-top: 30px;
    padding: 25px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
}

.game-description .title {
    color: var(--accent-color);
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-description .title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 2px;
}

.game-description p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   Footer
   ============================================ */
.footer-container {
    background: rgba(10, 10, 26, 0.9);
    border-top: 1px solid var(--card-border);
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-fast);
}

.footer-nav a:hover {
    color: var(--accent-color);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================
   PWA Install Button - Redesigned
   ============================================ */
.pwa-install-btn {
    position: fixed;
    bottom: 90px;
    right: 15px;
    padding: 12px 20px;
    background: #fff;
    color: #1a1a2e;
    font-weight: 600;
    font-size: 13px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwa-install-btn::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.pwa-install-btn.hide {
    display: none;
}

.pwa-install-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #c0c0c0;
}

.pwa-install-btn:active {
    transform: translateY(-1px);
}

.pwa-install-btn svg {
    width: 18px;
    height: 18px;
    color: #4CAF50;
}

/* PWA Modal - Redesigned */
.pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pwa-modal.show {
    display: flex;
}

.pwa-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(8px);
}

.pwa-modal-content {
    position: relative;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    padding: 0;
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal Header with gradient */
.pwa-modal-header {
    background: linear-gradient(135deg, #aee84e 0%, #8bc34a 100%);
    padding: 35px 30px 50px;
    position: relative;
    margin-bottom: 20px;
}

.pwa-modal-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.pwa-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.pwa-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.pwa-modal-icon {
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
}

.pwa-modal-icon svg {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.pwa-modal-title {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pwa-modal-publisher {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* Modal Body */
.pwa-modal-body {
    padding: 0 30px 30px;
}

.pwa-modal-features {
    list-style: none;
    text-align: left;
    margin-bottom: 25px;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
}

.pwa-modal-features li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: #4a4a6a;
    padding: 12px 0;
    font-size: 14px;
    line-height: 1.5;
}

.pwa-modal-features li:first-child {
    padding-top: 0;
}

.pwa-modal-features li:last-child {
    padding-bottom: 0;
}

.pwa-modal-features li + li {
    border-top: 1px solid #e8e8ec;
}

.pwa-modal-features li svg {
    width: 22px;
    height: 22px;
    color: #aee84e;
    flex-shrink: 0;
    margin-top: 2px;
}

.pwa-modal-features li strong {
    color: #1a1a2e;
    display: block;
    margin-bottom: 2px;
}

.pwa-modal-features li span {
    color: #6b6b7b;
    font-size: 13px;
}

/* Install Button */
.pwa-install-confirm {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #aee84e 0%, #8bc34a 100%);
    color: #1a1a2e;
    font-weight: 700;
    font-size: 16px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(174, 232, 78, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pwa-install-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(174, 232, 78, 0.5);
}

.pwa-install-confirm:active {
    transform: translateY(0);
}

.pwa-install-confirm svg {
    width: 20px;
    height: 20px;
}

/* Not now link */
.pwa-modal-cancel {
    margin-top: 15px;
    padding: 10px;
    background: none;
    border: none;
    color: #8b8b9b;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.pwa-modal-cancel:hover {
    color: #5b5b6b;
}

/* ============================================
   About Pages
   ============================================ */
.about-text, .ahout_us {
    padding: 35px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
}

.about-text h2, .ahout_us-container h2 {
    color: var(--accent-color);
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 800;
}

.about-text h3, .ahout_us-container h3 {
    color: var(--text-primary);
    font-size: 18px;
    margin: 25px 0 12px;
    font-weight: 700;
}

.about-text p, .ahout_us-container p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-text ul, .ahout_us-container ul {
    list-style: disc;
    padding-left: 25px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.about-text li, .ahout_us-container li {
    line-height: 1.8;
    margin-bottom: 8px;
}

/* ============================================
   Light Effect Background
   ============================================ */
.light-effect {
    position: relative;
    min-height: 100vh;
}

.light-effect::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(174, 232, 78, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(174, 232, 78, 0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

