*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url('../img/village.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center center;
    overscroll-behavior: none;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    margin: 0;
    padding: 0;
}

body::after {
    content: "";
    position: fixed;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-style: solid;
    border-image-source: url(../img/bp.webp);
    border-image-slice: 48 fill;
    border-image-repeat: stretch;
    border-image-width: 35px;
    pointer-events: none;
    z-index: 100;
}

.box {
    width: 100%;
    max-width: 100%;
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.box::before {
    content: '';
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
    width: 270px;
    height: 108px;
    background-image: url('../img/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.5));
    z-index: 10;
}

.box::after {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 275px;
    height: 95px;
    pointer-events: none;
    z-index: 9;
    background: radial-gradient(ellipse at 30% 35%,
            #d4af5a 0%,
            #b8903a 30%,
            #6b4c2c 70%,
            #3a2a1a 100%);
    border: 4px solid #e8c86a;
    outline: 3px solid #4a2a1a;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
}

@media (min-width: 450px) {
    body {
        padding: 20px 0;
    }

    .box {
        width: 100%;
        max-width: 420px;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        z-index: 1;
        margin: 0 auto;
    }
}

.loginForm {
    width: 100%;
    padding: 20px 40px;
    background: linear-gradient(145deg, #2a1f1a 0%, #1a1210 100%);
    direction: rtl;
    color: #e8d8b0;
    text-align: center;
    margin: 0;
    border: 4px solid #90663F;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.6),
        0 10px 25px rgba(0, 0, 0, 0.4),
        0 0 0 1px #000000,
        0 0 0 1px #000000;
    position: relative;
}

.loginForm span {
    margin-top: 63px;
    position: relative;
    top: -15px;
    font-size: 21px;
    display: inline-block;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: #c9aa4f;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0 #2a1a0a;
}

#registerFields input {
    width: 100%;
    padding: 12px 0;
    background: #2a2018;
    outline: none;
    border: 2px solid #6b4c2c;
    font-size: 15px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: #e8d8b0;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.05);
    letter-spacing: 1px;
}

#registerFields input::placeholder {
    font-size: 18px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: #8a7a6a;
}

#registerFields input:-webkit-autofill {
    background-color: #2a2018 !important;
    background-image: none !important;
    color: #e8d8b0 !important;
    -webkit-text-fill-color: #e8d8b0 !important;
    caret-color: #e8d8b0 !important;
    transition: background-color 999999s ease-in-out 0s;
}

#registerFields input:-webkit-autofill::first-line {
    color: #e8d8b0 !important;
}

#registerFields input:focus {
    border-color: #d4af5a;
    background: #35281d;
    transform: scale(1.01);
}

#registerFields input.error {
    border: 2px solid #8b2a1a;
}

#registerFields input.ok {
    border: 2px solid #7a9a3a;
}

.btn {
    background: linear-gradient(180deg, #6b5a3a 0%, #4a3a22 50%, #3a2a1a 100%);
    margin-top: 14px;
    width: 100%;
    height: 50px;
    color: #e8d8b0;
    font-weight: bold;
    padding: 0;
    border: 2px solid #b8903a;
    border-top-color: #e8c86a;
    border-bottom-color: #6b4c2c;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 18px;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 3px;
    text-shadow: 1px 1px 0 #2a1a0a;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: linear-gradient(180deg, #7a6a48 0%, #5a4a2a 50%, #4a3a22 100%);
    border-color: #e8c86a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
    background: linear-gradient(180deg, #4a3a22 0%, #3a2a1a 100%);
}

.btn:disabled {
    background: linear-gradient(180deg, #5a5a4a 0%, #3a3a2a 100%);
    border: 2px solid #8a8a6a;
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled::before {
    display: none;
}

.border_top {
    position: fixed;
    bottom: 70px;
    background: none;
    width: 100%;
    height: 1px;
    border: none;
}

.border_top::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(90deg,
            transparent 0px,
            transparent 15px,
            #b8903a 15px,
            #6b4c2c 20px,
            #b8903a 25px,
            transparent 30px,
            transparent 50px);
}

.hidden {
    display: none;
}

#gameForm .server-select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 0px;
    font-size: 17px;
    background: #2a2018;
    color: #e8d8b0;
    border: 2px solid #6b4c2c;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    outline: none;
    margin-bottom: 15px;
    margin-top: 5px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}

#gameForm .server-select:hover {
    border-color: #d4af5a;
    background: #35281d;
}

.input-group {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 10px;
}

.loginForm,
.loginForm p,
.loginForm span,
#registerFields input,
.btn,
#gameForm .server-select {
    border-radius: 0px !important;
}

