* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'poppins', vazirmatn;  
}

body {
    background: linear-gradient(-45deg, #353535, #584a30, #3d3321, #1E1E1EDE, #493d28, #000);
    color: #faf3e3;
    height: 350vh;
    direction: rtl;
    background-size: 400% 400%;
    animation: gradientMove 10s ease-in-out infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body[lang='en'] {
    direction: ltr;
}

.container {
    max-width: 800px;
    margin: 2em auto;
    padding: 0 1em;
}

.box {
    background: linear-gradient(145deg, #23201b 0%, #2a2a2a 100%);
    padding: 2.5em;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(199, 164, 108, 0.1);
    position: relative;
    overflow: hidden;
}

.box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c7a46c, #e6b17a, #c7a46c);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.header {
    text-align: center;
    margin-bottom: 2em;
    position: relative;
    padding-top: 3em;
}

.language-toggle {
    top: -69.9px;
    text-decoration: rtl !important;
    max-width: fit-content;
    background: linear-gradient(
        145deg,
        rgba(199, 164, 108, 0.15),
        rgba(199, 164, 108, 0.05)
    );
    border: 2px solid rgba(199, 164, 108, 0.3);
    border-radius: 25px;
    padding: 0.8em 1.5em;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    color: #c7a46c;
    display: flex;
    align-items: center;
    gap: 0.5em;
    box-shadow: 0 2px 8px rgba(199, 164, 108, 0.1);
    min-width: 120px;
    justify-content: center;
}

.language-toggle:hover {
    background: linear-gradient(
        145deg,
        rgba(199, 164, 108, 0.25),
        rgba(199, 164, 108, 0.15)
    );
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 164, 108, 0.2);
    border-color: rgba(199, 164, 108, 0.5);
}

.language-toggle:active {
    transform: translateY(0);
}

.language-toggle i {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.language-toggle:hover i {
    transform: rotate(180deg);
}

body[lang='en'] .language-toggle {
    left: 0;
    right: auto;
}

h1 {
    color: #c7a46c;
    text-align: center;
    margin-bottom: 0.5em;
    font-size: 2.2em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ip-info,
.notice {
    background: linear-gradient(145deg, #1e1b17 0%, #2a2a2a 100%);
    border: 1px solid rgba(199, 164, 108, 0.2);
    padding: 1.2em;
    border-radius: 15px;
    margin: 1.5em 0;
    font-size: 0.95em;
    line-height: 1.7em;
    position: relative;
    overflow: hidden;
}

.ip-info::before,
.notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #c7a46c, #e6b17a);
}

.ip-info p,
.notice p {
    margin: 0.8em 0;
    font-size: medium;
}

.ip-info i {
    color: #e0ae77;
    margin-left: 0.5em;
    font-size: 1.1em;
}

body[lang='en'] .ip-info i {
    margin-left: 0;
    margin-right: 0.5em;
}

.form-group {
    margin: 1.5em 0;
}

textarea {
    width: 100%;
    padding: 1em;
    border-radius: 12px;
    border: 2px solid rgba(199, 164, 108, 0.2);
    font-size: 1em;
    background: linear-gradient(145deg, #1e1b17 0%, #2a2a2a 100%);
    color: #faf3e3;
    resize: vertical;
    min-height: 120px;
    font-family: 'Fira Code', monospace;
}

textarea:focus {
    outline: none;
    border-color: #c7a46c;
    box-shadow: 0 0 0 3px rgba(199, 164, 108, 0.1);
    transform: translateY(-2px);
}

textarea::placeholder {
    color: rgba(250, 243, 227, 0.6);
}

button {
    width: 100%;
    padding: 1em 2em;
    border-radius: 12px;
    border: none;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(145deg, #c7a46c, #e6b17a);
    color: #23201b;
    margin-top: inherit;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(199, 164, 108, 0.3);
}

button:active {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

button i {
    font-size: 1.1em;
}

.progress-container {
    margin: 2em 0;
    background: rgba(30, 27, 23, 0.5);
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c7a46c, #e6b17a);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.result-box {
    background: linear-gradient(145deg, #1e1b17 0%, #2a2a2a 100%);
    border: 1px solid rgba(199, 164, 108, 0.2);
    padding: 1.5em;
    border-radius: 15px;
    margin: 1.5em 0;
    position: relative;
}

.result-box code {
    background: rgba(0, 0, 0, 0.3);
    padding: 1em;
    border-radius: 8px;
    display: block;
    word-break: break-all;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 1em 0;
    border: 1px solid rgba(199, 164, 108, 0.1);
}

.copy-btn {
    background: linear-gradient(145deg, #4caf50, #45a049);
    margin-top: 1em;
    font-size: 0.9em;
    padding: 0.8em 1.5em;
}

.copy-btn:hover {
    background: linear-gradient(145deg, #45a049, #4caf50);
}

#domain-list {
    list-style: none;
    margin: 1em 0;
}

#domain-list li {
    background: rgba(30, 27, 23, 0.5);
    margin: 0.5em 0;
    padding: 0.8em 1em;
    border-radius: 8px;
    border-left: 4px solid rgba(199, 164, 108, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#domain-list li:hover {
    background: rgba(30, 27, 23, 0.8);
    transform: translateX(5px);
}

.checkmark {
    color: #4caf50;
    font-weight: bold;
}

.crossmark {
    color: #f44336;
    font-weight: bold;
}

.spinner {
    display: inline-block;
    margin-right: 0.5em;
}

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

.spinner svg {
    animation: rotate-spinner 1s linear infinite;
}

.footer {
    text-align: center;
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid rgba(199, 164, 108, 0.1);
}

.github-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    padding: 0.8em 1.5em;
    background: rgba(199, 164, 108, 0.1);
    border-radius: 25px;
    margin-bottom: 1em;
}

.github-link:hover {
    background: rgba(199, 164, 108, 0.2);
    transform: translateY(-2px);
}

.github-link img {
    width: 24px;
    height: 24px;
    margin-left: 0.5em;
    border-radius: 50%;
}

body[lang='en'] .github-link img {
    margin-left: 0;
    margin-right: 0.5em;
}

.copyright {
    font-size: 0.85em;
    color: rgba(250, 243, 227, 0.6);
    margin-top: 1em;
}

@media (max-width: 768px) {
    .container {
        margin: 1em auto;
        padding: 0 0.5em;
    }

    .box {
        padding: 1.5em;
    }

    h1 {
        font-size: 1.8em;
    }

    .language-toggle {
        position: relative;
        margin-bottom: 1em;
        top: auto;
        right: auto;
        left: auto;
        width: fit-content;
        margin: 0 auto 1em auto;
    }

    body[lang='en'] .language-toggle {
        left: auto;
    }

    .header {
        padding-top: 1em;
    }
}

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

.box {
    animation: fadeIn 0.6s ease-out;
}

@keyframes successPulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.checkmark {
    animation: successPulse 0.6s ease-in-out;
}