.repo-layout {
    padding-top: 80px;
    padding-left: 7px;
    padding-right: 7px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

@media (max-width: 768px) {
    .repo-layout { 
        grid-template-columns: 1fr; 
        padding-top: 70px;
    }
}

.repo-card {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 20px;
}

.repo-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.repo-title h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.repo-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.repo-title a:hover {
    color: #4cc2ff;
}

.repo-title span {
    color: #888;
    font-weight: 400;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4cc2ff, #3a9bd5);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 194, 255, 0.3);
}

.branch-bar {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.branch-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.branch-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
}

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

.file-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.file-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
}

.icon-folder { color: #4cc2ff; }
.icon-file { color: #aaa; }
.icon-code { color: #ffd166; }

.file-name {
    width: 200px;
    flex-shrink: 0;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    margin-right: 24px;
}

.file-name:hover {
    color: #4cc2ff;
}

.commit-msg {
    flex-grow: 1;
    font-size: 0.9rem;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 24px;
}

.file-meta {
    font-size: 0.85rem;
    color: #888;
    width: 120px;
    text-align: right;
    flex-shrink: 0;
}

.stats-card {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
}

.stats-title {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.lang-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.lang-segment {
    height: 100%;
}

.lang-list {
    font-size: 0.85rem;
    color: #aaa;
}

.lang-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    visibility: hidden;
    opacity: 0;
    
    position: absolute;
    top: calc(100% + 8px);
    
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 220px;
    
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 6px 0;
    
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    
    overflow: visible;
}

.dropdown-menu-right {
    right: 0;
    left: auto;
}

.dropdown-item svg {
    transform: translateY(3px);
}

.text-sprite {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.dropdown-menu-left {
    left: 0;
    right: auto;
}

/* СОСТОЯНИЕ: ОТКРЫТО */
.dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    color: #ddd;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background: rgba(76, 194, 255, 0.1);
    color: #4cc2ff;
}

.dropdown-item.active {
    color: #4cc2ff;
    background: rgba(76, 194, 255, 0.05);
}

.dropdown-header {
    padding: 6px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 4px;
}