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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0d1117;
    background-image: 
        radial-gradient(circle at 20% 50%, #21262d 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, #21262d 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, #21262d 0%, transparent 50%);
    color: #e6edf3;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    gap: 20px;
}

.chat-sidebar {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 250px;
    height: 400px;
    background: #000000;
    border: 1px solid #30363d;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.user-count {
    padding: 10px 15px;
    border-bottom: 1px solid #30363d;
    background: #21262d;
    color: #f0c674;
    font-weight: 600;
    text-align: center;
    font-size: 14px;
}

.user-icon {
    font-size: 18px;
    margin-right: 8px;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 10px 15px;
    border-bottom: 1px solid #30363d;
    background: #161b22;
}

.chat-header h3 {
    margin: 0;
    color: #f0c674;
    font-size: 16px;
}

.chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    max-height: 220px;
    scrollbar-width: thin;
    scrollbar-color: #30363d #000000;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #000000;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 3px;
}

.chat-message {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    word-wrap: break-word;
}

.chat-message.system {
    background: rgba(240, 198, 116, 0.1);
    color: #f0c674;
    text-align: center;
    font-style: italic;
}

.chat-message.user {
    background: #21262d;
    border-left: 3px solid #f0c674;
}

.message-username {
    color: #fd7e14;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 2px;
    display: block;
}

.message-text {
    color: #e6edf3;
    font-size: 14px;
    line-height: 1.4;
}

.message-time {
    color: #8b949e;
    font-size: 11px;
    margin-top: 2px;
    display: block;
}

.chat-input-container {
    padding: 10px;
    border-top: 1px solid #30363d;
    display: flex;
    gap: 6px;
    background: #161b22;
    border-radius: 0 0 8px 8px;
}

#chat-input {
    flex: 1;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 6px 8px;
    color: #e6edf3;
    font-size: 12px;
}

#chat-input:focus {
    outline: none;
    border-color: #f0c674;
}

#send-button {
    background: #f0c674;
    color: #0d1117;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

#send-button:hover {
    background: #e6b85c;
}

#send-button:disabled {
    background: #30363d;
    color: #8b949e;
    cursor: not-allowed;
}

.container {
    max-width: 60%;
    width: 1000px;
    margin: 0 auto;
}

.header {
    background: #000000;
    border: 1px solid #30363d;
    border-radius: 0px;
    padding: 30px;
    margin-bottom: 30px;
}

.header-content {
    text-align: center;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo {
    width: 40px;
    height: 40px;
}

.repo-name {
    font-size: 28px;
    font-weight: 600;
    color: #f0c674;
}

.repo-name #username {
    color: #f0c674;
}

.stats {
    font-size: 20px;
    color: #8b949e;
}

.stats span {
    color: #fd7e14;
    font-weight: 600;
}

.chart-container {
    background: #000000;
    border: 1px solid #30363d;
    border-radius: 0px;
    padding: 30px;
    margin-bottom: 30px;
    height: 300px;
    position: relative;
}

#commitsChart {
    max-height: 100%;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.page-btn {
    background: #f0c674;
    border: none;
    color: #0d1117;
    padding: 10px 20px;
    border-radius: 0px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.page-btn:hover {
    background: #e6b85c;
    transform: translateY(-2px);
}

.page-btn.active {
    background: #fd7e14;
    color: white;
}

.page-btn.dots {
    background: transparent;
    cursor: default;
    color: #f0c674;
}

.page-btn.next {
    background: #f0c674;
}

.commits-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.commit-item {
    background: #000000;
    border: 1px solid #30363d;
    border-radius: 0px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s;
}

.commit-item:hover {
    border-color: #f0c674;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(240, 198, 116, 0.1);
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #30363d;
    border: 1px solid #21262d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.commit-details {
    flex: 1;
}

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

.author-name {
    color: #f0c674;
    font-weight: 600;
    font-size: 16px;
}

.branch-name {
    color: #fd7e14;
    font-size: 14px;
}

.commit-time {
    color: #8b949e;
    font-size: 13px;
}

.commit-message {
    color: #e6edf3;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.commit-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #8b949e;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: color 0.3s;
}

.stat-item:hover {
    color: #f0c674;
}

.vote-btn {
    cursor: pointer;
    transition: all 0.2s;
    padding: 5px 8px;
    border-radius: 4px;
    user-select: none;
}

.vote-btn:hover {
    background: rgba(240, 198, 116, 0.1);
    transform: scale(1.1);
}

.vote-btn.voted {
    background: rgba(240, 198, 116, 0.2);
    color: #f0c674;
    font-weight: 600;
}


.loading {
    text-align: center;
    padding: 40px;
    color: #8b949e;
}

.spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #30363d;
    border-top: 4px solid #f0c674;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner.show {
    display: flex;
}

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

.error {
    background: #da3633;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f85149;
}

@media (max-width: 768px) {
    body {
        display: block;
        padding: 10px;
    }
    
    .container {
        margin-right: 0;
        max-width: 100%;
    }
    
    .chat-sidebar {
        position: relative;
        width: 100%;
        height: 400px;
        margin-bottom: 20px;
        right: auto;
        top: auto;
    }
    
    .header {
        padding: 20px;
    }
    
    .repo-name {
        font-size: 20px;
    }
    
    .stats {
        font-size: 16px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .commit-item {
        padding: 15px;
    }
}