* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 95px;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f5f7fb;
    color: #172033;
}

.hidden {
    display: none !important;
}

.app {
    display: block;
    min-height: 100vh;
}


/* SIDEBAR */

.sidebar {
    width: 100%;
    height: 75px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 32px;
    color: #172033;
}

.logo h2 {
    font-size: 22px;
    letter-spacing: 1px;
}

.logo span {
    color: #2563eb;
}

.sidebar nav {
    display: flex;
    gap: 12px;
}

.sidebar nav a {
    text-decoration: none;
    color: #64748b;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 500;
    transition: .2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #eff6ff;
    color: #2563eb;
}

.sidebar-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}


/* MAIN CONTENT */

.main-content {
    width: 100%;
    max-width: 1250px;
    margin: auto;
    padding: 40px 35px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.topbar h1 {
    font-size: 30px;
    margin-bottom: 8px;
}

.topbar p {
    color: #64748b;
    font-size: 14px;
}

.top-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eaf1ff;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #2563eb;
    font-size: 26px;
}


/* SEARCH SECTION */

.search-section {
    background: linear-gradient(120deg, #172554, #1d4ed8);
    padding: 38px;
    border-radius: 18px;
    margin-bottom: 30px;
    color: #fff;
}

.search-section h2 {
    font-size: 25px;
    margin-bottom: 10px;
}

.search-section p {
    color: #dbeafe;
    font-size: 14px;
    margin-bottom: 25px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 9px 12px;
    border-radius: 10px;
    max-width: 750px;
}

.search-box > i {
    color: #64748b;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: #172033;
    font-size: 14px;
    padding: 12px 0;
    min-width: 0;
}

.search-box button {
    background: #2563eb;
    color: #fff;
    border: 0;
    padding: 13px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.search-box button:hover {
    background: #1d4ed8;
}

.search-box button:disabled {
    opacity: .6;
    cursor: wait;
}


/* SEARCH HISTORY */

.history-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 17px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #dbeafe;
}

.history-row > span {
    font-weight: 600;
}

.history-chip {
    border: 1px solid #93c5fd;
    background: #ffffff18;
    color: #fff;
    border-radius: 20px;
    padding: 5px 11px;
    cursor: pointer;
}

.history-chip:hover {
    background: #ffffff35;
}

.clear-history {
    border: 0;
    background: none;
    color: #dbeafe;
    text-decoration: underline;
    cursor: pointer;
    font-size: 12px;
}


/* LOADING SKELETON */

.loading-panel {
    margin: 20px 0 30px;
    text-align: center;
    color: #2563eb;
}

.loading-panel > p {
    margin-top: 15px;
}

.skeleton {
    background: linear-gradient(
        90deg,
        #e8edf5 25%,
        #f5f7fb 50%,
        #e8edf5 75%
    );

    background-size: 200% 100%;
    animation: shimmer 1.3s infinite;
    border-radius: 14px;
    height: 95px;
}

.skeleton-profile {
    height: 150px;
    margin-bottom: 15px;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}


/* ERROR MESSAGE */

.message {
    text-align: center;
    padding: 22px;
    color: #2563eb;
    font-size: 15px;
    margin-bottom: 20px;
}

.error {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
}


/* PROFILE CARD */

.profile-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    box-shadow: 0 3px 12px #00000008;
}

.profile-left {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.profile-left img {
    width: 115px;
    height: 115px;
    border-radius: 18px;
    border: 3px solid #dbeafe;
    object-fit: cover;
}

.profile-details {
    min-width: 0;
}

.profile-left h2 {
    font-size: 25px;
    margin-bottom: 6px;
}

.profile-left #username {
    color: #2563eb;
    margin-bottom: 12px;
    font-size: 14px;
}

.profile-left #bio {
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.profile-meta {
    display: flex;
    gap: 13px 18px;
    flex-wrap: wrap;
    margin-top: 14px;
    color: #64748b;
    font-size: 12px;
}

.profile-meta > span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-meta i {
    color: #2563eb;
}

.profile-meta a {
    color: #2563eb;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.profile-card > a {
    text-decoration: none;
    background: #172033;
    color: #fff;
    padding: 13px 19px;
    border-radius: 9px;
    white-space: nowrap;
    font-size: 13px;
}

.profile-card > a:hover {
    background: #2563eb;
}


