@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
    --bg-color: #0f172a;
    --container-bg: rgba(30, 41, 59, 0.7);
    --text-color: #e2e8f0;
    --accent-color: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --input-bg: rgba(15, 23, 42, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top left, #1e293b, #0f172a);
    color: var(--text-color);
    min-height: 1080px;
    min-width: 1920px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 20px;
    zoom: 0.9;
}

html {
    overflow-x: auto;
    overflow-y: auto;
}

.page-wrapper {
    width: 1920px;
    max-width: 1920px;
    min-width: 1920px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 0;
    flex-shrink: 0;
}

* {
    box-sizing: border-box;
}



.main-wrapper {
    display: flex;
    gap: 20px;
    width: 1000px;
    align-items: flex-start;
    flex-shrink: 0;
}

.container {
    flex: 1 0 40%;

    background: var(--container-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid var(--border-color);
    animation: fadeIn 0.8s ease-out;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;

}

.level-converter-container {
    min-height: 650px;
    margin-top: 60px;
    margin-bottom: 60px;
}

.star-calculator-container {
    flex: 1 0 45%;
    min-height: 750px;
    margin-top: 60px;
}

#tab-splitter .container {
    flex: 1 0 35%;
    min-height: 750px;
    margin-top: 60px;
}

.visual-container {
    flex: 1.5 0 55%;

    background: var(--container-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid var(--border-color);
    animation: fadeIn 0.8s ease-out;
    position: relative;
    overflow: hidden;
    min-height: 750px;
    margin-top: 60px;
}

#visualCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.visual-label {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
}

.beat-angle-display {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    z-index: 10;
}

.beat-angle-display:hover {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
    transform: scale(1.05);
}

h1 {
    text-align: center;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
    letter-spacing: -0.5px;
    font-size: 1.5rem;
    height: 1.8rem;

    display: flex;
    align-items: center;
    justify-content: center;
}

.title-with-help {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

.title-with-help h1 {
    margin: 0;
}

.help-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.help-btn:hover {
    background: var(--accent-color);
    color: #0f172a;
    transform: scale(1.1);
}

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

.toggle-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 22px;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: #94a3b8;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: rgba(56, 189, 248, 0.2);
    border-color: var(--accent-color);
}

input:checked+.slider:before {
    transform: translateX(22px);
    background-color: var(--accent-color);
}

.disclaimer-text {
    white-space: nowrap;
    text-align: center;
    width: 100%;
}

.toggle-label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 500;
    line-height: 1;
    transform: translateY(-3px);

}


.segmented-control {
    display: flex;
    gap: 8px;
    width: 100%;
}

.segment-btn {
    flex: 1;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.segment-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.segment-btn.active {
    background: var(--accent-color);
    color: #0f172a;
    border-color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.segment-btn {
    height: 42px;

}


.segment-btn[data-reverse="true"].active {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}


input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
    height: 1.2rem;

    white-space: nowrap;

}

input,
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    resize: none;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}


input[type=number],
input[type=text] {
    text-align: center;
    padding: 12px;
    font-size: 1.1rem;
    flex: 1;
}


.stepper-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    width: 45px;
    height: 48px;

    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 10px;
    font-size: 1.2rem;
    transition: all 0.2s;
    padding: 0;
    margin: 0;
}

.stepper-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #fff;
    transform: scale(1.05);
}

.stepper-btn:active {
    transform: scale(0.95);
}

.result-area {
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid var(--border-color);
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    position: relative;
}

.result-area:last-child {
    margin-bottom: -10px;
}


::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    min-height: 1.2rem;

}

.result-area h2 {
    margin: 0;
    font-size: 0.9rem;
    color: #94a3b8;
}

.copy-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 2px;
    cursor: pointer;
    width: auto;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.copy-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

#result,
#result-adofai {
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--accent-color);
    word-break: break-all;
    line-height: 1.6;
    font-size: 0.9rem;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.visual-label {
    position: absolute;
    top: 15px;
    left: 20px;
    color: #94a3b8;
    font-weight: 500;
    pointer-events: none;
}

