/**
 * Knowledge Match UI Styles
 * Phase 3: Mentor/Mentee Profile Cards
 */

/* Container */
.knowledge-match-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.knowledge-match-header {
    margin-bottom: 30px;
}

.knowledge-match-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--color-text-primary);
}

.knowledge-match-header p {
    color: var(--color-text-secondary);
    font-size: 16px;
}

/* Filters */
.match-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(26, 26, 46, 0.8);
    color: #ffffff;
    font-size: 14px;
    min-width: 150px;
    cursor: pointer;
}

.filter-group select option {
    background: rgba(26, 26, 46, 0.98);
    color: #ffffff;
    padding: 8px;
}

.filter-group select:hover,
.filter-group input:hover {
    background: rgba(26, 26, 46, 0.9);
    border-color: rgba(74, 144, 226, 0.5);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

/* Match Cards Grid */
.match-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.knowledge-match-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 24px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.knowledge-match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.knowledge-match-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(74, 144, 226, 0.25);
    border-color: var(--color-primary);
}

.knowledge-match-card:hover::before {
    opacity: 1;
}

/* Card Header */
.match-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
}

.match-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.match-info {
    flex: 1;
}

.match-info h3 {
    font-size: 20px;
    margin: 0 0 5px 0;
    color: var(--color-text-primary);
    font-weight: 600;
}

.match-type-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(80, 200, 120, 0.2);
    border: 1px solid rgba(80, 200, 120, 0.4);
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-secondary);
}

.match-type-badge:has-text("Mentee") {
    background: rgba(245, 166, 35, 0.2);
    border-color: rgba(245, 166, 35, 0.4);
    color: var(--color-accent);
}

/* Score Circle */
.match-score {
    position: absolute;
    top: 0;
    right: 0;
}

.score-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(
        var(--color-primary) 0%,
        var(--color-gray-light) 0%
    );
    position: relative;
    transition: all 0.6s ease;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(26, 26, 46, 0.95);
}

.score-circle span {
    position: relative;
    z-index: 1;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
}

/* Card Body */
.match-card-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.match-skills h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.skill-tag {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid;
}

.skill-tag.teach {
    background: rgba(80, 200, 120, 0.15);
    border-color: rgba(80, 200, 120, 0.4);
    color: var(--color-secondary);
}

.skill-tag.learn {
    background: rgba(245, 166, 35, 0.15);
    border-color: rgba(245, 166, 35, 0.4);
    color: var(--color-accent);
}

/* Stats */
.match-stats {
    display: flex;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.stat-icon {
    font-size: 14px;
}

/* Card Footer */
.match-card-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.match-card-footer button {
    flex: 1;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-profile {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-view-profile:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.02);
}

.btn-neural-match {
    background: linear-gradient(135deg, #ff8c00 0%, #ff4500 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.btn-neural-match:hover {
    background: linear-gradient(135deg, #ffa500 0%, #ff6347 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.5);
}

.btn-brain-duel {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-brain-duel:hover {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.btn-request-session {
    background: var(--color-primary);
    color: white;
}

.btn-request-session:hover {
    background: var(--color-primary-dark);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

/* No Matches */
.no-matches {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-secondary);
}

.no-matches p {
    font-size: 16px;
    margin: 10px 0;
}

/* Loading State */
.match-cards-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
}

.match-cards-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1200px) {
    .match-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .match-cards-grid {
        grid-template-columns: 1fr;
    }

    .match-filters {
        flex-direction: column;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
    }

    .score-circle {
        width: 60px;
        height: 60px;
    }

    .score-circle::before {
        width: 46px;
        height: 46px;
    }

    .score-circle span {
        font-size: 14px;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .knowledge-match-card {
        background: rgba(255, 255, 255, 0.05);
    }

    .score-circle::before {
        background: rgba(26, 26, 46, 0.98);
    }
}
