
/* Common Styles for All Views */
.view-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em;
    color: #2c3e50;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.view-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    border-radius: 2px;
}

.no-terms-message {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    color: #6c757d;
    font-size: 1.2em;
    border: 2px dashed #dee2e6;
}

/* Cards View Styles - Unified Design */
.terms-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.term-card {
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    background: white;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    min-height: 200px;
}

.term-card:hover {
    border-color: #3498db;
    box-shadow: 0 12px 30px rgba(52, 152, 219, 0.2);
    transform: translateY(-8px);
}

.term-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.term-card-header {
    padding: 25px 25px 15px;
    position: relative;
    min-height: 80px;
    display: flex;
    flex-direction: column;
}

.competition-card .term-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.team-card .term-card-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.channel-card .term-card-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.term-card-title {
    margin: 0;
    font-size: 1.3em;
    color: white;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em;
    flex: 1;
    padding-right: 70px;
}

.term-count-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.term-card-description {
    padding: 20px 25px;
    font-size: 0.95em;
    color: #6c757d;
    line-height: 1.6;
    border-bottom: 1px solid #f8f9fa;
    min-height: 80px;
    display: flex;
    align-items: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.term-card-footer {
    padding: 18px 25px;
    text-align: center;
    background: #f8f9fa;
    transition: background-color 0.3s ease;
}

.term-card:hover .term-card-footer {
    background: #3498db;
}

.view-events {
    color: #3498db;
    font-size: 0.95em;
    font-weight: 600;
    transition: color 0.3s ease;
}

.term-card:hover .view-events {
    color: white;
}

/* Specific card type indicators */
.term-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.competition-card::before {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.team-card::before {
    background: linear-gradient(90deg, #f093fb, #f5576c);
}

.channel-card::before {
    background: linear-gradient(90deg, #4facfe, #00f2fe);
}

.term-card-header {
    position: relative;
}

.term-card-title-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 60px;
}

.term-card-title-primary {
    flex: 1;
    min-width: 0;
}

.term-card-title {
    margin: 0;
    font-size: 1.3em;
    color: white;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.9em;
}

.term-count-badge-compact {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 1200px) {
    .terms-cards {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .term-card-title {
        font-size: 1.25em;
        -webkit-line-clamp: 2;
        max-height: 2.6em;
    }
}

@media (max-width: 992px) {
    .terms-cards {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .view-title {
        font-size: 2.2em;
    }
    
    .term-card-header {
        padding: 20px 20px 12px;
    }
    
    .term-card-title {
        font-size: 1.2em;
        padding-right: 60px;
    }
    
    .term-count-badge {
        top: 15px;
        right: 15px;
        padding: 5px 8px;
        font-size: 0.7em;
        max-width: 70px;
    }
}

@media (max-width: 768px) {
    .terms-cards {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 15px;
    }
    
    .view-title {
        font-size: 2em;
        margin-bottom: 30px;
    }
    
    .term-card-header {
        padding: 18px 18px 10px;
    }
    
    .term-card-title {
        font-size: 1.15em;
        padding-right: 50px;
        -webkit-line-clamp: 2;
        max-height: 2.6em;
    }
    
    .term-count-badge {
        top: 12px;
        right: 12px;
        padding: 4px 6px;
        font-size: 0.65em;
        max-width: 60px;
    }
    
    .term-card-description {
        padding: 15px 18px;
        font-size: 0.9em;
        min-height: 70px;
    }
    
    .term-card-footer {
        padding: 15px 18px;
    }
}

@media (max-width: 576px) {
    .terms-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .view-title {
        font-size: 1.8em;
    }
    
    .term-card {
        margin: 0 10px;
    }
    
    .term-card-title {
        font-size: 1.2em;
        -webkit-line-clamp: 3;
        max-height: 3.9em;
        padding-right: 0;
    }

    .term-count-badge {
        position: static;
        margin-top: 8px;
        max-width: none;
        display: inline-block;
    }

    .term-card-header {
        display: block;
        padding-bottom: 15px;
    }
}

.term-card-title.long-name {
    font-size: 1.1em;
    -webkit-line-clamp: 3;
    max-height: 3.9em;
}

.term-card-title.very-long-name {
    font-size: 1em;
    -webkit-line-clamp: 4;
    max-height: 5.2em;
}

.term-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for multiple cards */
.terms-cards .term-card:nth-child(1) { animation-delay: 0.1s; }
.terms-cards .term-card:nth-child(2) { animation-delay: 0.2s; }
.terms-cards .term-card:nth-child(3) { animation-delay: 0.3s; }
.terms-cards .term-card:nth-child(4) { animation-delay: 0.4s; }
.terms-cards .term-card:nth-child(5) { animation-delay: 0.5s; }
.terms-cards .term-card:nth-child(6) { animation-delay: 0.6s; }

/* Loading state improvement */
.terms-cards {
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}




.term-card-title {
    margin: 0;
    font-size: 1.2em !important;
    color: white;
    font-weight: 700;
    line-height: 1.3;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em;
    padding-right: 70px;
}

.term-count-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    max-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .term-card-title {
        font-size: 1.1em !important;
        -webkit-line-clamp: 3;
        max-height: 3.9em;
        padding-right: 50px;
    }
    
    .term-count-badge {
        top: 15px;
        right: 15px;
        max-width: 50px;
    }
}
.league-card .term-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.league-card::before {
    background: linear-gradient(90deg, #667eea, #764ba2);
}