.beat-angle-display {
    position: absolute;
    bottom: 25px;
    right: 30px;
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    opacity: 0.85;

    text-shadow: 0 0 30px rgba(255, 255, 255, 0.4), 0 0 10px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    letter-spacing: -2px;
    transition: all 0.2s ease;
    user-select: all;
    z-index: 5;
}

.beat-angle-display:hover {
    opacity: 1;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.nav-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    z-index: 10;
    width: 1000px;
}

.nav-tab {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    color: #94a3b8;
    padding: 0 24px;
    height: 44px;

    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.nav-tab:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #fff;
}

.nav-tab.active {
    background: var(--accent-color);
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
    border-color: var(--accent-color);
}

.tab-content {
    display: none;
    width: 100%;
    justify-content: center;
    flex-grow: 1;
}

.tab-content.active {
    display: flex;
    align-items: center;
}

.footer-credits {
    margin-top: auto;
    width: 100%;
    padding-top: 30px;
}

.small-text {
    font-size: 0.7rem;
    color: #64748b;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.footer-credits .small-text {
    font-size: 0.62rem;
    line-height: 1.5;
    opacity: 0.6;
}

.footer-credits .small-text+.small-text {
    margin-top: 2px;
}

.small-text a {
    color: #64748b;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s, opacity 0.2s;
}

.small-text a:hover {
    color: #94a3b8;
    opacity: 1;
}


.converter-row {
    margin-bottom: 15px;
}

.converter-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

.input-pair {
    display: flex;
    gap: 10px;
    position: relative;
}

.input-pair select {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: #fff;
    padding: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    text-align: center;
    box-sizing: border-box;
    cursor: pointer;
}


.custom-select {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
}

.selected-option {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.selected-option img {
    max-height: 30px;
    max-width: 100%;
    object-fit: contain;
}

.options-container {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 320px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    z-index: 1000;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.converter-row label {
    height: 1.2rem;
    display: block;
}

.options-container.show {
    display: grid;
}




.option-item {
    aspect-ratio: 1 / 1;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.option-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.option-item img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.input-pair input {
    flex: 1.5;
}





.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}


.modal-content {
    background: var(--container-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #94a3b8;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover {
    color: var(--accent-color);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 15px;
}

#helpTextContent {
    line-height: 1.6;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.modal-input {
    width: 100%;
    margin-top: 15px;
    margin-bottom: 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    color: #fff;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
}

textarea.modal-input {
    min-height: 80px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}

.modal-btn.primary {
    background: var(--accent-color);
    color: #0f172a;
}

.modal-btn.primary:hover {
    filter: brightness(1.1);
}

.modal-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.file-input-label {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    padding: 0 20px;
    height: 36px;
    margin-top: 4px;

    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.file-input-label:hover {
    background: var(--accent-color);
    color: #0f172a;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    outline: none;
    margin: 0;
    cursor: pointer;
    box-shadow: none;
}

input[type="range"]:focus {
    border: none;
    box-shadow: none;
}


input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    border: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -6px;

    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
    transition: transform 0.2s;
}

input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.2);
}


input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    border: none;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.preview-canvas-wrapper {
    background-image:
        linear-gradient(45deg, #111 25%, transparent 25%),
        linear-gradient(-45deg, #111 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #111 75%),
        linear-gradient(-45deg, transparent 75%, #111 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #000;
}


#tab-splitter .input-group {
    margin-bottom: 10px;

}

#tab-splitter .converter-row {
    margin-bottom: 10px;

}

#tab-splitter .title-with-help {
    margin-top: 5px;
    margin-bottom: 25px;

}

#tab-splitter .title-with-help h1 {
    font-size: 1.5rem;
}

#tab-splitter label {
    margin-bottom: 2px;
    font-size: 0.85rem;
}

#tab-splitter input,
#tab-splitter textarea,
#tab-splitter select {
    padding: 8px 12px;

    font-size: 0.9rem;
}

#tab-splitter input,
#tab-splitter textarea {
    padding: 8px 14px;

    font-size: 0.95rem;
}

#tab-splitter .file-input-label {
    padding: 10px 20px;
    font-size: 0.9rem;
}

#tab-splitter .small-text {
    font-size: 0.75rem;
}

