@import url('font/family.css');
@import url('unijoyKey.css');

body {
    font-family: 'bcc-purno', 'jetbrains-mono', sans-serif;
    color: #e2e8f0;
    margin: 0;
    overflow-x: hidden;
    background-color: #020617;
}

.hidden {
    display: none;
}

.bengali {
    font-family: "bcc-purno-key", serif;
    unicode-bidi: isolate;
    font-feature-settings: "kern" 1, "liga" 1;
    -webkit-font-smoothing: antialiased;
}

#welcome-modal {
    font-family: 'hind-siliguri', sans-serif;
}

#unijoy-char-display {
    font-family: 'bcc-purno';
    font-weight: 700;
}

#latin-key-display {
    font-family: 'jetbrains-mono';
    font-weight: 700;
}

#lesson-reset {
    font-family: 'jetbrains-mono';
}

.mono {
    font-family: 'jetbrains-mono', monospace;
}

.font-hind-siliguri {
    font-family: 'hind-siliguri', sans-serif;
}

.font-bcc-purno {
    font-family: 'bcc-purno', serif;
}

.font-bornomala-vintage {
    font-family: 'bornomala-vintage';
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

.keyboard-key {
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
}

.keyboard-key.active-target {
    transform: scale(1.02);
    background-color: #020617 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

@keyframes pulse-indigo {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.2);
        border-color: #312e81;
    }

    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
        border-color: #6366f1;
        transform: scale(1.03);
    }
}

@keyframes pulse-amber-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.2);
        border-color: #78350f;
    }

    50% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
        border-color: #f59e0b;
        transform: scale(1.03);
    }
}

.pulse-glow {
    animation: pulse-indigo 0.8s infinite ease-in-out;
    background-color: #020617 !important;
    color: white !important;
    z-index: 10;
}

.pulse-glow-amber {
    animation: pulse-amber-glow 0.8s infinite ease-in-out;
    background-color: #451a03 !important;
    color: #f59e0b !important;
    z-index: 10;
}

.shift-warning {
    animation: shake 0.4s;
    background-color: #78350f !important;
    border-color: #f59e0b !important;
}

.char-label.active-char {
    color: #6366f1 !important;
    transform: scale(1.15);
    font-weight: 900 !important;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
    opacity: 1 !important;
}

.keyboard-key.error {
    animation: shake 0.3s;
    background-color: #ef4444 !important;
    border-color: #b91c1c !important;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-3px);
    }
    75% {
        transform: translateX(3px);
    }
}

#target-scroll-container {
    display: flex;
    align-items: center;
    overflow-x: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    mask-image: linear-gradient(to right, transparent, black 25%, black 75%, transparent);
    padding: 0 50%;
}

#lesson-content-preview {
    font-family: "bcc-purno", serif;
}

#lesson-content-preview span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 4rem;
    font-size: 2.5rem;
    padding: 0 0.04rem;
    min-width: 1ch;
    transition: all 0.2s ease;
    color: #d1d0c5;
}

#lesson-content-preview span:empty,
#lesson-content-preview span.bengali:contains('&nbsp;') {
    width: 1.5rem;
}

#lesson-content-preview span.active {
    color: #6366f1;
    font-weight: 700;
    transform: scale(1);
    z-index: 10;
    box-shadow: inset 0 -0.3rem 0 0 #6366f1;
}

#lesson-content-preview span.done {
    color: #d1d0c5;
}

#lesson-content-preview span.space {
    display: inline-flex;
    width: 1rem;
    justify-content: center;
}

#category-nav {
    font-family: 'hind-siliguri', sans-serif;
    font-weight: bolds;
    font-size: 0.80rem;
}

#category-indicator {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 0.5rem;
    background-color: #0f172a;
    transition: transform 300ms ease, width 300ms ease;
    z-index: 0;
}

.category-tab {
    position: relative;
    z-index: 10;
    font-weight: bold;
    padding: 0.35rem 0.7rem;
    text-transform: uppercase;
    color: #94a3b8;
    border-radius: 0.4rem;
    transition: color 200ms ease;
}

#custom-text-btn {
    position: relative;
    z-index: 10;
    padding: 0.35rem 0.7rem;
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #94a3b8;
    border-radius: 0.4rem;
    transition: color 200ms ease;
}

#custom-text-btn.active {
    color: #6366f1;
}

.category-tab.active {
    color: #6366f1;
}

#category-nav .category-tab.active i {
    color: #fff !important;
}

#custom-text-btn {
    background-color: #0f172a;
}

button.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.lesson-card {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;

    padding-top: 0.4rem;
    padding-right: 0.6rem;
    padding-bottom: 0.36rem;
    padding-left: 0.6rem;

    border-radius: 0.5rem;
    font-family: 'hind-siliguri', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.lesson-card.active {
    background: #1216D3;
    color: white;
    border-color: #1216D3;
}

#target-char-display {
    font-family: 'bcc-purno', sans-serif;
}

#result-modal:not(.hidden) .scale-95 {
    transform: scale(1);
}

aside::-webkit-scrollbar {
    width: 4px;
}

aside::-webkit-scrollbar-track {
    background: #020617;
}

aside::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 10px;
}

#set-time-limit-btn {
    position: relative;
    top: -30%;
    right: -4%;
}

.auto-tooltip {
    position: fixed;
    background: #0f172a;
    color: #f59e0b;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #334155;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -6px) scale(0.95);
    transition: opacity 0.14s ease, transform 0.14s ease;
    z-index: 9999;
    white-space: nowrap;
}

.auto-tooltip::after {
    content: "";
    position: absolute;
    left: var(--arrow-x, 50%);
    top: 100%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}

.auto-tooltip.show {
    opacity: 1;
    transform: translate(-50%, -10px) scale(1);
}

.auto-tooltip[data-place="bottom"] {
    transform: translate(-50%, 6px) scale(0.95);
}

.auto-tooltip[data-place="bottom"].show {
    transform: translate(-50%, 10px) scale(1);
}

.auto-tooltip[data-place="bottom"]::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent #0f172a transparent;
}

#lowkey,
.lowkey {
    position: relative;
    top: -5px;
    width: 50px;
    height: 50px;
    background: linear-gradient(to bottom, #6366f1, #4338ca);
    border: 2px solid #312e81;
    border-radius: 6px;
    box-shadow:
        0 3px #312e81,
        inset 0 1px rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    cursor: default;
    user-select: none;
    transition: all 0.1s ease-in-out;
}

#lowkey:active,
.lowkey:active {
    transform: translateY(3px);
    box-shadow:
        0 1px #312e81,
        inset 0 1px rgba(255, 255, 255, 0.2);
}

#lowkey,
.lowkey,
.logo,
.motto {
    font-family: 'bornomala-vintage';
}

.key-logo {
    font-size: 30px;
    position: relative;
}

.u09F3 { /** ৳ **/
    font-size: 20px;
    position: relative;
    top: -5px;
}
