/* ========================================
   Difficulty Filter Styles
   难度筛选样式
   ======================================== */

.filter-container {
    padding: 1rem 2rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.filter-icon {
    font-size: 1.2rem;
}

.difficulty-select {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    min-width: 200px;
}

.difficulty-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.difficulty-select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.difficulty-select option {
    background: #1a1a2e;
    color: white;
    padding: 0.5rem;
}

.filter-result-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-left: auto;
}

.filter-count {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .filter-container {
        padding: 0.75rem 1rem 0.5rem;
    }

    .filter-wrapper {
        gap: 0.75rem;
    }

    .filter-label {
        font-size: 0.9rem;
    }

    .difficulty-select {
        min-width: 160px;
        font-size: 0.9rem;
        padding: 0.4rem 2rem 0.4rem 0.75rem;
    }

    .filter-result-count {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 0.25rem;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .filter-container {
        background: rgba(0, 0, 0, 0.2);
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }
}


/* ========================================
   Difficulty Badge on Word Cards
   ======================================== */

.difficulty-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 215, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    z-index: 10;
    pointer-events: none;
    transition: all 0.3s ease;
}

.card:hover .difficulty-badge {
    background: rgba(255, 215, 0, 0.25);
    border-color: rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
}

/* Ensure card-front has relative positioning */
.card-face.card-front {
    position: relative;
}


/* ========================================
   Tags Display on Card Back
   ======================================== */

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    justify-content: center;
}

.tag-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    line-height: 1.2;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tag-badge:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-1px);
}

/* Category-based tag colors */
.tag-badge:nth-child(1) {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

.tag-badge:nth-child(2) {
    background: rgba(236, 72, 153, 0.2);
    border-color: rgba(236, 72, 153, 0.4);
}

.tag-badge:nth-child(3) {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .difficulty-badge {
        top: 0.4rem;
        right: 0.4rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .tags-container {
        gap: 0.3rem;
        margin-top: 0.5rem;
    }
    
    .tag-badge {
        padding: 0.2rem 0.5rem;
        font-size: 0.65rem;
    }
}
