/* START KOL Avatar Member Card Light Theme */
html.light-mode #kol-member-card-container {
    display: none;
    z-index: 999999;
}

html.light-mode #kol-member-card-container.active {
    display: block;
}

html.light-mode .kol-member-card-popup {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid #d0d0d0;
    max-width: 360px;
    width: 360px;
    padding: 0;
    position: fixed;
    animation: kol-card-fade-in 0.2s ease;
    z-index: 999999;
}

html.light-mode .kol-member-card-popup::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

html.light-mode .kol-member-card-popup[data-direction="right"]::before {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-color: transparent #ffffff transparent transparent;
    filter: drop-shadow(-2px 0 0 #999);
}

html.light-mode .kol-member-card-popup[data-direction="left"]::before {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #ffffff;
    filter: drop-shadow(2px 0 0 #999);
}

html.light-mode .kol-member-card-popup[data-direction="bottom"]::before {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent #ffffff transparent;
    filter: drop-shadow(0 2px 0 #999);
}

html.light-mode .kol-member-card-popup[data-direction="top"]::before {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-color: #ffffff transparent transparent transparent;
    filter: drop-shadow(0 -2px 0 #999);
}

html.light-mode .kol-member-card-header {
    display: flex;
    gap: 12px;
    padding: 16px 16px 12px 16px;
    align-items: flex-start;
    border-bottom: 1px solid #e8e8e8;
    position: relative;
}

html.light-mode .kol-member-card-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 10;
}

html.light-mode .kol-member-card-close:hover {
    color: #333;
}

html.light-mode .kol-member-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

html.light-mode .kol-member-card-info {
    flex: 1;
    min-width: 0;
    padding-right: 24px;
}

html.light-mode .kol-member-card-name {
    margin: 0 0 2px 0;
    font-size: 16px;
    font-weight: 600;
    color: #0066cc;
    word-break: break-word;
}

html.light-mode .kol-member-card-type {
    margin: 0 0 4px 0;
    font-size: 12px;
    color: #666;
}

html.light-mode .kol-member-card-joined {
    margin: 0;
    font-size: 11px;
    color: #999;
}

html.light-mode .kol-member-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 12px 16px;
    border-bottom: 1px solid #e8e8e8;
}

html.light-mode .kol-member-stat {
    text-align: center;
    padding: 0 4px;
}

html.light-mode .kol-member-stat-label {
    font-size: 10px;
    color: #999;
    margin-bottom: 4px;
    display: block;
}

html.light-mode .kol-member-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

html.light-mode .kol-member-card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
}

html.light-mode .kol-member-card-action-link {
    display: block;
    padding: 10px 8px;
    background: none;
    border: none;
    border-right: 1px solid #e8e8e8;
    color: #0066cc;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

html.light-mode .kol-member-card-action-link:last-child {
    border-right: none;
}

html.light-mode .kol-member-card-action-link:hover {
    background: #f5f5f5;
}

html.light-mode .kol-member-card-loading,
html.light-mode .kol-member-card-error {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

html.light-mode .kol-member-card-error {
    color: #d32f2f;
}

@keyframes kol-card-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* END KOL Avatar Member Card Light Theme */

/* START KOL Avatar Member Card Dark Theme */
html.dark-mode #kol-member-card-container {
    display: none;
    z-index: 999999;
}

html.dark-mode #kol-member-card-container.active {
    display: block;
}

html.dark-mode .kol-member-card-popup {
    background: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid #444;
    max-width: 360px;
    width: 360px;
    padding: 0;
    position: fixed;
    animation: kol-card-fade-in 0.2s ease;
    z-index: 999999;
}

html.dark-mode .kol-member-card-popup::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

html.dark-mode .kol-member-card-popup[data-direction="right"]::before {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-color: transparent #2a2a2a transparent transparent;
    filter: drop-shadow(-2px 0 0 #666);
}

html.dark-mode .kol-member-card-popup[data-direction="left"]::before {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #2a2a2a;
    filter: drop-shadow(2px 0 0 #666);
}

html.dark-mode .kol-member-card-popup[data-direction="bottom"]::before {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent #2a2a2a transparent;
    filter: drop-shadow(0 2px 0 #666);
}

html.dark-mode .kol-member-card-popup[data-direction="top"]::before {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-color: #2a2a2a transparent transparent transparent;
    filter: drop-shadow(0 -2px 0 #666);
}

html.dark-mode .kol-member-card-header {
    display: flex;
    gap: 12px;
    padding: 16px 16px 12px 16px;
    align-items: flex-start;
    border-bottom: 1px solid #444;
    position: relative;
}

html.dark-mode .kol-member-card-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 10;
}

html.dark-mode .kol-member-card-close:hover {
    color: #ccc;
}

html.dark-mode .kol-member-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

html.dark-mode .kol-member-card-info {
    flex: 1;
    min-width: 0;
    padding-right: 24px;
}

html.dark-mode .kol-member-card-name {
    margin: 0 0 2px 0;
    font-size: 16px;
    font-weight: 600;
    color: #4da3ff;
    word-break: break-word;
}

html.dark-mode .kol-member-card-type {
    margin: 0 0 4px 0;
    font-size: 12px;
    color: #999;
}

html.dark-mode .kol-member-card-joined {
    margin: 0;
    font-size: 11px;
    color: #666;
}

html.dark-mode .kol-member-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 12px 16px;
    border-bottom: 1px solid #444;
}

html.dark-mode .kol-member-stat {
    text-align: center;
    padding: 0 4px;
}

html.dark-mode .kol-member-stat-label {
    font-size: 10px;
    color: #666;
    margin-bottom: 4px;
    display: block;
}

html.dark-mode .kol-member-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #e0e0e0;
}

html.dark-mode .kol-member-card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
}

html.dark-mode .kol-member-card-action-link {
    display: block;
    padding: 10px 8px;
    background: none;
    border: none;
    border-right: 1px solid #444;
    color: #4da3ff;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

html.dark-mode .kol-member-card-action-link:last-child {
    border-right: none;
}

html.dark-mode .kol-member-card-action-link:hover {
    background: #333;
}

html.dark-mode .kol-member-card-loading,
html.dark-mode .kol-member-card-error {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

html.dark-mode .kol-member-card-error {
    color: #ff6b6b;
}

@keyframes kol-card-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* END KOL Avatar Member Card Dark Theme */
