/* cards.css */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--secondary)) 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card h3 i {
    color: var(--primary);
}

.word-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.word-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.word-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 107, 53, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.word-card:hover::before {
    opacity: 1;
}

.word-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.word-card h4 {
    font-family: var(--font-display);
    position: relative;
    z-index: 1;
    font-size: 1.8rem;
    font-weight: 800;
    margin: var(--space-md) 0;
    color: var(--text-primary);
    cursor: pointer;
    word-break: break-word;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.word-card h4:hover {
    color: var(--primary);
    transform: scale(1.02);
}

.word-card h4:active {
    transform: scale(0.98);
}

.word-card h4 i {
    transition: all 0.3s ease;
}

.word-card h4:hover i {
    opacity: 1 !important;
    color: var(--primary);
    transform: scale(1.2);
}

.word-info {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: var(--space-sm) 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    word-wrap: break-word;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.word-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
}

@media (max-width: 768px) {
    .word-card {
        height: auto;
    }
}

@media (max-width: 600px) {
    .word-card {
        padding: var(--space-lg);
    }

    .word-card h4 {
        font-size: 1.5rem;
    }

    .word-info {
        font-size: 0.95rem;
    }
}

@media (hover: none) {
    .word-card:hover,
    .stat-item:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
}