#gameForm #zoneSelector {
    width: 100%;
    padding: 12px 15px;
    border-radius: 0px;
    font-size: 17px;
    background-image: url('../img/bgm.webp');
    background-color: #00000075;
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center;
    color: #e8d8b0;
    border: 2px solid #6b4c2c;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-align: center;
    text-align-last: center;
    outline: none;
    box-shadow: inset 0 0 25px black;
    margin-bottom: 15px;
    margin-top: 5px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}

.zone-label {
    display: block;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 16px;
    color: #c9aa4fea;
    text-shadow: 1px 1px 0 #2a1a0a;
    margin-bottom: 1px;
    text-align: center;
    letter-spacing: 1px;
    font-weight: normal;
}

#zoneSelector option {
    background-color: #2a2018;
    color: #e8d8b0;
    padding: 10px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

#zoneSelector option:disabled {
    background-color: #3a2a1a;
    color: #8a7a6a;
}

.zone-hint {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 11px;
    color: #a08a6a;
    text-align: center;
    margin-top: 0px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.creators-footer {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-items: center;
    font-family: "Vazirmatn", sans-serif;
    direction: ltr;
    color: #fff;
    z-index: 1000;
}

.footer-logo {
    border-right: solid 1px rgba(255, 255, 255, 0.250);
    padding-right: 15px;
    margin-right: 25px;
}

.footer-logo img {
    width: 100px;
    height: auto;
    object-fit: contain;
    image-rendering: auto;
}

.creators-footer .label {
    margin-left: 10px;
    font-weight: 300;
    font-size: 15px;
}

.creators-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.creator {
    position: relative;
    margin-left: -10px;
    cursor: pointer;
    transition: transform 0.3s;
}

.creator img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    transition: transform 0.3s, z-index 0.3s, box-shadow 0.3s;
    image-rendering: auto;
}

.creator .info {
    position: absolute;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 10px;
    border-radius: 6px;
    color: #fff;
    white-space: nowrap;
    text-align: center;
    font-size: 12px;
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
    position: relative;
}

.social-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.250);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    padding: 5px 8px;
    padding-right: 5px;
    border-radius: 12px;
    z-index: 1;
    color: white;
    font-size: 14px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.social-bar.hidden-social {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.social-bar a {
    display: flex;
    align-items: center;
}

.social-bar img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    transition: transform 0.2s;
}

.guest-server-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    padding: 10px 0 6px;
}

.guest-info-text {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 18px;
    color: #a08a6a;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.btn-account {
    display: block;
    text-decoration: none;
    text-align: center;
    line-height: 52px;
    height: 52px;
}

.logged-user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #6b4c2c;
    padding: 7px 14px;
    margin-bottom: 12px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 13px;
}

.logged-label {
    color: #c9aa4f;
    letter-spacing: 0.5px;
}

.logged-label strong {
    position: absolute;
    bottom: -2px;
    right: 0;
    color: #e8c86a;
}

.logout-link {
    color: #a08a6a;
    font-size: 12px;
    text-decoration: none;
    margin-left: 5px;
    cursor: pointer;
}

.logout-link:hover {
    color: #ff9a6a;
}

#villageFields input,
#enterVillageFields input {
    width: 100%;
    padding: 12px 0;
    background: #2a2018;
    outline: none;
    border: 2px solid #6b4c2c;
    font-size: 15px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: #e8d8b0;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    margin-bottom: 12px;
    border-radius: 0 !important;
}

