@font-face {
    font-family: 'SF Pro Display';
    src: url('./assets/font.ttf') format('opentype');
    font-weight: bold;
}

@font-face {
    font-family: 'SF Pro Regular';
    src: url('./assets/font.ttf') format('opentype');
    font-weight: regular;
}

p,h1,h2,h3,h4,h5,h6,#editor div,#editor span,a,button,input,textarea,select {
    font-family: 'SF Pro Regular', sans-serif;
}

i {
    margin-right: 10px;
    font-size: 13px;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
    font-family: 'SF Pro Display', sans-serif;
    overflow: hidden;
}

#top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

#top-bar .div {
    display: flex;
}

#top-bar .button {
    margin: 0 10px;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 12px;
    justify-content: center;
    align-items: center;
    display: flex;
    transition: all 0.3s ease;
}

#top-bar .button:hover {
    background: #333;
}

.prev-button, .next-button, .skip-button {
    margin-left: 2px;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 12px;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.prev-button:hover, .next-button:hover, .skip-button:hover {
    background: #333;
}

.prev-button:disabled {
    background: #111;
    color: #555;
    cursor: not-allowed;
}

#container {
    display: flex;
    height: calc(100vh - 50px);
    position: relative;
}

#editor,
#preview {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
}

#editor {
    flex: 0 0 auto;
    width: 500px;
    min-width: 200px;
    border-right: none;
}

#preview {
    flex: 1;
    min-width: 200px;
    position: relative;
    overflow: auto;
}

#divider {
    width: 4px;
    background: #333;
    cursor: col-resize;
    transition: background 0.3s;
    flex: 0 0 auto;
}

#divider:hover {
    background: #555;
}

body.resizing {
    cursor: col-resize;
    user-select: none;
}

@keyframes popTransition {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.pop-transition {
    animation: popTransition 0.3s ease-out;
}

#linesContainer .line {
    display: flex;
    margin-bottom: 10px;
}

#linesContainer .line input, #newStartTime {
    padding: 5px;
    font-size: 14px;
    border: 1px solid #444;
    background-color: #222;
    color: #fff;
    border-radius: 4px;
}

#linesContainer .line input.timestamp {
    width: 70px;
}

#addLineButton, #addLineButtonalt, .copypartsbuttonalt {
    margin-top: 10px;
    margin-bottom: 5%;
    padding: 8px 16px;
    font-size: 16px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#addLineButton:hover, #addLineButtonalt:hover, .copypartsbuttonalt:hover {
    background: #333;
}

#previewContainer {
    padding: 20vh 20px;
    padding-top: 5vh;
    position: relative;
    transition: transform 1s ease;
}

#preview {
    padding: 0;
}

.preview-line {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0;
    min-height: 40px;
    filter: blur(1px);
    transition: filter 0.3s ease;
    max-width: 80%;
}

.preview-line.active {
    filter: blur(0);
}

.preview-letter {
    display: inline-block;
    color: var(--inactive-text-color, gray);
    transition: color 0.5s ease, top 0.3s ease;
}

.preview-letter.active {
    color: var(--active-text-color, white);
    text-shadow: 0 0 var(--glow-amount, 0.2px) var(--active-text-color, white);
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

.left-lyric {
    text-align: left;
}

.right-lyric {
    text-align: right;
    margin-left: auto;
}

.preview-line.finished .preview-letter {
    position: relative;
    animation: none;
    color: var(--inactive-text-color, gray);
    text-shadow: 0 0 0;
}

.preview-word {
    position: relative;
    display: inline-block;
    top: 0;
    transition: top 0.3s ease;
}

.preview-word.single-word.finished {
    transform: none !important;
}

.preview-word.finished {
    color: var(--inactive-text-color, gray);
}

.preview-word.active.glow {
    animation: glowPulse 2s infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

@keyframes glowPulse {
    0% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    }

    50% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
    }

    100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    }
}

@keyframes riseUp {
    0% {
        top: 0;
    }

    100% {
        top: -3px;
    }
}

.waiting-dots {
    display: block;
    height: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.waiting-dots.visible {
    height: 20px;
    margin: 30px 0;
    opacity: 1;
}

.waiting-dots.disappearing {
    height: 0;
    margin: 0;
    opacity: 0;
}

.waiting-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: gray;
    margin: 0 5px;
    transform: scale(1);
    opacity: 1;
    transition: background-color 1.5s ease;
}

.waiting-dot.active {
    background-color: white;
}

.waiting-dot.finished {
    animation: expandAndFade 0.5s ease forwards;
}

.sublyric {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0;
}

