@font-face {
    font-family: 'Pixelpurl';
    src: url('assets/fonts/Pixelpurl-0vBPP.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.logo-text-container {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.logo-text-container img {
    width: 1.5em;
    height: 1.5em;
    vertical-align: center;
    margin: 0;
    padding: 0;
}

.logo-text-container span {
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* 8-Bit Font Style */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
    font-family: 'Pixelpurl', 'Minecraftia', monospace, cursive;
}

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    font-family: 'Pixelpurl', 'Minecraftia', monospace, cursive;
    font-size: 14px;
    line-height: 1.5;
    image-rendering: pixelated;
    cursor: url('assets/cursor/Normal Select 2.cur'), auto;
}

.selectable-text {
    cursor: url('assets/cursor/Text select 54jh.cur'), text;
}

input,
textarea {
    cursor: url('assets/cursor/Text select 54jh.cur'), text;
}

a,
button,
.link-area {
    cursor: url('assets/cursor/Link mano.cur'), text;
}

.resize-vertical {
    resize: vertical;
    cursor: url('assets/cursor/Vertical Resize.cur'), ns-resize;
}

a,
button,
.clickable,
[role="button"],
[onclick] {
    cursor: url('assets/cursor/Link mano.cur'), text;
}

a:hover {
    cursor: url('assets/cursor/Link mano.cur'), text;
}

a:hover,
button:hover,
.clickable:hover,
[role="button"]:hover,
[onclick]:hover {
    cursor: url('assets/cursor/Link mano.cur'), text;
}

*::before,
*::after {
    cursor: url('assets/cursor/Link mano.cur'), text;
}

a:disabled,
button:disabled,
.disabled-area {
    cursor: url('assets/cursor/Link mano.cur'), text;
    /* دکمه یا لینک غیرفعال */
}

::-moz-selection {
    /* Code for Firefox */
    color: #00ffff;
    background: #ff00ff;
}

::selection {
    color: #00ffff;
    background: #ff00ff;
}

html {
    scroll-behavior: smooth;
}

/* Pixel Animation */
@keyframes pixelate {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Pixel Button Style */
.pixel-btn {
    position: relative;
    overflow: hidden;
    border: 4px solid #000;
    box-shadow: 4px 4px 0px #000;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pixel-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

.pixel-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #000;
}

.pixel-btn i {
    display: inline-flex;
    align-items: center;
    /* Remove margin-right and vertical-align */
    margin-right: 0;
    vertical-align: unset;
}

.pixel-btn {
    gap: 0.5em;
}

.pixel-btn span {
    display: inline-flex;
    align-items: center;
    line-height: 1.5;
    padding-top: 0.1em;
    padding-bottom: 0.1em;
}

/* Pixel Border */
.pixel-border {
    border: 4px solid #000;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.3);
    position: relative;
}

.pixel-border:before {
    content: "";
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px dashed #00ffff;
    pointer-events: none;
    animation: border-dance 4s linear infinite;
}

@keyframes border-dance {
    0% {
        border-color: #00ffff;
    }

    25% {
        border-color: #ff00ff;
    }

    50% {
        border-color: #ffff00;
    }

    75% {
        border-color: #00ff00;
    }

    100% {
        border-color: #00ffff;
    }
}

/* Pixel Art Rendering */
.pixel-art {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 4px solid #00ffff;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: #00ffff
    }
}

/* 8-Bit Scrollbar */
.retro-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.retro-scrollbar::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.retro-scrollbar::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 0;
    border: 2px solid #000;
}

/* Pixel Grid Background */
.pixel-grid {
    background:
        linear-gradient(to right, #222 1px, transparent 1px),
        linear-gradient(to bottom, #222 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: 0.2;
}

/* CRT Screen Effect */
.crt-effect:after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 4px 100%;
    pointer-events: none;
    z-index: 100;
}

/* Pixel Progress Bar with Animated Fill */
.pixel-progress {
    height: 32px;
    background-color: #1e1e2e;
    border: 4px solid #000;
    box-shadow: 4px 4px 0px #000;
    overflow: hidden;
    position: relative;
    image-rendering: pixelated;
}

.pixel-fill {
    height: 100%;
    width: 0%;
    color: #000;
    text-align: right;
    padding-right: 8px;
    font-size: 10px;
    font-weight: bold;
    image-rendering: pixelated;
    border-right: 2px solid #000;
    background-size: 40px 100%;
    background-repeat: repeat;
    animation: stripe-move 1s linear infinite;
}

.pixel-fill.purple {
    background-image: repeating-linear-gradient(135deg,
            #b517ff,
            #b517ff 20px,
            #9b00cc 20px,
            #9b00cc 40px);
    border-right-color: #b517ff;
}

.pixel-fill.yellow {
    background-image: repeating-linear-gradient(135deg,
            #fcd34d,
            #fcd34d 20px,
            #d9b600 20px,
            #d9b600 40px);
    border-right-color: #fcd34d;
}

.pixel-fill.pink {
    background-image: repeating-linear-gradient(135deg,
            #ff69b4,
            #ff69b4 20px,
            #cc3385 20px,
            #cc3385 40px);
    border-right-color: #ff69b4;
}

.pixel-fill.cyan {
    background-image: repeating-linear-gradient(135deg,
            #00ffff,
            #00ffff 20px,
            #00bbbb 20px,
            #00bbbb 40px);
    border-right-color: #00ffff;
}

@keyframes stripe-move {
    0% {
        background-position: 0 0;
    }

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

.pixel-box {
    box-shadow: 6px 6px 0 #000;
    image-rendering: pixelated;
}

.pixel-text {
    text-shadow: 3px 3px 0 #ff00ff;
}

@keyframes fadeInUpScroll {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-fade.in-view {
    animation: fadeInUpScroll 0.8s ease-out forwards;
}
