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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
        "Open Sans", "Helvetica Neue", sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #f1f5f9;
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header p {
    font-size: 1rem;
    color: #94a3b8;
}

.card {
    width: 100%;
    max-width: 700px;
    min-width: 300px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.search-wrapper {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-wrapper input {
    flex: 1;
    min-width: 0;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
}

.search-wrapper button {
    padding: 0.9rem 1.5rem;
    flex-shrink: 0;
    border-radius: 12px;
    border: none;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.search-wrapper button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.status {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.status.loading {
    background: rgba(251, 191, 36, 0.15);
    color: #facc15;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.status.error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

#profile {
    margin-top: 2rem;
    animation: fadeIn 0.3s ease forwards;
}

.profile-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.profile-info h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.profile-stats {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    backdrop-filter: blur(8px);
}

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

.stat-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.profile-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.profile-link {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    padding: 10px 16px;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid #58a6ff;
    border-radius: 8px;
    color: #58a6ff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.profile-link:hover {
    background: #58a6ff;
    color: white;
    transform: translateY(-1px);
}

.link-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

#repos {
    margin-top: 1.2rem;
    animation: fadeIn 0.3s ease forwards;
}

#repoList {
    list-style: none;
    margin-top: 1rem;
}

.repo-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;

    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.6rem;

    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;

    backdrop-filter: blur(8px);

    text-decoration: none;
    color: inherit;
}

.repo-card span:first-child {
    color: #58a6ff;
    font-weight: 500;
}

.repo-card span:last-child {
    color: rgba(255, 255, 255, 0.6);
}

.repo-card:hover {
    border: 1px solid #58a6ff;
    transform: translateY(-1px);
}

.card,
.stat,
.repo-card,
.profile-link,
button {
    transition: all 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@media (max-width: 500px) {
    body {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 400px) {
    .search-wrapper {
        flex-direction: column;
    }

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