@import "tailwindcss";

@theme {
    --color-main: #000;
    --color-main50: #00000080;
    --color-primary: #97bb72;
    --color-code: #97bb72;
    --color-surface: #181C14;
    --color-darkPrimary: #617847;
    --color-lightPrimary: #1c211c;
    --color-hard: #90ca56;
    --color-secondary: #6a7282;
    --color-cardC: #0a0a0c;
    --color-cardCdarker: #585f70;
    --color-accent: #FBBF24;
    --color-text: #eee;
    --color-dead: #eeeeee;
    --color-bord: #ffffff0d;
    --color-card: #0e0e10;
    --color-codeCard: #1a1a1e;
    --color-lightCard: var(--color-cardC);
    --color-searchHover: #181818;


    --breakpoint-340xl: 340px;
    --breakpoint-380xl: 380px;
    --breakpoint-xxs: 420px;
    --breakpoint-xs: 520px;
    --breakpoint-950xl: 950px;
    --breakpoint-1450xl: 1450px;

    --animate-blink: blink 1s step-end infinite;

    --font-AlimamaShuHeiTi: "AlimamaShuHeiTi",
        "sans-serif";
    --font-Cascadia: "Cascadia",
        "sans-serif";
    --font-atkinson: "AtkinsonHyperlegible-Regular",
        "sans-serif";
    --font-ArabicFont: "ArabicFont",
        "sans-serif";
    --font-Rubik-Regular: "Rubik-Regular",
        "sans-serif";

}

[data-theme="light"] {
    --color-main: #fefefe;
    --color-main50: #ffffff99;
    --color-lightPrimary: #c2d2be;
    --color-surface: #ddf1ca;
    --color-primary: #97bb72;
    --color-code: #418200;
    --color-hard: #90ca56;
    --color-secondary: #6a7282;
    --color-cardC: #f1f2f5;
    --color-cardCdarker: #cbd5e1;
    --color-accent: #FBBF24;
    --color-darkPrimary: #84bd43;
    --color-text: #000000;
    --color-dead: #393939;
    --color-bord: #0000001a;
    --color-card: #e0e2e5;
    --color-codeCard: #d8dadc;
    --color-lightCard: #edeff1;
    --color-searchHover: #cacace;
}


::-moz-selection {
    color: #fff;
    background: #90ca56;
}

::selection {
    color: #fff;
    background: #90ca56;
}

.background-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: fall linear infinite;
}

@layer base {

    @font-face {
        font-family: "AlimamaShuHeiTi";
        src: url("/fonts/AlimamaShuHeiTi.otf");
    }

    @font-face {
        font-family: "AtkinsonHyperlegible-Regular";
        src: url("/fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype");
    }


    @font-face {
        font-family: "Cascadia";
        src: url("/fonts/CascadiaMono-Regular.ttf");
    }

    @font-face {
    font-family: 'ArabicFont';
    src: url('/fonts/ar.otf');
}

@font-face {
    font-family: 'Rubik-Regular';
    src: url('/fonts/Rubik-Regular.ttf');
}

}

@keyframes fall {
    from {
        transform: translateY(-100vh);
        opacity: 1;
    }

    to {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes glitch-wave {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 0;
    }
}

#glitch-line {
    background: repeating-linear-gradient(to right,
            #96bb727e,
            #96bb727c 2px,
            transparent 2px,
            transparent 4px);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#glitch-line.active {
    opacity: 1;
    animation: glitch-wave 0.5s linear infinite;
}

/* Global scrollbar settings */
html {
    overflow-x: hidden;
    scrollbar-color: #888 var(--color-cardC);
    /* Thumb, track color */
    scrollbar-gutter: stable;
    /* Prevents layout shifts */
}

/* WebKit-based browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    /* For horizontal scrollbars */
}

/* Scrollbar track */
::-webkit-scrollbar-track {
    background: var(--color-cardC);
}

/* Scrollbar thumb (the draggable part) */
::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

/* Hover effect */
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Remove scrollbar buttons (arrows) in WebKit */
::-webkit-scrollbar-button {
    display: none;
}

/* Remove scrollbar buttons in Edge & IE */
* {
    -ms-overflow-style: none;
    /* Hides default scrollbar UI */
}

::-webkit-scrollbar-button,
::-webkit-scrollbar-corner {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

@layer base {
    ol {
        list-style-type: decimal;
    }

    ul {
        list-style-type: disc;
    }

    menu {
        list-style-type: disc;
    }
}

.rank-icon {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.rank-1 {
    background-image: url('/icons/ranks/diamond-wood-1.svg');
}

.rank-2 {
    background-image: url('/icons/ranks/diamond-wood-2.svg');
}

.rank-3 {
    background-image: url('/icons/ranks/diamond-wood-3.svg');
}

.rank-4 {
    background-image: url('/icons/ranks/diamond-wood-4.svg');
}

.rank-5 {
    background-image: url('/icons/ranks/diamond-wood-5.svg');
}

.rank-6 {
    background-image: url('/icons/ranks/diamond-wood-6.svg');
}

.rank-7 {
    background-image: url('/icons/ranks/diamond-wood-7.svg');
}

.rank-8 {
    background-image: url('/icons/ranks/diamond-wood-8.svg');
}

.rank-9 {
    background-image: url('/icons/ranks/diamond-wood-9.svg');
}

.rank-10 {
    background-image: url('/icons/ranks/diamond-wood-10.svg');
}

.rank-11 {
    background-image: url('/icons/ranks/diamond-wood-11.svg');
}

.rank-12 {
    background-image: url('/icons/ranks/diamond-wood-12.svg');
}

#notif-toast {
    position: fixed;
    bottom: -3rem;
    left: 0;
    width: 100%;
    padding: 5px;
    min-height: 2rem;
    background-color: var(--color-primary);
    text-align: center;
    line-height: 2rem;
    font-size: 0.9rem;
    transition: bottom 0.3s ease, opacity 0.3s ease;
    z-index: 9997;
    opacity: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 20px;
}

#notif-toast.active {
    bottom: 0;
    opacity: 1;
}

#notif-message {
    color: #000;
    text-align: center;
    font-family: "AtkinsonHyperlegible-Regular";
    z-index: 9999;
}

#notif-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #90ca56;
    transform: scaleX(0);
    transform-origin: left;
    z-index: 9998;
}

#notif-toast.active #notif-progress {
    animation: progress-fill 1s linear forwards;
}

@keyframes progress-fill {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* Hide scrollbar but keep scrolling */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE/Edge */
  scrollbar-width: none;     /* Firefox */
}
