@font-face {
    font-family: 'RDR';
    src: url('rdr.ttf') format('truetype');
}

:root {
    --primary: #FF8B00;
    --secondary: #374BFF;
    --text: #FFFFFF;
    --background: #212121;
    --card-bg: rgba(255, 139, 0, 0.1);
    --hover-color: #FF8B00;
    --accent: #FF8B00;
    --shadow-color: rgba(255, 139, 0, 0.3);
}

[data-theme="light"] {
    --background: #F4F5F7;
    --text: #000000;
    --card-bg: rgba(55, 75, 255, 0.1);
    --hover-color: #374BFF;
    --accent: #374BFF;
    --shadow-color: rgba(55, 75, 255, 0.3);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background); /* تنظیم رنگ پس زمینه */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
    opacity: 1; /* در ابتدا نمایان است */
}

.loading-screen.hide {
    opacity: 0; /* هنگامی که کلاس hide اضافه می‌شود، صفحه لودینگ محو می‌شود */
    pointer-events: none; /* جلوگیری از تعامل با صفحه */
}

.loading-box {
    width: 60px;
    height: 60px;
    position: relative;
    animation: rotate 2s linear infinite;
}

.inner-box {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--accent);
    border-radius: 4px;
    animation: rotate 1.5s linear infinite;
}

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

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}



/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.3s ease;
}

/* Header Styling */
header {
    background-color: var(--background);
    padding: 1rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--accent);
}

.english-text {
    font-family: 'RDR', sans-serif;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    background-color: var(--card-bg);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.logo {
    font-size: 1.8rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 2px 2px 4px var(--shadow-color);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

#ipInput {
    width: 200px;
    height: 36px;
    border-radius: 12px;
    padding: 8px;
    background-color: var(--background);
    border: 1px solid var(--accent);
    margin-top: 1rem;
    color: #fff;
}

/* Main Content Styling */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: center;
}

/* Button Styling */
button {
    background-color: var(--accent);
    border: 1px solid var(--accent);
    color: var(--background);
    padding: 0.5rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: var(--background);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

/* Result Section */
.result {
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--accent);
    box-shadow: 0 4px 15px var(--shadow-color);
}

/* Footer Styling */
.footer {
    display: none; /* فوتر در ابتدا مخفی است */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links {
    list-style-type: none;
    padding: 0;
}

.footer-links li {
    display: inline;
    margin-right: 20px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-family: 'RDR', sans-serif;
}

.footer-links a:hover {
    color: var(--hover-color);
}

.footer-social .donate-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
}

.footer-social .donate-btn:hover {
    background-color: var(--background);
}

.footer-bottom {
    margin-top: 20px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* مخفی کردن هدر در سایز موبایل */
    header {
        display: none;
    }

    /* نمایش فوتر در سایز موبایل */
    .footer {
        display: block; /* فوتر در موبایل نمایش داده می‌شود */
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        margin-bottom: 10px;
    }

    .footer-links li {
        display: block;
        margin-bottom: 10px;
    }

    .footer-social {
        margin-top: 10px;
    }

    .footer-social .donate-btn {
        padding: 12px 24px;
    }
}
