* {
    margin: 0;
    padding: 0;
}
header, footer {
    border: 1px solid #000000;
    padding: 20px;
    background-color: #141c2c;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header h1, footer p {
    color: #ffffff;
}
footer {
    text-align: center;
}
.content, .start {
    border: 1px solid #000000;
    padding: 20px;
    background-color: #ffffff;
    text-align: center;
}
.start a, .nav-buttons a, .add-tab, .sort-mode-toggle, .tab, .nav-bar a {
    text-decoration: none;
    color: #000000;
    border:1px solid #000000;
    padding: 10px;
    transition: all 0.3s ease;
}
.return {
    text-decoration: none;
    color: #ffffff;
    border:1px solid #ffffff;
    padding: 10px;
    transition: all 0.3s ease;
    border-radius: 6px;
}
.return:hover {
    background: #5975ae;
    
}
.nav-bar {
    position: absolute;
    top: 150px;
}
.start a:hover, .nav-buttons a:hover, .add-tab:hover, .sort-mode-toggle:hover, .tab:hover, .nav-bar a:hover {
    background: #141c2c;
    border-color: #141c2c;
    color: #ffffff;
}
.start ul {
    list-style-type: none;
    padding-left: 0;
}
.add-tab, .sort-mode-toggle {
    width: 120px;
    height: 36px;
    margin-left: 15px;
    padding: 8px 12px;
    color: #000000;
    border-radius: 4px;
    cursor: pointer;
    position: sticky;
    right: 15px;
    top: 10px;
}
.nav-buttons ul {
    display: flex;
    gap: 10vw;
    justify-content: center;
    list-style: none;
}
.nav-buttons .active, .tab.active {
    background: #141c2c;
    color: #ffffff !important;
}
.content-section {
    display: none;
    margin-top: 2rem;
    padding: 20px;
    border: 1px solid #141c2c;
}
.content-section:first-child {
    display: block;
}
.tab-manager {
    margin-top: 20px;
    display: flex;
    height: calc(100vh - 150px);
}
.tab-header {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    width: 45%;
    min-width: 400px;
    border-right: 2px solid #2a3a5c;
    padding-right: 15px;
    overflow-y: auto;
}
.tab {
    text-align: center;
    margin: 10px;
    padding: 8px 15px;
    border: 1px solid #141c2c;
    cursor: pointer;
    position: relative;
    border-radius: 4px;
}
.delete-tab {
    position: absolute;
    top: -8px;
    line-height: 16px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    right: -8px;
    background: #ff0000;
    color: #ffffff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: none;
}
.tab:hover .delete-tab {
    display: block;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: #ffffff;
    padding: 20px;
    border-radius: 5px;
    width: 300px;
}
.modal-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
#tabTitle {
    width: 100%;
    padding: 8px;
    border: 1px solid #141c2c;
}
.editor-container {
    max-width: 800px;
    margin: 2rem auto;
}
#editor {
    height: 40.2vw;
    border: 1px solid #141c2c;
}
.ql-toolbar {
    background: #f3f3f3;
    border: 1px solid #141c2c;
}
.edit-link {
    display: none;
    font-size: 1em;
    margin-right: 8px;
    margin-left: 8px;
    color: #ffffff;
    text-decoration: none;
}
.tab:hover .edit-link {
    display: inline;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.import-btn, .export-btn {
    cursor: pointer;
    padding: 8px 15px;
    background: #141c2c;
    color: #ffffff;
    border-radius: 4px;
    margin-left: 10px;
    transition: all 0.3s ease;
}
.import-btn:hover, .export-btn:hover {
    background: #394d78;
}
.preview-pane {
    flex: 1;
    padding: 15px;
    background: #f5f7fa;
    overflow-y: auto;
}
#preview-content {
    margin-top: 15px;
    padding: 15px;
    min-height: 200px;
}
.tabs-container.sort-mode {
    cursor: move;
    user-select: none;
}
.sort-mode .tab {
    background: #a9c5ff;
    border-style: dashed;
    transition: all 0.3s ease;
}
.sort-mode .tab:hover {
    background: #91b6ff;
    transform: scale(1.01);
}
.sortable-ghost {
    opacity: 0.5;
    background: #a9c5ff;
}
.sort-mode-toggle.active {
    background: #141c2c;
    color: white;
}
.sort-mode .tab::before {
    content: '☰';
    position: absolute;
    left: 8px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}
.sort-mode .tab:hover::before {
    opacity: 1;
    animation: drag-pulse 1.2s ease infinite;
}
@keyframes drag-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.sortable-chosen {
    animation: drop-bounce 0.6s ease forwards;
}
@keyframes drop-bounce {
    0% { transform: translateY(-8px); }
    50% { transform: translateY(4px); }
    100% { transform: translateY(0); }
}
.tab-move {
    transition: transform 0.3s ease;
    transform: translateX(20px);
}