:root {
    --primary: #0099ff;
    --secondary: #6c63ff;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --text-dark: #2d2d2d;
    --text-light: #f8f9fa;
    --card-bg-dark: #252a41;
    --card-bg-light: #ffffff;
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-light: 0 10px 30px rgba(210, 215, 249, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

body {
    background-color: var(--light);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #e4e8ff 100%);
}

body.dark {
    background-color: var(--dark);
    color: var(--text-light);
    background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(108, 99, 255, 0.2);
    transition: transform 0.3s ease;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 12px 18px rgba(4, 4, 4, 0.1));

}

.logo:hover {
    transform: scale(1.5);
    filter: drop-shadow(0 12px 18px rgba(4, 4, 4, 0.1))
}

/* 
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
} */

.theme-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    background: var(--light);
    padding: 10px 15px;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.theme-switch:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 12px 18px rgba(4, 4, 4, 0.1))
}

body.dark .theme-switch {
    background: var(--card-bg-dark);
}

.theme-text {
    margin-right: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.theme-icon {
    width: 20px;
    height: 20px;
}

.search-container {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

body.dark .search-container {
    box-shadow: var(--shadow-dark);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.2rem;
    z-index: 10;
    font-size: 24px;
}

.search-input {
    flex: 1;
    padding: 18px 18px 18px 50px;
    border: none;
    font-size: 1rem;
    background: var(--card-bg-light);
    color: var(--text-dark);
    outline: none;
}

.search-input:focus{
    box-shadow: var(--shadow-dark);
}

body.dark .search-input {
    background: var(--card-bg-dark);
    color: var(--text-light);
}

.search-btn {
    padding: 0 30px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-btn:hover {
    background: linear-gradient(150deg, var(--secondary), var(--primary));
}

.profile-card {
    background: var(--card-bg-light);
    border-radius: 20px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
}

body.dark .profile-card {
    background: var(--card-bg-dark);
    box-shadow: var(--shadow-dark);
}

.profile-image {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 5px solid var(--light);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

body.dark .avatar {
    border-color: var(--card-bg-dark);
}

.username {
    margin-top: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

body.dark .username {
    color: var(--text-light);
}

.username a {
    color: var(--primary);
    margin-left: 10px;
    text-decoration: none;
}

.joined-date {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #777;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.bio {
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

body.dark .bio {
    color: #aaa;
}

.stats-container {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    justify-content: space-around;
    margin-bottom: 25px;
}

body.dark .stats-container {
    background: linear-gradient(to right, #1e2a3a, #162032);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: #777;
    margin-top: 5px;
}

body.dark .stat-label {
    color: #aaa;
}

.links-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.link-item {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: #555;
}

body.dark .link-item {
    color: #aaa;
}

.link-item  i {
    font-size: 26px;
    margin-right: 10px;
    width: 20px;
    color: var(--primary);
}

.unavailable {
    opacity: 0.5;
}

.badge {
    padding: 5px 10px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .profile-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 25px;
    }
    
    .links-container {
        grid-template-columns: 1fr;
    }
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated {
    animation: fadeInUp 0.6s ease;
}

.loading {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

body.dark .loading {
    border-color: var(--dark);
    border-top-color: var(--primary);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error message */
.error-container {
    background: #ffebee;
    color: #c62828;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    animation: fadeInUp 0.4s ease;
}

.error-icon {
    margin-right: 10px;
    font-size: 1.5rem;
}

/* Recent searches */
.recent-searches {
    margin-top: 40px;
    padding: 20px;
    background: var(--card-bg-light);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
}

body.dark .recent-searches {
    background: var(--card-bg-dark);
    box-shadow: var(--shadow-dark);
}

.recent-title {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--primary);
}

.search-history {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-item {
    padding: 8px 15px;
    background: #e9ecef;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.history-item:hover {
    background: var(--primary);
    color: white;
}

body.dark .history-item {
    background: #1e2a3a;
}

.history-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.profile-name-container {
    display: flex;
    flex-direction: column;
}


.github-username {
    color: #0366d6;
    text-decoration: none;
    font-size: 16px;
    margin-top: 5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.github-username:hover {
    color: #0277d9;
    text-decoration: underline;
}

.github-username:after {
    content: "\ea0a";
    font-family: 'remixicon';
    font-size: 14px;
    margin-left: 5px;
    opacity: 0.7;
}

.stat-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

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

.dark .stat-link:hover .stat-value {
    color: #58a6ff;
}

.stat-link:hover .stat-value {
    color: #0366d6;
}

/* Clickable links styling */
.link-item.clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.link-item.clickable:hover {
    color: #0366d6;
}

.dark .link-item.clickable:hover {
    color: #58a6ff;
}

.link-item.clickable:hover i {
    transform: scale(1.1);
}

.link-item i {
    transition: transform 0.2s ease;
}


.action-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.github-profile-btn {
    background-color: #24292e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.github-profile-btn:hover {
    background-color: #2c313a;
}

.github-profile-btn i {
    font-size: 18px;
}

.dark .github-profile-btn {
    background-color: #0d1117;
    border: 1px solid #30363d;
}

.dark .github-profile-btn:hover {
    background-color: #161b22;
}


@media (max-width: 576px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-name-container {
        align-items: center;
    }
}