/* Kina GitHub Integration - 深色半透明风格 v1.0.1 */

/* ==================== 资料卡片 ==================== */
.kina-github-profile {
    position: relative;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(48, 54, 61, 0.6);
    border-radius: 16px;
    overflow: hidden;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    color: #c9d1d9;
    line-height: 1.5;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kina-github-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.kina-profile-bg {
    position: relative;
    height: 100px;
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    overflow: hidden;
}

.kina-profile-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(88, 166, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(35, 197, 94, 0.06) 0%, transparent 50%);
}

.kina-profile-bg-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(13, 17, 23, 0.85));
}

.kina-profile-content {
    position: relative;
    display: flex;
    padding: 0 20px 16px;
    margin-top: -40px;
}

.kina-profile-avatar-section {
    flex-shrink: 0;
    margin-right: 16px;
}

.kina-avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.kina-avatar-main {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(48, 54, 61, 0.8);
    background: #161b22;
    transition: border-color 0.2s ease;
}

.kina-github-profile:hover .kina-avatar-main {
    border-color: #58a6ff;
}

.kina-avatar-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kina-status-glow {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(13, 17, 23, 0.85);
    background: #3fb950;
    animation: kina-github-pulse 2s ease-in-out infinite;
}

@keyframes kina-github-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.kina-profile-info-section {
    flex: 1;
    min-width: 0;
    padding-top: 44px;
}

.kina-profile-name {
    font-size: 20px;
    font-weight: 600;
    color: #f0f6fc;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.kina-profile-login {
    font-size: 14px;
    color: #8b949e;
    margin-bottom: 8px;
}

.kina-profile-bio {
    font-size: 14px;
    color: #c9d1d9;
    margin: 0 0 10px 0;
    line-height: 1.5;
    word-break: break-word;
}

.kina-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #8b949e;
}

.kina-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.kina-profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 16px 20px;
    border-top: 1px solid rgba(48, 54, 61, 0.4);
    border-bottom: 1px solid rgba(48, 54, 61, 0.4);
}

.kina-stat-item {
    text-align: center;
}

.kina-stat-num {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #f0f6fc;
    line-height: 1.2;
}

.kina-stat-label {
    font-size: 12px;
    color: #8b949e;
    margin-top: 2px;
    display: block;
}

.kina-stat-divider {
    width: 1px;
    background: rgba(48, 54, 61, 0.4);
}

.kina-profile-footer {
    padding: 16px 20px;
}

.kina-github-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(35, 114, 71, 0.2);
    border: 1px solid rgba(35, 114, 71, 0.4);
    color: #3fb950;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.kina-github-btn:hover {
    background: rgba(35, 114, 71, 0.3);
    border-color: rgba(35, 114, 71, 0.6);
    color: #56d364;
}

.kina-github-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==================== 仓库网格 - B站风格 ==================== */
.kina-github-repos-full {
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(48, 54, 61, 0.6);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    color: #c9d1d9;
    line-height: 1.5;
}

.kina-repos-header-full {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
}

.kina-repos-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kina-repos-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 166, 255, 0.1);
    border-radius: 10px;
}

.kina-repos-titles h2 {
    font-size: 16px;
    font-weight: 600;
    color: #f0f6fc;
    margin: 0;
    line-height: 1.2;
}

.kina-repos-subtitle {
    font-size: 12px;
    color: #8b949e;
}

.kina-repos-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 横排网格 - 类似B站追番 */
.kina-repos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 24px 24px;
}

.kina-repo-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    overflow: hidden;
}

.kina-repo-card:hover {
    transform: translateY(-4px);
}

/* 封面区域 - 类似B站番剧封面 */
.kina-repo-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #1a2332 0%, #0d1117 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(48, 54, 61, 0.4);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kina-repo-card:hover .kina-repo-cover {
    border-color: rgba(88, 166, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.kina-repo-cover-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
}

.kina-repo-cover-icon {
    width: 36px;
    height: 36px;
    color: #58a6ff;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.kina-repo-card:hover .kina-repo-cover-icon {
    opacity: 1;
    transform: scale(1.1);
}

.kina-repo-cover-name {
    font-size: 13px;
    font-weight: 600;
    color: #f0f6fc;
    text-align: center;
    word-break: break-all;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kina-repo-cover-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(139, 148, 158, 0.2);
    color: #c9d1d9;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(139, 148, 158, 0.2);
}

.kina-repo-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 17, 23, 0.7);
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(2px);
}

.kina-repo-card:hover .kina-repo-cover-overlay {
    opacity: 1;
}

.kina-repo-cover-view {
    font-size: 13px;
    font-weight: 500;
    color: #58a6ff;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(88, 166, 255, 0.15);
    border: 1px solid rgba(88, 166, 255, 0.3);
}

/* 信息区域 - 类似B站番剧标题区 */
.kina-repo-info {
    padding: 12px 4px 4px;
}

.kina-repo-title {
    font-size: 14px;
    font-weight: 600;
    color: #f0f6fc;
    margin: 0 0 6px 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kina-repo-desc {
    font-size: 12px;
    color: #8b949e;
    margin: 0 0 10px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.kina-repo-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #6e7681;
}

.kina-repo-lang {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.kina-lang-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 4px currentColor;
}

.kina-repo-stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.kina-repo-stat svg {
    color: #6e7681;
}

.kina-repo-time {
    margin-left: auto;
    font-size: 11px;
    color: #484f58;
}

/* ==================== 迷你状态栏 ==================== */
.kina-github-mini-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(48, 54, 61, 0.6);
    border-radius: 24px;
    padding: 6px 16px 6px 6px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    max-width: 280px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
}

.kina-github-mini-status:hover {
    background: rgba(22, 27, 34, 0.9);
    border-color: rgba(88, 166, 255, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.kina-mini-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.kina-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(48, 54, 61, 0.6);
}

.kina-github-mini-status:hover .kina-mini-avatar {
    border-color: #58a6ff;
}

.kina-mini-glow {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(13, 17, 23, 0.85);
    background: #3fb950;
    animation: kina-github-pulse 2s ease-in-out infinite;
}

.kina-mini-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kina-mini-name {
    font-size: 13px;
    font-weight: 600;
    color: #f0f6fc;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kina-mini-state {
    font-size: 11px;
    color: #8b949e;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.kina-mini-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.kina-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.kina-mini-divider {
    color: #484f58;
}

/* ==================== 错误提示 ==================== */
.kina-github-error {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: #f85149;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    max-width: 400px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 900px) {
    .kina-repos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .kina-repos-grid {
        grid-template-columns: 1fr;
        padding: 0 16px 16px;
    }

    .kina-repos-header-full {
        padding: 16px 16px 12px;
    }

    .kina-repo-cover {
        aspect-ratio: 16 / 9;
    }

    .kina-profile-content {
        padding: 0 16px 12px;
    }

    .kina-avatar-container {
        width: 60px;
        height: 60px;
    }

    .kina-profile-name {
        font-size: 18px;
    }

    .kina-profile-stats {
        padding: 12px 16px;
    }
}