#tab-splitter .input-group:last-child {
    margin-top: 5px;

}

.splitter-wrapper {
    width: 1400px !important;
    max-width: 1400px !important;
    height: 780px;
}

.splitter-wrapper .container {
    flex: 1 0 32%;
    min-width: 320px;
    height: 100%;

    box-sizing: border-box;
    overflow-y: hidden;

    padding: 20px 25px;

}

.splitter-wrapper .visual-container.preview-col {
    flex: 1.2 0 35%;
    min-width: 380px;
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}

.split-buttons-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    background: var(--accent-color);
    border: none;
    color: #0f172a;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 80px;
    height: 48px;
}

.action-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.tags-display-area {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    min-height: 80px;
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}

.text-tag {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.text-tag:hover {
    background: rgba(56, 189, 248, 0.25);
    transform: translateY(-2px);
}

.text-tag .remove-tag {
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.text-tag .remove-tag:hover {
    opacity: 1;
    color: #ef4444;
}

.placeholder-text {
    color: #64748b;
    font-size: 0.85rem;
    font-style: italic;
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.text-tag.selected {
    background: var(--accent-color);
    color: #0f172a;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.text-tag.selected .remove-tag {
    color: rgba(15, 23, 42, 0.6);
}

.text-tag.selected .remove-tag:hover {
    color: #ef4444;
    opacity: 1;
}

.text-tag span:first-child {
    white-space: pre-wrap;
    outline: none;
    cursor: text;
    min-width: 5px;
}


.lang-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 15px;
    flex-shrink: 0;

    width: 80px;

    justify-content: flex-end;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

.lang-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}


.converter-scroll-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow-y: auto;
    padding-bottom: 20px;
}

.difficulty-info-container {
    background: var(--container-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid var(--border-color);
    margin-top: 20px;
    width: 95%;
    max-width: 1400px;
}

.difficulty-info-container {
    max-width: 1400px;
    width: 1400px;
    margin: 20px auto;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 20px;
    animation: fadeInUp 0.6s ease-out;
}

.difficulty-info-container h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    text-align: center;
}

.difficulty-base-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
}

.difficulty-base-selector .segment-btn {
    flex: 1;
    max-width: 150px;
    padding: 8px 16px;
    font-size: 0.85rem;
}


.difficulty-column-toggles {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.difficulty-column-toggles .toggle-label-text {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-right: 4px;
}

.column-toggle-btn {
    padding: 4px 10px;
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.column-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.column-toggle-btn.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--accent-color);
}

.column-toggle-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.difficulty-table-wrapper {
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    display: flex;
    gap: 60px;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: center;
}

.difficulty-table {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
    min-width: auto;
    position: relative;
    overflow: visible;
}

.difficulty-table:last-child {
    margin-bottom: 0;
}


.difficulty-table:not(:first-child)::before {
    content: '';
    position: absolute;
    left: -31px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.10);
}

.difficulty-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 80px;
    max-width: 120px;
}


.difficulty-column-q {
    flex: 0 0 auto;
    min-width: 35px;
    max-width: 45px;
}

.difficulty-column-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 1;
}

.difficulty-column-body {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.difficulty-box {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: filter 0.2s;
    box-sizing: border-box;
    overflow: hidden;
    line-height: 1;
}

.difficulty-box:last-child {
    border-bottom: none;
}

.difficulty-box {
    cursor: pointer;
}

.difficulty-box:hover {
    filter: brightness(1.15);
}

.difficulty-conversion-popup {
    position: absolute;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    min-width: 200px;
    animation: popupFadeIn 0.2s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.difficulty-conversion-popup h3 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
}

.difficulty-conversion-popup .conversion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.difficulty-conversion-popup .conversion-item:last-child {
    margin-bottom: 0;
}

.difficulty-conversion-popup .conversion-label {
    color: #94a3b8;
    margin-right: 15px;
}

.difficulty-conversion-popup .conversion-value {
    color: #fff;
    font-weight: 600;
}

.difficulty-highlight-line {
    position: absolute;
    height: 2px;
    background: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    pointer-events: none;
    z-index: 1999;
    overflow: visible;
}