#villageFields input::placeholder {
    font-size: 16px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: #8a7a6a;
}

#villageFields input:focus {
    border-color: #d4af5a;
    background: #35281d;
    transform: scale(1.01);
}

#villageFields input.ok {
    border-color: #5a9a3a !important;
}

#villageFields input.error {
    border-color: #8b2a1a !important;
}

#mainContainer {
    height: 100vh;
    width: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    position: relative;
    z-index: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#mainContainer::-webkit-scrollbar {
    display: none;
}

.full-section {
    scroll-snap-align: start;
    width: 100%;
    height: 100vh;
    scroll-snap-stop: always;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.full-section {
    scroll-snap-align: start;
    width: 100%;
    height: 100vh;
    scroll-snap-stop: always;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.site-badges {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    box-sizing: border-box;
    position: fixed;
    bottom: 8px;
    left: 0;
    z-index: 9999;
    background-color: transparent;
    pointer-events: none;
}

.site-badges__link {
    display: block;
    width: clamp(42px, 8vw, 60px);
    height: clamp(42px, 8vw, 60px);
    pointer-events: auto;
    background-image: url("../img/enamad.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
    filter: brightness(0) invert(1);
}

.age-gate {
    display: block;
    width: clamp(38px, 7vw, 54px);
    height: clamp(38px, 7vw, 54px);
    pointer-events: auto;
    background-image: url("../img/16.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.authForm {
    width: 100%;
    padding: 20px 40px;
    background: linear-gradient(145deg, #2a1f1a 0%, #1a1210 100%);
    direction: rtl;
    color: #e8d8b0;
    text-align: center;
    margin: 0;
    border: 4px solid #90663F;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.6),
        0 10px 25px rgba(0, 0, 0, 0.4),
        0 0 0 1px #000000,
        0 0 0 1px #000000;
    position: relative;
}

.form-panel {
    display: none;
}

.form-panel.active {
    display: block;
}

.form-title {
    margin-top: 50px;
    font-size: 20px;
    color: #c9aa4f;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0 #2a1a0a;
    margin-bottom: 16px;
    padding-bottom: 15px;
    font-weight: bold;
    border-bottom: 1px solid #90663F25;
}

.form-error {
    background: rgba(139, 42, 26, 0.25);
    border: 1px solid #8b2a1a;
    color: #ff6b6b;
    font-size: 13px;
    padding: 8px 12px;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.5px;
}

.field-wrap {
    margin-bottom: 11px;
    position: relative;
}

.authForm input[type="text"],
.authForm input[type="email"],
.authForm input[type="password"],
.authForm input[type="number"] {
    width: 100%;
    padding: 11px 0;
    background: #2a2018;
    border: 2px solid #6b4c2c;
    outline: none;
    font-size: 15px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: #e8d8b0;
    text-align: center;
    transition: border-color .2s, background .2s, transform .15s;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5);
    letter-spacing: 1px;
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
}

.authForm input::placeholder {
    font-size: 15px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: #8a7a6a;
}

.authForm input:-webkit-autofill {
    background-color: #2a2018 !important;
    -webkit-text-fill-color: #e8d8b0 !important;
    caret-color: #e8d8b0 !important;
    transition: background-color 999999s ease-in-out 0s;
}

.authForm input:focus {
    border-color: #d4af5a;
    background: #35281d;
    transform: scale(1.01);
}

.authForm input.ok {
    border-color: #5a9a3a !important;
}

.authForm input.error {
    border-color: #8b2a1a !important;
}

.field-msg {
    font-size: 11.5px;
    color: #ff6b6b;
    margin-top: 4px;
    min-height: 16px;
    text-align: right;
    letter-spacing: 0.3px;
    display: none;
}

.field-msg.visible {
    display: block;
}

.age-wrap {
    text-align: right;
}

.field-label {
    display: block;
    font-size: 13px;
    color: #c9aa4fcc;
    margin-bottom: 6px;
    text-align: center;
}

.age-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.age-btn {
    flex: 1;
    padding: 9px 0;
    background: #2a2018;
    border: 2px solid #6b4c2c;
    color: #e8d8b0;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 15px;
    cursor: pointer;
    transition: all .2s;
    border-radius: 0 !important;
    letter-spacing: 1px;
}

.age-btn:hover {
    border-color: #d4af5a;
    background: #35281d;
}

.age-btn.selected {
    background: linear-gradient(180deg, #5a8a2a 0%, #3a6a1a 100%);
    border-color: #7aca3a;
    color: #d4ffb0;
}

.gender-wrap {
    text-align: right;
}

.gender-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.gender-btn {
    flex: 1;
    padding: 9px 0;
    background: #2a2018;
    border: 2px solid #6b4c2c;
    color: #e8d8b0;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 15px;
    cursor: pointer;
    transition: all .2s;
    border-radius: 0 !important;
    letter-spacing: 1px;
}

.gender-btn:hover {
    border-color: #d4af5a;
    background: #35281d;
}

.gender-btn.selected {
    background: linear-gradient(180deg, #8b6b2a 0%, #6b4b1a 100%);
    border-color: #caa83a;
    color: #ffe8b0;
}

.captcha-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-q {
    flex: 0 0 auto;
    font-size: 20px;
    color: #c9aa4f;
    letter-spacing: 4px;
    white-space: nowrap;
    font-weight: bold;
    text-shadow: 1px 1px 0 #2a1a0a, 0 0 2px #00000050;
    position: relative;
    background: #1f1814;
    padding: 6px 14px;
    border: 1px solid #6b4c2c;
    border-radius: 6px;
    transform: rotate(-1deg) scale(1.02);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.5), 0 2px 5px rgba(0,0,0,0.3);
    display: inline-flex;
    gap: 2px;
}

.captcha-q::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: repeating-linear-gradient(90deg, 
        transparent 0px, 
        transparent 6px, 
        #d4af5a 6px, 
        #6b4c2c 10px, 
        transparent 10px, 
        transparent 15px);
    transform: translateY(-50%) rotate(1deg);
    pointer-events: none;
    opacity: 0.7;
}

.captcha-q::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 2px 3px, #00000030 1px, transparent 1px);
    background-size: 6px 6px;
    pointer-events: none;
    border-radius: 6px;
    z-index: 0;
}

.captcha-q span,
.captcha-q {
    position: relative;
    z-index: 1;
}

.captcha-wrap input[type="number"] {
    flex: 1;
    padding: 11px 0;
    -moz-appearance: textfield;
}

.captcha-wrap input::-webkit-outer-spin-button,
.captcha-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.remember-wrap {
    margin-bottom: 11px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a08a6a;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #2a2018;
    border: 2px solid #6b4c2c;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    padding: 0;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5);
}

.remember-label input[type="checkbox"]:checked {
    background: #5a9a3a;
    border-color: #7aca3a;
}

.remember-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #d4ffb0;
    font-size: 13px;
    font-weight: bold;
}

.remember-label input[type="checkbox"]:hover {
    border-color: #d4af5a;
}

.remember-label span {
    line-height: 18px;
}

.switch-text {
    margin-top: 14px;
    font-size: 13px;
    color: #a08a6a;
    letter-spacing: 0.5px;
}

.switch-text a {
    color: #c9aa4f;
    text-decoration: none;
    cursor: pointer;
}

.switch-text a:hover {
    color: #e8c86a;
}

.captcha-refresh-btn {
    position: absolute;
    top: 30px;
    right: 45%;
    background: #3D2B1A;
    border: 1px solid #5C3D2E;
    color: #CBB98A;
    cursor: pointer;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    z-index: 2;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.captcha-refresh-btn svg {
    transition: transform 0.3s ease;
}

.captcha-refresh-btn:active svg {
    transform: rotate(360deg);
    transition: transform 0s;
}