/* Custom styles beyond Tailwind */
html {
    scroll-behavior: smooth;
}

.game-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.game-iframe {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
}

@media (max-width: 768px) {
    .game-iframe {
        min-height: 400px;
    }
}

.play-count {
    animation: increment 1s ease-out;
}

@keyframes increment {
    from {
        opacity: 0.5;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-btn {
    transition: all 0.3s ease;
}

.category-btn:hover {
    transform: translateY(-2px);
}

/* 添加新样式 */
.game-card .game-title {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.game-card .game-description {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.active-category {
    background-color: #007AFF !important;
}

/* 添加加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 100px auto;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #007AFF;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 改进搜索结果样式 */
#search-results {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#search-results::-webkit-scrollbar {
    width: 8px;
}

#search-results::-webkit-scrollbar-track {
    background: #2A2A3C;
    border-radius: 0 12px 12px 0;
}

#search-results::-webkit-scrollbar-thumb {
    background: #4A4A5C;
    border-radius: 4px;
}