/* GitHub Widget Styles */
#github-widget {
    font-family: 'Titillium Web', Arial, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.github-header {
    background: linear-gradient(135deg, #24292e 0%, #040506 100%);
    color: white;
    padding: 15px;
    text-align: center;
    position: relative;
}

.github-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.github-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.github-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Loading State */
.github-loading {
    text-align: center;
    padding: 30px 20px;
    color: #586069;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #24292e;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Main Content */
.github-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.github-main-section {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.github-profile {
    flex: 1;
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e4e8;
}

.github-stats-section {
    flex: 0 0 250px;
}

.github-avatar {
    margin-right: 15px;
}

.github-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #e1e4e8;
}

.github-info {
    flex: 1;
}

.github-info h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #24292e;
}

.github-login {
    margin: 0 0 8px 0;
    color: #586069;
    font-size: 14px;
}

.github-bio {
    margin: 0 0 8px 0;
    color: #24292e;
    font-size: 14px;
    line-height: 1.4;
}

.github-location {
    color: #586069;
    font-size: 12px;
}

.github-location:before {
    content: '📍 ';
}

/* Statistics */
.github-stats {
    display: flex;
    justify-content: space-around;
    padding: 25px 30px;
    background: #f6f8fa;
    border-radius: 8px;
    margin-top: 0;
    gap: 20px;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 80px;
    padding: 0 10px;
}

.stat-number {
    display: block;
    font-size: 22px;
    font-weight: 600;
    color: #24292e;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 12px;
    color: #586069;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}

/* Repositories */
.github-repos {
    margin-top: 25px;
}

.github-repos h5 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #24292e;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 10px;
}

.github-repos-list {
    max-height: 200px;
    overflow-y: auto;
}

.repo-item {
    padding: 12px 0;
    border-bottom: 1px solid #f6f8fa;
    transition: background-color 0.2s;
}

.repo-item:hover {
    background-color: #f6f8fa;
}

.repo-item:last-child {
    border-bottom: none;
}

.repo-name {
    font-weight: 600;
    color: #0366d6;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
    word-break: break-word;
}

.repo-name:hover {
    text-decoration: underline;
}

.repo-description {
    margin: 0;
    font-size: 12px;
    color: #586069;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.repo-stats {
    margin-top: 8px;
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #586069;
}

.repo-language {
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.repo-stars, .repo-forks {
    display: flex;
    align-items: center;
    gap: 3px;
}

.repo-stars:before {
    content: '⭐';
}

.repo-forks:before {
    content: '🍴';
}

/* Footer */
.github-footer {
    padding: 20px 25px;
    background: #f6f8fa;
    text-align: right;
    border-top: 1px solid #e1e4e8;
    margin-top: auto;
}

.github-button {
    display: inline-block;
    padding: 8px 16px;
    background: #24292e;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.github-button:hover {
    background: #0366d6;
}

/* Error State */
.github-error {
    text-align: center;
    padding: 30px 20px;
    color: #d73a49;
    background: #ffeef0;
    border: 1px solid #f8d7da;
    border-radius: 6px;
    margin: 20px;
}

.github-error p {
    margin: 5px 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #github-widget {
        max-width: 100%;
        margin: 0 10px;
    }

    .github-content {
        padding: 20px;
    }

    .github-main-section {
        flex-direction: column;
        gap: 20px;
    }

    .github-stats-section {
        flex: none;
        width: 100%;
    }

    .github-profile {
        text-align: center;
        padding-bottom: 15px;
        width: 100%;
    }

    .github-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .github-stats {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: space-around;
    }

    .stat-item {
        flex: none;
        width: calc(33.333% - 10px);
        min-width: 80px;
    }

    .github-repos-list {
        max-height: 250px;
    }

    .github-footer {
        text-align: center;
        padding: 15px 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #github-widget {
        background: #0d1117;
        color: #c9d1d9;
    }

    .github-header {
        background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    }

    .github-content {
        color: #c9d1d9;
    }

    .github-profile {
        border-bottom-color: #30363d;
    }

    .github-avatar img {
        border-color: #30363d;
    }

    .github-info h4 {
        color: #c9d1d9;
    }

    .github-login {
        color: #8b949e;
    }

    .github-bio {
        color: #c9d1d9;
    }

    .github-location {
        color: #8b949e;
    }

    .github-stats {
        border-bottom-color: #30363d;
    }

    .stat-number {
        color: #c9d1d9;
    }

    .stat-label {
        color: #8b949e;
    }

    .github-repos h5 {
        color: #c9d1d9;
        border-bottom-color: #30363d;
    }

    .repo-item {
        border-bottom-color: #21262d;
    }

    .repo-item:hover {
        background-color: #161b22;
    }

    .repo-description {
        color: #8b949e;
    }

    .repo-stats {
        color: #8b949e;
    }

    .github-footer {
        background: #161b22;
        border-top-color: #30363d;
    }

    .github-error {
        background: #21262d;
        color: #f85149;
        border-color: #da3633;
    }
}