.add-sub-button {
    padding: 4px 9px;
    background: #333;
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-sub-button:hover,
.syllable-btn:hover {
    background: #444;
}

.option-button {
    padding: 8px 15px;
    background: #333;
    border: none;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-button:hover {
    background: #444;
}

.delete-sub {
    padding: 5px 9px;
    background: #444;
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.delete-line {
    background: #333;
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-line:hover {
    background: #444;
}

.sublyrics-container {
    margin-top: 5px;
}

.preview-sublyric {
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #666;
    font-weight: bold;
}

.preview-sublyric .preview-letter {
    color: #444;
    transition: color 0.3s ease;
}

.preview-sublyric.active {
    opacity: 1;
}

.preview-sublyric.visible {
    opacity: 1;
}

.preview-sublyric.active .preview-letter {
    color: #444;
}

.preview-sublyric.active .preview-letter.active {
    color: #999;
}

.preview-sublyric.active {
    color: #999;
}

.preview-sublyric-letter {
    color: #444;
    transition: color 0.3s ease;
}

.preview-sublyric.visible {
    opacity: 1;
}

.preview-sublyric.active .preview-sublyric-letter {
    color: #444;
}

.preview-sublyric.active .preview-sublyric-letter.active {
    color: #999;
}

.preview-sublyric.active {
    color: #999;
}

.sublyric-group {
    margin-left: 40px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.arrow-label {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    color: #666;
    font-size: 12px;
}

.arrow-label i {
    margin-right: 5px;
}

.main-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.line {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    opacity: 1;
    transition: opacity 0.2s;
}

.line.dragging {
    opacity: 0.5;
}

.grab-handle {
    cursor: grab;
    padding: 5px 6px;
    color: #666;
    font-size: 20px;
    user-select: none;
}

.alignment-buttons {
    display: flex;
    gap: 5px;
}

.align-btn {
    background: #333;
    border: none;
    color: #666;
    padding: 5px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.align-btn:hover {
    background: #444;
}

.align-btn.active {
    background: #555;
    color: #fff;
}

.dropdown-container {
    display: flex;
    gap: 10px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #222;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 100;
    width: 83px;
    border-radius: 8px;
    overflow: hidden;
}

.dropdown-help .dropdown-content {
    width: 130px;
}

.dropdown-content button {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 8px 16px;
    text-align: left;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dropdown-content button:hover {
    background-color: #333;
}

.dropdown-content button.active {
    background: #333;
    color: #0af;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropdown-btn {
    background: #333;
}

.mobile-tabs {
    display: none;
    padding: 10px;
    background: #111;
    gap: 10px;
}

.tab-button {
    flex: 1;
    padding: 10px;
    background: #222;
    border: none;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
}

.tab-button.active {
    background: #333;
    color: white;
}

.time-display {
    font-family: 'SF Pro Display', monospace;
    font-size: 14px;
    color: #888;
    margin-left: 15px;
    min-width: 95px;
    text-align: right;
}

@media (max-width: 768px) {
    .mobile-tabs {
        display: flex;
    }

    #container {
        flex-direction: column;
    }

    #editor,
    #preview {
        width: 100%;
        height: calc(100vh - 110px);
        display: none;
    }

    #previewContainer {
        padding: 0;
    }

    #editor.active,
    #preview.active {
        display: block;
    }

    #divider {
        display: none;
    }

    #editor p br:first-of-type,
    #editor p br:last-of-type {
        display: none;
    }

    .right-lyric {
        margin-left: 15%;
    }

    .grab-handle {
        display: none;
    }

    #linesContainer .line input.timestamp {
        width: 30px;
    }

    #linesContainer .line input {
        width: 100px;
    }

    .line {
        flex-direction: unset;
    }

    .main-line {
        gap: 0;
    }

    .dropdown-content {
        position: fixed;
        left: 0;
        width: 100%;
        border-radius: 0;
    }

    .time-display {
        font-size: 12px;
        min-width: 85px;
        margin-left: 10px;
    }
}

.syllable-btn {
    padding: 4px 9px;
    background: #333;
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.syllable-btn.active {
    background: white;
    color: #222;
}

.syllable-btn i {
    margin-right: 0;
}

.syllable-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #222;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.syllable-popup.active {
    display: block;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.popup-overlay.active {
    display: block;
}

.syllable-word {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #333;
    border-radius: 8px;
}

.syllable-word input {
    width: 70px;
    padding: 5px;
    background: #444;
    border: 1px solid #555;
    color: white;
    border-radius: 4px;
}

.syllable-word .word-text {
    flex: 1;
    color: #888;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.popup-header h3 {
    margin: 0;
    color: #fff;
}

.popup-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 20px;
}

.popup-close:hover {
    color: #fff;
}

#sync-control {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 10px;
    background: #000;
    border-bottom: 1px solid #333;
}

.sync-button {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    background: #222;
    color: #666;
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.sync-button.active {
    background: #333;
    color: #fff;
}

.sync-button i {
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.sync-button.active i {
    transform: rotate(0deg);
}

#stopButton.active {
    background: red;
}

#stopButton.active:hover {
    background: #773333;
}

#lyricTooltip {

    max-width: 90vw;
    word-break: break-word;
    pointer-events: none;
    user-select: none;
}

.context-menu {
    position: absolute;
    background: #222;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    border-radius: 10px;
    min-width: 120px;
    z-index: 1000;
    display: none;
}

