/* 组件样式 */

/* 游戏卡片样式 */
.game-card {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: white;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.game-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover img {
    transform: scale(1.05);
}

.game-card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a2a6c;
}

.game-price {
    color: #b21f1f;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 15px 0;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #1a2a6c 0%, #b21f1f 100%);
    border: none;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.btn-outline-light {
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: rgba(255,255,255,0.2);
}

/* 表单样式 */
.form-control {
    border-radius: 25px;
    padding: 10px 20px;
    border: 2px solid #ced4da;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #fdbb2d;
    box-shadow: 0 0 0 0.2rem rgba(253, 187, 45, 0.25);
}

/* 搜索框样式 */
.search-form {
    position: relative;
}

.search-form input {
    padding-right: 3rem;
    border-radius: 9999px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.search-form input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.search-form button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--bs-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-form button:hover {
    background-color: var(--bs-primary-dark);
    transform: translateY(-50%) scale(1.1);
}

/* 幻灯片样式 */
.carousel {
    position: relative;
    overflow: hidden;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.carousel-item {
    transition: transform 0.6s ease;
    height: 600px;
}

.carousel-item img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.carousel-caption {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
    text-align: left;
}

.carousel-caption h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.carousel-caption p {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #fff;
}

.carousel-caption .btn {
    margin-top: 1rem;
    border-radius: 9999px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.carousel-caption .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.carousel-control-prev,
.carousel-control-next {
    width: 8%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 20px;
}

.carousel-indicators {
    bottom: 0;
    z-index: 10;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* 收藏按钮样式 */
.favorite-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.favorite-btn.favorited {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.favorite-btn:not(.favorited) {
    color: #6c757d;
    background-color: rgba(108, 117, 125, 0.1);
}

.favorite-btn:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* 收藏图标动画 */
.favorite-btn .fa-heart {
    transition: all 0.2s ease;
}

.favorite-btn.favorited .fa-heart {
    animation: heartBeat 0.6s ease-in-out;
}

/* 评论卡片样式 */
.review-card {
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.review-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);
}

/* 星级评分样式 */
.rating-stars {
    display: flex;
    gap: 0.5rem;
}

.rating-stars label {
    font-size: 2rem;
    color: #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rating-stars label:hover {
    color: var(--bs-warning);
    transform: scale(1.1);
}

.rating-stars input:checked ~ label {
    color: var(--bs-warning);
}

/* 评分分布条样式 */
.rating-bar-container {
    height: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.375rem;
    overflow: hidden;
}

.rating-bar {
    height: 100%;
    background-color: var(--bs-warning);
    border-radius: 0.375rem;
    transition: width 0.7s ease-out;
}

/* 评论排序样式 */
.review-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.review-sort select {
    border: none;
    outline: none;
    background-color: transparent;
    color: var(--bs-primary);
    font-weight: 500;
    cursor: pointer;
}

/* 评论用户头像样式 */
.user-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    background-image: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-dark));
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* 评论按钮样式 */
.review-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
}

.review-btn:hover {
    color: var(--bs-primary);
    background-color: rgba(0, 123, 255, 0.05);
}

/* 登录提示样式 */
.login-prompt {
    text-align: center;
    padding: 3rem;
    background-image: linear-gradient(90deg, rgba(0, 123, 255, 0.05), rgba(108, 117, 125, 0.05));
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-prompt .login-icon {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-prompt .login-icon i {
    font-size: 2rem;
    color: var(--bs-primary);
}

/* 提交按钮样式 */
.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background-image: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-0.25rem) scale(1.05);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

/* 游戏评分样式 */
.game-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.game-rating .stars {
    color: var(--bs-warning);
}

.game-rating .count {
    font-size: 0.875rem;
    color: #6c757d;
}

/* 分页样式 */
.pagination {
    display: flex;
    list-style: none;
    border-radius: 0.25rem;
    justify-content: center;
}

.pagination li a {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: var(--bs-primary);
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.pagination li a:hover {
    z-index: 2;
    color: var(--bs-primary-dark);
    text-decoration: none;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination li:first-child a {
    margin-left: 0;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.pagination li:last-child a {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.pagination li.active a {
    z-index: 3;
    color: #fff;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--bs-primary);
    animation: spin 1s ease-in-out infinite;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.loading .loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid rgba(0, 123, 255, 0.2);
    border-top-color: var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
