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

body {
    font-family: Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
}

.tab-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.tab-header {
    background: #151515;
    padding: 10px 10px 0 10px;
}

.tabs-scroll-container {
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: #1a1a1a #151515;
}

.tabs-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.tabs-scroll-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 5px;
}

.tabs-scroll-container::-webkit-scrollbar-thumb {
    background: #202020;
    border-radius: 4px;
}

.tabs-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #2a2a2a;
}

.tabs-wrapper {
    display: flex;
    align-items: center;
    min-width: min-content;
}

.tabs {
    display: flex;
    gap: 4px;
}

.tab.pinned {
    background: #202020;
    order: -1;
}

.tab.pinned .tab-label {
    margin-right: 0;
}

.tab {
    height: 30px;
    min-width: 100px;
    max-width: 200px;
    padding: 0 10px;
    background: #151515;
    color: #a0a0a0;
    cursor: pointer;
    border: none;
    border-bottom: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    animation: slideDown 0.3s ease;
    pointer-events: all;
    position: relative;
    user-select: none;
}

.tab.removing {
    animation: slideUp 0.3s ease forwards;
}

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

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

.tab:not(.active):hover {
    background: #202020;
}

.tab:not(.active):active {
    background: #151515;
}

.tab.active {
    color: #e0e0e0;
    border-bottom: 1px solid #a0a0a0;
    background: #1a1a1a;
}

.tab-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    margin-right: 5px;
    transition: margin 0.3s ease;
    pointer-events: none;
}

.tab:not(.active):not(:hover) .tab-label {
    margin-right: 0;
}

.close-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #a0a0a0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: all;
}

.tab.active .close-btn {
    opacity: 1;
}

.tab:not(.active):hover .close-btn {
    opacity: 1;
}

.close-btn:hover {
    background: #202020;
    color: #e0e0e0;
}

.add-tab {
    height: 30px;
    width: 30px;
    background: #151515;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 5px;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-tab:hover {
    background: #1a1a1a;
}

.add-tab:active {
    background: #151515;
}

.add-tab-content {
    display: flex;
    align-items: center;
    min-width: max-content;
    padding: 0 10px;
}

.add-tab-icon {
    font-size: 20px;
    color: #a0a0a0;
    transition: color 0.3s ease;
}

.add-tab:hover .add-tab-icon {
    color: #e0e0e0;
}

.tab-content {
    flex-grow: 1;
    background: #151515;
    overflow: hidden;
    position: relative;
}

.tab-pane {
    display: none;
    height: 100%;
}

.tab-pane.active {
    display: block;
}

.tab-icon {
    width: 15px;
    height: 15px;
    margin-right: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab.dragging {
    opacity: 0.6;
    position: absolute;
    pointer-events: none;
    z-index: 1000;
}

.editor-container {
    height: 100%;
    width: 100%;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 13, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.popup-overlay.active {
    opacity: 0.9;
    pointer-events: all;
}

.popup {
    background: #151515;
    border-radius: 5px;
    padding: 20px;
    width: 300px;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.popup.active {
    transform: translateY(0);
    opacity: 1;
}

.popup-title {
    color: #e0e0e0;
    text-align: center;
    margin-bottom: 15px;
    font-size: 16px;
}

.input-container {
    position: relative;
    margin-bottom: 15px;
}

.input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.popup-input {
    width: 100%;
    background: #1a1a1a;
    border: none;
    border-bottom: 1px solid #a0a0a0;
    color: #a0a0a0;
    padding: 8px 8px 8px 40px;
    outline: none;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.popup-input::placeholder {
    color: #a0a0a0;
    transition: all 0.3s ease;
}

.popup-input:focus {
    background: #202020;
    border-bottom-color: var(--accent-color, #e0e0e0);
    color: #e0e0e0;
}

.popup-input:focus::placeholder {
    color: #e0e0e0;
}

.popup-button {
    width: 100%;
    padding: 8px;
    background: #1a1a1a;
    border: none;
    border-radius: 5px;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-button:hover {
    background: #202020;
    color: #e0e0e0;
}

.popup-button:active {
    background: #1a1a1a;
}

.context-menu {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.context-menu-item {
    user-select: none;
    display: flex;
    align-items: center;
}

.context-menu-item.disabled {
    color: #404040;
    cursor: default;
}