.context-menu-item {
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.context-menu-item:hover {
    background: #333;
}

.context-menu-item.delete {
    color: #dc3545;
}

.tutorial-section {
    margin-bottom: 20px;
}

.tutorial-dropdown {
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.tutorial-dropdown:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.tutorial-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.tutorial-toggle:hover {
    color: rgba(255, 255, 255, 0.95);
}

.tutorial-icon {
    margin-right: 10px;
    font-size: 12px;
    transition: transform 0.2s ease;
    color: rgba(255, 255, 255, 0.6);
}

.tutorial-dropdown.active .tutorial-icon {
    transform: rotate(90deg);
    color: rgba(255, 255, 255, 0.8);
}

.tutorial-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 16px;
}

.tutorial-dropdown.active .tutorial-content {
    max-height: 200px;
    padding: 0 16px 16px 16px;
    transition: max-height 0.3s ease-in;
}

.tutorial-content p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1.4;
}

.tutorial-content p:first-child {
    margin-top: 12px;
}

.tutorial-content strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.timestamp-invalid {
  border-color: #f55 !important;
  box-shadow: 0 0 0 2px rgba(255, 85, 85, 0.2) !important;
}

:root {
    --background-primary: #000000;
    --background-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --accent-primary: #007AFF;
    --accent-secondary: #0055FF;
    --base-blur: 1px;
    --active-blur: 0px;
    --inactive-blur: 1.5px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-group label {
    color: #fff;
    font-size: 15px;
}

.theme-popup input[type="range"] {
    background: #333;
    height: 6px;
    border-radius: 3px;
    outline: none;
}

#copyPartsPopup {
    height: 66vh;
    max-width: 800px;
}

.theme-popup input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #0af;
    border-radius: 50%;
    cursor: pointer;
}

.preview-line:not(.active) {
    filter: blur(var(--inactive-blur));
}

.preview-line.active {
    filter: blur(var(--active-blur));
}

.copy-select {
    width: 20px !important;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

#copyPartsPopup #lyrics-selection .syllable-word {
    cursor: pointer;
    user-select: none;
}

#copyPartsPopup #lyrics-selection .syllable-word:hover {
    background: #444;
}

.copyparts-button {
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    color: #fff;
    border: none;
    border-radius: 12px;
    justify-content: center;
    align-items: center;
    display: flex;
    transition: all 0.3s ease;
    background: #515151;
    cursor: pointer;
}

.copyparts-button.disabled {
    background: #222;
    cursor: not-allowed;
}

.copyparts-button:hover {
    background: #333;
}

#copyPartsContinue, #copyPartsDone {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
}

.onboarding-popup {
    padding: 0;
    display: flex;
    flex-direction: column;
    z-index: 1002;
}

.onboarding-steps {
    display: flex;
    padding: 20px;
    gap: 10px;
    border-bottom: 1px solid #333;
}

.step {
    padding: 8px 16px;
    border-radius: 20px;
    color: #666;
    font-size: 14px;
    position: relative;
}

.step.active {
    background: #0af;
    color: white;
}

.step.completed {
    background: #1a1a1a;
    color: #0af;
}

.step.completed::after {
    content: "✓";
    margin-left: 5px;
}

.onboarding-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.onboarding-buttons {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #333;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-item {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-item i {
    font-size: 20px;
    color: #0af;
}

.theme-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.theme-button {
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.theme-button:hover {
    transform: translateY(-2px);
}

.theme-button.active {
    box-shadow: 0 0 0 2px #0af;
}

.start-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.start-option {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 12px;
    border: none;
    color: white;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.start-option:hover {
    background: #222;
    transform: translateY(-2px);
}

.start-option i {
    font-size: 24px;
    color: #0af;
    margin-bottom: 15px;
}

.start-option h3 {
    margin: 0 0 5px 0;
    color: white;
}

.start-option p {
    margin: 0;
    color: #888;
    font-size: 14px;
}

.options-popup {
    display: flex;
    width: 1000px;
    max-width: 95vw;
    height: 80vh;
    background: #111;
    border-radius: 12px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.options-sidebar {
    width: 200px;
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
}

.options-header {
    padding: 20px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.options-header h2 {
    margin: 0;
    font-size: 20px;
}

.options-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.options-tabs button {
    padding: 12px 16px;
    text-align: left;
    background: none;
    border: none;
    color: #888;
    border-radius: 12px;
    margin: 5px 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.options-tabs button i {
    width: 20px;
    margin-right: 8px;
}

.options-tabs button:hover {
    background: #222;
    color: #fff;
}

.options-tabs button.active {
    background: #333;
    color: #fff;
}

.options-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.option-row {
    margin-bottom: 20px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 8px;
}

.option-row label {
    display: flex;
    align-items: center;
    font-weight: bold;
    margin-bottom: 8px;
}

.option-row input[type="checkbox"] {
    margin-right: 10px;
}

.option-description {
    margin: 0;
    color: #888;
    font-size: 13px;
}

.options-section {
    border-radius: 8px;
    margin: 20px 0;
}

.version {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.github-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 20px;
    border: none;
    cursor: poiner;
}

.github-button:hover {
    background: #444;
}

.legal {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.coming-soon {
    color: #666;
    font-style: italic;
}