
/* =================================
   1. GLOBAL RESET & VARIABLES
================================= */

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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;

    --background: #f8faff;
    --surface: #ffffff;

    --text: #172033;
    --muted: #718096;

    --border: #e5e9f2;

    --shadow:
        0 12px 40px rgba(31, 41, 55, 0.06);
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: var(--muted);
    cursor: pointer;
}

a:hover {
    color: royalblue;
}

body {
    min-height: 100vh;
    width: 100%;

    font-family: 'Inter', sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 10% 10%,
            #e0e7ff 0,
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 80%,
            #ede9fe 0,
            transparent 30%
        ),
        var(--background);

    padding: 0 20px;

    overflow-x: hidden;
}


/* =================================
   2. HEADER
================================= */

.header {
    max-width: 1100px;
    width: 100%;

    margin: auto;
    padding: 25px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

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

    color: var(--text);
    text-decoration: none;

    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.logo-icon {
    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    background: linear-gradient(
        135deg,
        var(--primary),
        var(--secondary)
    );

    color: white;
    border-radius: 10px;

    font-size: 1.2rem;
}

.logo-highlight {
    color: var(--primary);
}

.header-badge {
    padding: 8px 13px;

    border: 1px solid #e0e7ff;
    border-radius: 30px;

    background: #eef2ff;
    color: #4f46e5;

    font-size: 0.75rem;
    font-weight: 700;
}


/* =================================
   3. MAIN CONTAINER
================================= */

main {
    max-width: 850px;
    width: 100%;

    margin: auto;
}


/* =================================
   4. HERO SECTION
================================= */

.hero {
    text-align: center;

    padding: 75px 10px 45px;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 20px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 9px 15px;

    border-radius: 30px;

    background: #eef2ff;
    color: #4f46e5;

    font-size: 0.72rem;
    font-weight: 800;

    letter-spacing: 0.7px;
}

.hero-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;
    background: #6366f1;
}

.hero h1 {
    max-width: 750px;

    font-size: clamp(2.4rem, 6vw, 4rem);

    line-height: 1.15;
    letter-spacing: -2.5px;

    font-weight: 800;
}

.hero h1 span {
    background: linear-gradient(
        110deg,
        #4f46e5,
        #8b5cf6
    );

    background-clip: text;
    -webkit-background-clip: text;

    color: transparent;
}

.hero-description {
    max-width: 580px;

    color: var(--muted);

    font-size: 1rem;
    line-height: 1.8;
}


/* =================================
   5. SEARCH SECTION
================================= */

.search-section {
    width: 100%;

    padding: 32px;

    background: rgba(255, 255, 255, 0.9);

    border: 1px solid white;
    border-radius: 22px;

    box-shadow: var(--shadow);

    display: flex;
    flex-direction: column;
    gap: 25px;

    transition: box-shadow 0.3s ease;
}

.search-section:hover {
    box-shadow: 0 18px 50px rgba(31, 41, 55, 0.09);
}

.search-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-heading h2 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.6px;
}

.search-heading p {
    margin-top: 8px;

    color: var(--muted);

    font-size: 0.87rem;
    line-height: 1.6;
}

.search-icon {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background: #eef2ff;
    color: var(--primary);

    font-size: 2rem;
}


/* =================================
   6. SEARCH CONTROLS
================================= */

.search-controls {
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

.form-group {
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    color: #475569;

    font-size: 0.85rem;
    font-weight: 700;
}

select {
    width: 100%;

    padding: 14px 16px;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: #f9faff;

    color: var(--text);

    font-family: inherit;
    font-size: 0.9rem;

    outline: none;
    cursor: pointer;

    transition:
        border 0.25s ease,
        box-shadow 0.25s ease;
}

select:hover {
    border-color: #a5b4fc;
}

select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.12);
}


/* =================================
   7. SEARCH BUTTON
================================= */

#searchBtn {
    min-width: 175px;

    padding: 14px 20px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;

    border: none;
    border-radius: 11px;

    background: linear-gradient(
        110deg,
        var(--primary),
        var(--secondary)
    );

    color: white;

    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 7px 18px rgba(99, 102, 241, 0.25);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

#searchBtn:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 25px rgba(99, 102, 241, 0.35);
}

#searchBtn:active {
    transform: scale(0.98);
}

#searchBtn:focus-visible {
    outline: 3px solid #a5b4fc;
    outline-offset: 4px;
}

.button-arrow {
    font-size: 1.2rem;
}

.search-note {
    color: #94a3b8;
    font-size: 0.75rem;
}


/* =================================
   8. RESULTS SECTION
================================= */

.results-section {
    margin-top: 60px;
    margin-bottom: 70px;
}

.results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 25px;
}

.results-heading h2 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.6px;
}

.results-heading p {
    margin-top: 8px;

    color: var(--muted);

    font-size: 0.85rem;
    line-height: 1.6;
}

.results-count {
    padding: 8px 13px;

    background: #eef2ff;
    color: #4f46e5;

    border-radius: 30px;

    font-size: 0.78rem;
    font-weight: 750;

    white-space: nowrap;
}


/* =================================
   9. RESULTS CONTAINER
================================= */

#results {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 18px;
}


