/* Coding Activity & Developer Dashboard Styles */
.coding-activity-section {
    padding: 1rem 0 3rem;
    position: relative;
}

.coding-activity-wrapper {
    width: 100%;
}

.coding-header {
    margin-bottom: 3.5rem;
    text-align: left;
}

.coding-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #ede9fe;
    border: 1px solid #ddd6fe;
    color: #6d28d9;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    /* Emerald green */
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    animation: pulse-dot 1.8s infinite ease-in-out;
}

@keyframes pulse-dot {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.coding-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.coding-title span {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.coding-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.6;
    margin: 0;
}

/* Dashboard Sections */
.coding-subsection-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.coding-subsection-title i {
    color: var(--accent-purple-light);
    font-size: 1.3rem;
}

/* Coding Row Grid Layout (Stats + Heatmap side by side) */
.coding-row-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
    align-items: stretch;
}

/* Stats Cards Grid (2-column layout for profiles) */
.stats-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 1024px) {
    .stats-grid-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}


/* Profiles Grid (4 Columns) */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Glassmorphic Profile Card */
.coding-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.coding-card:hover {
    border-color: rgba(124, 58, 237, 0.35);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}

.card-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-brand i {
    font-size: 1.8rem;
}

.card-brand img.brand-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.leetcode-color {
    color: #ffa116;
}

.github-color {
    color: var(--text-primary);
}

.ninja-color {
    color: #f27c22;
}

.tuf-color {
    color: #ec4899;
}

.card-brand h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.card-brand span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.profile-username {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.profile-username:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* LeetCode Live Details Layout */
.leetcode-stats-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex-grow: 1;
}

.leetcode-top-row {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    justify-content: center;
}

