:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --dark: #0f172a;
    --dark-card: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --verified: #1DA1F2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--light);
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Profile Header */
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--dark-card);
    border-radius: 16px;
    position: relative;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary);
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: rotate(0deg);
}

.avatar:hover {
    transform: scale(1.2);
    transition: transform 0.01s ease;
    cursor: -webkit-zoom-in;
}

.profile-info {
    flex-grow: 1;
}

.profile-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light);
}

.verified-badge {
    width: 30px;
    height: 30px;
    position: relative;
    margin-top: 7px;
    margin-left: 3px;
}

.verified-badge:hover {
    transform: rotate(360deg);
    transition: transform 0.5s ease;
    cursor: none;
}

.verified-badge img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 3px rgba(29, 161, 242, 0.5));
}

.profile-username {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-bio {
    color: var(--light);
    margin-bottom: 10px;
    font-size: 0.95rem;
    max-width: 600px;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    font-size: 0.85rem;
}

/* Follow Button */
.follow-btn-container {
    position: absolute;
    top: 25px;
    right: 25px;
}

.follow-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.follow-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.follow-btn.following {
    background: var(--success);
}

.follow-btn.following:hover {
    background: #0da271;
}

.follow-btn i {
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--dark-card);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
    cursor: pointer;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--light);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray);
}

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-top: 8px;
}

.streak-image {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.streak-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--dark-card);
    border: none;
    border-radius: 10px;
    color: var(--gray);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tab.active {
    background: var(--primary);
    color: white;
}

.tab i {
    font-size: 0.9rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Repositories Grid */
.repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.repo-card {
    background: var(--dark-card);
    border-radius: 16px;
    padding: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.repo-card {
    position: relative;
    border-radius: 16px;
    background: var(--dark-card);
    /* your card bg */
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* BORDER ONLY */
.repo-card::before {
    content: '';
    position: absolute;
    inset: 0;

    padding: 1.5px;
    /* border thickness */
    border-radius: inherit;

    background: linear-gradient(90deg,
            transparent,
            rgb(0, 89, 255),
            transparent);

    background-size: 300% 100%;
    animation: borderShine 3.5s linear infinite;

    /* Mask to show ONLY border */
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Hover trigger */
.repo-card:hover::before {
    opacity: 1;
}

/* Clean hover motion */
.repo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* Neon border run */
@keyframes borderShine {
    0% {
        background-position: -200% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}


.repo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}

.repo-name-container {
    flex-grow: 1;
    min-width: 0;
}

.repo-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--light);
    text-decoration: none;
    display: block;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
    margin-bottom: 5px;
}

.repo-name:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.repo-visibility {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray);
    flex-shrink: 0;
    white-space: nowrap;
}

.repo-desc {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.repo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.repo-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 8px;
}

.repo-meta-item i {
    color: var(--primary-light);
    font-size: 0.9rem;
}

.repo-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.repo-topic {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-light);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.repo-topic:hover {
    background: rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

.repo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.repo-language {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.language-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.repo-stats {
    display: flex;
    gap: 15px;
}

.repo-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.2s;
}

.repo-stat:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.repo-stat i {
    font-size: 0.9rem;
}

/* Filter and Search */
.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 20px;
    color: var(--gray);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
}

.search-box {
    position: relative;
}

.search-input {
    padding: 8px 15px 8px 35px;
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--light);
    font-size: 0.9rem;
    width: 250px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.analytics-card {
    background: var(--dark-card);
    border-radius: 12px;
    padding: 20px;
}

.analytics-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--light);
}

.analytics-title i {
    color: var(--primary-light);
}

.language-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-bar {
    flex-grow: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.language-fill {
    height: 100%;
    border-radius: 4px;
}

/* Simple Load More Button */
.load-more-container {
    text-align: center;
    margin: 30px 0;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.load-more-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.load-more-btn i {
    font-size: 1rem;
}

.load-more-btn .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.load-more-btn.hidden {
    display: none;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    color: var(--gray);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 30px;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.footer-icon {
    color: var(--gray);
    font-size: 1rem;
    transition: color 0.2s;
}

.footer-icon:hover {
    color: var(--primary-light);
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px 0;
    color: var(--gray);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--dark-card);
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--light);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.modal-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.modal-btn.outline {
    background: transparent;
    border: 1px solid var(--gray);
    color: var(--gray);
}

.modal-btn.outline:hover {
    border-color: var(--light);
    color: var(--light);
}

.followers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.follower-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background 0.2s;
}

.follower-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.follower-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

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

.follower-info {
    flex-grow: 1;
}

.follower-name {
    font-weight: 500;
    color: var(--light);
    font-size: 0.95rem;
}

.follower-username {
    color: var(--gray);
    font-size: 0.8rem;
}

.follower-btn {
    padding: 5px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: solid;
}

.follower-btn:hover {
    background: var(--primary-light);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Repository Modal Styles */
.repo-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.repo-main-info {
    flex: 1;
}

.repo-name-large {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 5px;
}

.repo-description {
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.repo-visibility-large {
    font-size: 0.8rem;
    padding: 5px 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray);
    display: inline-block;
}

.repo-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.repo-detail-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    transition: transform 0.2s;
}

.repo-detail-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
}

.repo-detail-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.repo-detail-value {
    font-weight: 700;
    color: var(--light);
    font-size: 1.2rem;
}

.repo-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.repo-stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.repo-stat-value {
    font-weight: 700;
    color: var(--light);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.repo-stat-label {
    font-size: 0.85rem;
    color: var(--gray);
}

.modal-topics {
    margin: 25px 0;
}

.modal-topic {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin: 5px;
    transition: all 0.2s;
}

.modal-topic:hover {
    background: rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

.language-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.language-bar-large {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.language-fill-large {
    height: 100%;
    border-radius: 5px;
}

.language-percentage {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--light);
}

/* Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .profile-name-container {
        justify-content: center;
    }

    .follow-btn-container {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 15px;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .profile-meta {
        justify-content: center;
    }

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

    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-input {
        width: 100%;
    }

    .modal-content {
        max-height: 90vh;
    }

    .repo-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Error State */
.error-state {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.error-state i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--warning);
}

.retry-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: 600;
    margin: 0 auto;
}