/* STATISTICS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 40px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    padding: 24px;
    transition: .2s;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: #93c5fd;
}

.stat-card i {
    font-size: 21px;
    color: #2563eb;
    margin-bottom: 17px;
}

.stat-card p {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 10px;
}

.stat-card h2 {
    font-size: 29px;
}


/* SECTION HEADINGS */

.content-section {
    margin-bottom: 40px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-heading h2 {
    font-size: 22px;
    margin-bottom: 7px;
}

.section-heading p {
    color: #64748b;
    font-size: 13px;
}

.result-count {
    font-size: 12px;
    color: #64748b;
}


/* REPOSITORY FILTERS */

.repo-controls {
    display: grid;
    grid-template-columns: 1fr 190px 190px;
    gap: 12px;
    margin-bottom: 18px;
}

.repo-controls input,
.repo-controls select {
    background: #fff;
    border: 1px solid #dbe1ea;
    border-radius: 9px;
    padding: 12px 14px;
    color: #172033;
    outline: none;
    font: inherit;
    font-size: 13px;
    min-width: 0;
}

.repo-controls input:focus,
.repo-controls select:focus {
    border-color: #60a5fa;
}


/* REPOSITORY CARDS */

.repo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.repo-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    padding: 24px;
    transition: .2s;
    min-width: 0;
}

.repo-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 5px 18px #2563eb12;
    transform: translateY(-3px);
}

.repo-card h3 {
    font-size: 17px;
    margin-bottom: 12px;
    overflow-wrap: anywhere;
}

.repo-card h3 a {
    color: #2563eb;
    text-decoration: none;
}

.repo-card h3 a:hover {
    text-decoration: underline;
}

.repo-card p {
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 20px;
    overflow-wrap: anywhere;
    min-height: 22px;
}

.repo-info {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 12px;
}

.repo-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.repo-info i {
    color: #2563eb;
}

.repo-updated {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    margin-top: 14px;
}

.empty-message,
.muted {
    color: #64748b;
    font-size: 13px;
    padding: 18px 0;
}


/* LANGUAGE ANALYTICS */

.analytics-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 55px;
    min-height: 280px;
}

.donut-chart {
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: #e5e7eb;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.donut-hole {
    width: 125px;
    height: 125px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-hole strong {
    font-size: 28px;
}

.donut-hole span {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

.language-legend {
    display: grid;
    gap: 13px;
    flex: 1;
}

.legend-row {
    display: grid;
    grid-template-columns: 12px minmax(100px, 1fr) auto;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #475569;
}

.legend-row strong {
    font-size: 12px;
    color: #172033;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}


/* WELCOME SCREEN */

.welcome {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.welcome > i {
    font-size: 55px;
    color: #2563eb;
    margin-bottom: 18px;
}

.welcome h2 {
    color: #172033;
    margin-bottom: 10px;
}

.welcome p {
    font-size: 14px;
    line-height: 1.7;
}

.sample-button {
    margin-top: 20px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}


/* RESPONSIVE DESIGN */

@media (max-width: 900px) {

    .sidebar {
        padding: 0 4%;
    }

    .main-content {
        padding: 30px 25px;
    }

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

    .sidebar-bottom {
        display: none;
    }

}


@media (max-width: 650px) {

    .sidebar {
        height: auto;
        min-height: 70px;
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .logo h2 {
        font-size: 19px;
    }

    .logo i {
        font-size: 26px;
    }

    .sidebar nav {
        width: 100%;
        justify-content: space-between;
        gap: 4px;
    }

    .sidebar nav a {
        padding: 9px;
        font-size: 11px;
        gap: 5px;
    }

    .main-content {
        padding: 25px 16px;
    }

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

    .profile-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .repo-controls {
        grid-template-columns: 1fr;
    }

    .analytics-card {
        flex-direction: column;
        gap: 25px;
    }

    .language-legend {
        width: 100%;
    }

}


@media (max-width: 480px) {

    .topbar h1 {
        font-size: 23px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card h2 {
        font-size: 23px;
    }

    .profile-left {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-section {
        padding: 24px 18px;
    }

    .search-section h2 {
        font-size: 21px;
    }

    .search-box {
        flex-wrap: wrap;
    }

    .search-box input {
        width: 70%;
    }

    .search-box button {
        width: 100%;
    }

    .profile-left img {
        width: 95px;
        height: 95px;
    }

}