/* =================================
   10. EMPTY STATE
================================= */

.empty-state {
    width: 100%;

    padding: 55px 25px;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    gap: 15px;

    background: rgba(255, 255, 255, 0.8);

    border: 1px dashed #cbd5e1;
    border-radius: 18px;
}

.empty-icon {
    width: 65px;
    height: 65px;

    display: grid;
    place-items: center;

    border-radius: 18px;

    background: #eef2ff;
    color: var(--primary);

    font-size: 2.7rem;
}

.empty-state h3 {
    color: var(--text);

    font-size: 1.15rem;
    font-weight: 800;
}

.empty-state p {
    max-width: 430px;

    color: var(--muted);

    font-size: 0.87rem;
    line-height: 1.8;
}


/* =================================
   11. ISSUE CARD
================================= */

.issue-card {
    width: 100%;

    padding: 25px;

    background: white;

    border: 1px solid var(--border);
    border-radius: 18px;

    display: flex;
    flex-direction: column;
    gap: 19px;

    box-shadow:
        0 5px 20px rgba(31, 41, 55, 0.04);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.issue-card:hover {
    transform: translateY(-4px);

    border-color: #c7d2fe;

    box-shadow:
        0 15px 35px rgba(79, 70, 229, 0.09);
}


/* =================================
   12. ISSUE TOP
================================= */

.issue-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.issue-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 6px 11px;

    background: #ecfdf3;
    color: #16834b;

    border-radius: 30px;

    font-size: 0.76rem;
    font-weight: 700;
}

.status-dot {
    width: 7px;
    height: 7px;

    background: #22c55e;
    border-radius: 50%;
}

.issue-number {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 650;
}

.issue-updated {
    margin-left: auto;

    color: #94a3b8;
    font-size: 0.76rem;
}


/* =================================
   13. ISSUE CONTENT
================================= */

.issue-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.issue-title {
    color: #172033;

    font-size: 1.17rem;
    font-weight: 750;

    line-height: 1.5;
    letter-spacing: -0.4px;

    overflow-wrap: anywhere;

    transition: color 0.2s ease;
}

.issue-card:hover .issue-title {
    color: var(--primary-dark);
}

.issue-description {
    color: #718096;

    font-size: 0.88rem;
    line-height: 1.8;

    overflow-wrap: anywhere;

    display: -webkit-box;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* =================================
   14. ISSUE LABELS
================================= */

.issue-labels {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.label {
    padding: 6px 11px;

    border-radius: 7px;

    font-size: 0.75rem;
    font-weight: 650;
}

.beginner {
    background: #ede9fe;
    color: #6d28d9;
}

.bug {
    background: #fee2e2;
    color: #dc2626;
}

.language {
    background: #e0f2fe;
    color: #0369a1;
}


/* =================================
   15. ISSUE FOOTER
================================= */

.issue-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    flex-wrap: wrap;
    gap: 15px;

    padding-top: 18px;

    border-top: 1px solid #edf0f5;
}

.issue-author {
    display: flex;
    align-items: center;
    gap: 11px;
}

.issue-author img {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    border: 2px solid #eef0ff;

    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-name {
    color: #273449;

    font-size: 0.83rem;
    font-weight: 700;
}

.comment-count {
    color: #94a3b8;
    font-size: 0.74rem;
}


/* =================================
   16. GITHUB BUTTON
================================= */

.github-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 10px 17px;

    border-radius: 9px;

    background: #172033;
    color: white;

    text-decoration: none;

    font-size: 0.82rem;
    font-weight: 700;

    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.github-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}


/* =================================
   17. FOOTER
================================= */

.footer {
    max-width: 1100px;
    width: 100%;

    margin: auto;

    padding: 25px 0;

    border-top: 1px solid rgba(226, 232, 240, 0.8);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    color: #94a3b8;
    font-size: 0.78rem;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.footer a:hover {
    text-decoration: underline;
}


/* =================================
   18. RESPONSIVE DESIGN
================================= */

@media (max-width: 650px) {

    body {
        padding: 0 15px;
    }

    .header {
        padding: 20px 0;
    }

    .header-badge {
        font-size: 0.65rem;
        padding: 7px 10px;
    }

    .hero {
        padding: 60px 5px 35px;
        gap: 18px;
    }

    .hero h1 {
        letter-spacing: -1.5px;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .search-section {
        padding: 25px 20px;
        border-radius: 17px;
    }

    .search-controls {
        flex-direction: column;
        align-items: stretch;
    }

    #searchBtn {
        width: 100%;
    }

    .results-section {
        margin-top: 45px;
    }

    .results-heading {
        align-items: flex-start;
    }

    .results-heading h2 {
        font-size: 1.15rem;
    }

    .results-heading p {
        font-size: 0.78rem;
    }

    .issue-card {
        padding: 20px;
        gap: 16px;
    }

    .issue-updated {
        width: 100%;
        margin-left: 0;
    }

    .issue-title {
        font-size: 1.05rem;
    }

    .issue-description {
        font-size: 0.83rem;
    }

    .issue-footer {
        align-items: flex-start;
    }

    .github-link {
        width: 100%;
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }
}


/* =================================
   19. REDUCED MOTION
================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