.leetcode-progress-circle-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.leetcode-progress-circle {
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.circle-progress {
    fill: none;
    stroke: #ffa116;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 251.2;
    /* 2 * PI * r (r=40) */
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.circle-content {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.circle-number {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.circle-total {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.leetcode-bars-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.stat-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
}

.difficulty-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dot-easy {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00b8a3;
}

.dot-medium {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffc01e;
}

.dot-hard {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4743;
}

.difficulty-easy {
    color: #00b8a3;
}

.difficulty-medium {
    color: #ffc01e;
}

.difficulty-hard {
    color: #ef4743;
}

.bar-numbers {
    color: var(--text-secondary);
}

.bar-numbers span {
    color: var(--text-primary);
    font-weight: 700;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-easy {
    background: #00b8a3;
}

.fill-medium {
    background: #ffc01e;
}

.fill-hard {
    background: #ef4743;
}

/* Code360 Color Rules */
.circle-progress-ninja {
    stroke: #f27c22;
}

.dot-ninja-coding {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f27c22;
}

.dot-ninja-mcq {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
}

.dot-ninja-contest {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

.color-ninja-coding {
    color: #f27c22;
}

.color-ninja-mcq {
    color: #3b82f6;
}

.color-ninja-contest {
    color: #10b981;
}

.fill-ninja-coding {
    background: #f27c22;
}

.fill-ninja-mcq {
    background: #3b82f6;
}

.fill-ninja-contest {
    background: #10b981;
}

/* TUF Color Rules */
.circle-progress-tuf {
    stroke: #ec4899;
}

.dot-tuf-a2z {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ec4899;
}

.dot-tuf-sde {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a855f7;
}

.dot-tuf-cp {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
}

.color-tuf-a2z {
    color: #ec4899;
}

.color-tuf-sde {
    color: #a855f7;
}

.color-tuf-cp {
    color: #f59e0b;
}

.fill-tuf-a2z {
    background: #ec4899;
}

.fill-tuf-sde {
    background: #a855f7;
}

.fill-tuf-cp {
    background: #f59e0b;
}


/* LeetCode Footer Stats */
.leetcode-footer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.85rem;
    margin-top: 1rem;
}

.footer-stat-box {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.footer-stat-box span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.footer-stat-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Static Cards Detail Layout (Code360 & TUF) */
.card-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.card-stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.card-stat-name {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-stat-name i {
    font-size: 0.85rem;
    width: 14px;
    text-align: center;
}

.card-stat-value {
    font-weight: 700;
    color: var(--text-primary);
}

.card-stat-value.highlight-orange {
    color: #f27c22;
}

.card-stat-value.highlight-blue {
    color: #3b82f6;
}

/* GitHub Cards Layout */
.github-svg-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 120px;
    border-radius: 12px;
}

.github-svg-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
}

/* Heatmaps Grid (3 Columns) */
.heatmaps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ============================================
   HEATMAP CARD — Unified Tabbed Viewer Card
   ============================================ */
.heatmap-viewer-card {
    padding: 0 !important;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.heatmap-viewer-card:hover {
    border-color: rgba(124, 58, 237, 0.35);
    box-shadow: var(--shadow-card-hover);
}

/* Gradient accent bar on top on card hover (matches project cards) */


/* Header Area with Navigation Tabs */
.heatmap-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
    flex-wrap: wrap;
    gap: 1.25rem;
}

.heatmap-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.heatmap-header-info .viewer-icon {
    font-size: 1.3rem;
    color: var(--accent-purple);
    background: rgba(124, 58, 237, 0.08);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.heatmap-header-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.heatmap-header-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.15rem;
}

/* Navigation Tabs Container */
.heatmap-viewer-tabs {
    display: flex;
    gap: 0.35rem;
    background: var(--bg-secondary);
    padding: 0.35rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.heatmap-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.heatmap-tab i {
    font-size: 0.95rem;
}

.heatmap-tab img.tab-brand-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.heatmap-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.heatmap-tab.active {
    color: #fff;
    background: var(--accent-purple);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Panels */
.heatmap-panels-container {
    position: relative;
    flex-grow: 1;
}

.heatmap-panel {
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.heatmap-panel.active {
    display: flex;
    opacity: 1;
}

/* Image wrappers inside panels */
.heatmap-image-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    background: #0d1117;
    display: flex;
    align-items: center;
    padding: 2rem 1.5rem;
}

/* Custom thin scrollbar for heatmap image */
.heatmap-image-wrapper::-webkit-scrollbar {
    height: 5px;
}

.heatmap-image-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.heatmap-image-wrapper::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.4);
    border-radius: 10px;
}

.heatmap-image-wrapper img {
    min-width: 750px;
    height: auto;
    max-height: 170px;
    object-fit: contain;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    margin: 0 auto;
}


/* Stats overlay at the bottom of panel */
.heatmap-panel-overlay {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid var(--border-subtle);
    gap: 1.5rem;
    flex-wrap: wrap;
}

.overlay-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.overlay-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.overlay-stat i {
    font-size: 1rem;
    color: var(--accent-purple-light);
    background: rgba(124, 58, 237, 0.08);
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-stat .stat-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
    line-height: 1.2;
}

.overlay-stat .stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.overlay-controls {
    display: flex;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .profiles-grid {
        grid-template-columns: 1fr;
    }

    .heatmaps-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Interactive LeetCode Heatmap Dropdown Styles */
.heatmap-dropdown-container {
    display: flex;
    align-items: center;
}

.heatmap-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.35rem 2rem 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease-in-out;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 14px;
}

.heatmap-select:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(124, 58, 237, 0.35);
}

.heatmap-select:focus {
    border-color: var(--accent-purple-light);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.heatmap-select option {
    background: #0f172a;
    color: var(--text-primary);
    padding: 10px;
    font-weight: 600;
}

/* Invert black GitHub favicon to white on dark theme */
.github-icon {
    filter: invert(1) brightness(2);
}

/* Green circular meter styling for GitHub Profile Card */
.circle-progress-github {
    stroke: #2ea44f !important;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 70;
}

/* pulsating fire icon for streaks with real fire emoji gradient colors */
.streak-fire {
    background: linear-gradient(180deg, #ff4500 0%, #ff8c00 50%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 0.25rem;
    filter: drop-shadow(0 0 2px rgba(255, 69, 0, 0.6));
    animation: firePulse 1.2s ease-in-out infinite alternate;
    display: inline-block;
}

@keyframes firePulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 1px rgba(255, 69, 0, 0.4));
    }
    100% {
        transform: scale(1.15) rotate(2deg);
        filter: drop-shadow(0 0 4px rgba(255, 69, 0, 0.8));
    }
}

/* Disable focus outline rings and tap highlights on click/tap */
.heatmap-image-wrapper,
.heatmap-tab {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}
