/* 每日抽卡容器样式 */
.daily-cards-container {
    margin: 15px 0;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.daily-cards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.daily-cards-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.rules-btn {
    padding: 4px 12px;
    background: var(--bg-accent);
    color: var(--text-light);
    border: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--button-shadow);
}

.rules-btn:hover {
    background: var(--bg-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* 规则弹窗样式 */
.rules-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.rules-modal.show {
    opacity: 1;
    visibility: visible;
}

.rules-modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    position: relative;
}

.rules-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.rules-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.rules-modal-close {
    padding: 4px 12px;
    background: var(--bg-accent);
    color: var(--text-light);
    border: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--button-shadow);
}

.rules-modal-close:hover {
    background: var(--bg-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    color: var(--text-light);
}

.rules-modal-body {
    line-height: 1.6;
    color: var(--text-primary);
}

.rules-modal-body p {
    margin-bottom: 10px;
}

.rules-modal-body ul {
    margin-bottom: 10px;
    padding-left: 20px;
}

.rules-modal-body li {
    margin-bottom: 5px;
}

.cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 未翻开的卡牌容器 */
.cards-container {
    position: relative;
    width: 100%;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    max-width: 400px;
}

/* 卡牌样式 */
.card {
    position: absolute;
    width: 100px;
    height: 140px;
    cursor: pointer;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    transform-origin: center center;
    z-index: 10;
    pointer-events: auto;
}

/* 三张卡牌的旋转排列 - 扇形排列，围绕中心点 */
.card:nth-child(1) {
    transform: rotate(-30deg) translateX(-20px) translateY(-10px);
    z-index: 3;
}

.card:nth-child(2) {
    transform: rotate(0deg) translateX(0) translateY(0);
    z-index: 2;
}

.card:nth-child(3) {
    transform: rotate(30deg) translateX(20px) translateY(-10px);
    z-index: 1;
}

/* 卡牌内部结构 */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* 卡牌翻转效果 */
.card.flipped .card-inner {
    transform: rotateY(180deg);
}

/* 卡牌背面 */
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-color: #333;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    pointer-events: none;
}

/* 卡牌正面（复用游戏卡片样式） */
.card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--text-primary);
}

/* 游戏卡片样式（复用游戏详情页的"猜你感兴趣"样式） */
.card-front .software-img {
    width: 100%;
    height: 110px;
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 0;
    border-radius: 6px;
}

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

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

.card-front .software-read-count {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 10;
    backdrop-filter: blur(4px);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
}

.card-front .software-read-count::before {
    content: '';
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    display: inline-block;
}

.card-front .software-tags {
    position: absolute;
    bottom: 8px;
    left: 4px;
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    z-index: 10;
}

.card-front .software-tag {
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: clamp(7px, 2vw, 9px);
    font-weight: 500;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-front:hover .software-tag {
    transform: translateY(-2px);
}

.card-front .software-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    min-height: 40px;
}

.card-front .software-name {
    font-size: clamp(8px, 3vw, 14px);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    text-align: center;
    transition: color 0.3s ease;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    margin-bottom: 0;
}

.card-front:hover .software-name {
    color: var(--bg-accent);
}



/* 响应式设计 */
@media (max-width: 768px) {
    .daily-cards-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .daily-cards-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .cards-container {
        height: 150px;
        max-width: 400px;
    }
    
    .card {
        width: 100px;
        height: 140px;
    }
    
    .card-front {
        padding: 0;
    }
    
    .card-front .software-img {
        height: 110px;
    }
    
    .card-front .software-info {
        padding: 8px;
    }
    
    .card-front .software-name {
        font-size: clamp(8px, 3vw, 14px);
        margin-bottom: 0;
    }
    
    .card-front .software-tag {
        font-size: clamp(7px, 2vw, 9px);
        padding: 3px 8px;
        max-width: 70px;
        height: 18px;
    }
    

}

@media (max-width: 480px) {
    .daily-cards-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .daily-cards-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .cards-container {
        height: 150px;
        max-width: 400px;
    }
    
    .card {
        width: 100px;
        height: 140px;
    }
    
    .card-front {
        padding: 0;
    }
    
    .card-front .software-img {
        height: 110px;
    }
    
    .card-front .software-info {
        padding: 8px;
    }
    
    .card-front .software-name {
        font-size: clamp(8px, 3vw, 14px);
        margin-bottom: 0;
    }
    
    .card-front .software-tag {
        font-size: clamp(7px, 2vw, 9px);
        padding: 3px 8px;
        max-width: 70px;
        height: 18px;
    }
    

}