/* Custom Styles complementing Tailwind CSS */

:root {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --surface-hover: #f3f4f6;
    --primary: #3ea6ff;
    --destructive: #ff4e45;
    --muted: #6b7280;
    --border: #e5e7eb;
}

.dark {
    --bg: #0f0f0f;
    --surface: #212121;
    --surface-hover: #3d3d3d;
    --primary: #3ea6ff;
    --destructive: #ff4e45;
    --muted: #aaaaaa;
    --border: #333333;
}

/* Glassmorphism panels */
.panel-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Custom Webkit Scrollbars for alignment viewer matching design */
::-webkit-scrollbar {
    width: 6px;
    height: 8px;

}

::-webkit-scrollbar-track {
    background: #111111;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* Alignment Text Specifics */
.align-match {
    color: #3ea6ff;
    /* Primary Blue */
    font-weight: 700;
}

.align-mismatch {
    color: #ff4e45;
    /* Destructive Red */
}

.align-gap {
    color: #aaaaaa;
    /* Muted */
}

/* Dynamic animations for rendering lines */
.line-anim {
    animation: fadeInRow 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInRow {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Eye Toggle button smooth transition */
#optionsToggleIcon1 {
    transition: transform 0.2s ease-in-out;
}

.rotate-180 {
    transform: rotate(180deg);
}

/* Color Cycle for Pro */
.pro-color-cycle {
    color: var(--primary);
}

/* Shine effect for input wrapper */
.shine-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    animation: shineWave 3s infinite linear;
    pointer-events: none;
    z-index: 5;
}

@keyframes shineWave {
    0% {
        left: -150%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

/* Animated Motto Theme */
.animate-motto {
    background: linear-gradient(270deg, var(--primary), #10b981, #8b5cf6, var(--primary));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: mottoGlow 8s ease infinite;
}

@keyframes mottoGlow {
    0% {
        background-position: 0% 50%;
        opacity: 0.8;
    }

    50% {
        background-position: 100% 50%;
        opacity: 1;
    }

    100% {
        background-position: 0% 50%;
        opacity: 0.8;
    }
}

/* Bulletproof Native Tooltip Styles */
.custom-tooltip {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    margin-bottom: 0.5rem;
    visibility: hidden;
    opacity: 0;
    width: 16rem;
    padding: 0.75rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--muted);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    pointer-events: none;
    text-transform: none;
    font-weight: 400;
    white-space: normal;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.custom-tooltip.math-tooltip {
    width: 18rem;
    padding: 1rem;
    top: 100%;
    bottom: auto;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.tooltip-trigger:hover .custom-tooltip {
    visibility: visible;
    opacity: 1;
}

.tooltip-trigger:focus .custom-tooltip,
.tooltip-trigger:active .custom-tooltip {
    visibility: visible;
    opacity: 1;
}