


.range-container {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.input-group input {
    width: 90px;
    height: 44px;
    padding: 0 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 20px;
    text-align: center;
    direction: ltr;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
    outline: none;
}

.action-btn {
    padding: 11px 22px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s, transform 0.2s;
}

.action-btn:hover {
    background-color: #27ae60;
    transform: translateY(-1px);
}

 /**************************************************************** */


.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Vazirmatn", sans-serif;
  color: #f5f5dc;
  font-weight: 600;
  cursor: pointer;
}

.switch input {
  display: none;
}

/* خودِ سوییچ */
.slider {
  position: relative;
  width: 52px;
  height: 28px;
  background-color: #555;
  border-radius: 34px;
  transition: background-color 0.3s;
  box-shadow: 0 0 6px rgba(0,0,0,0.3) inset;
}

/* دایره متحرک داخلش */
.slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background-color: #ddd;
  border-radius: 50%;
  transition: transform 0.3s;
}

/* حالت روشن */
.switch input:checked + .slider {
  background-color: #28a745; /* سبز */
}

.switch input:checked + .slider::before {
  transform: translateX(24px);
  background-color: #fff;
}

/* متن کنار سوییچ */
.switch-label {
  text-shadow: 0 0 8px #000;
}


/* ******************<!--  برای قسمت ساختمانها  -->  ********************************* */


#buildingPage {
    font-family: 'Vazirmatn', sans-serif;
}

.section-title {
    color: #ffd86b;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    background: #555;
    padding: 15px;
    border-radius: 10px;
}

.game-card {
    background: #6b6b6b;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: 0.2s;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

.game-card:hover {
    background: #787878;
    transform: scale(1.03);
}

.game-card input {
    display: none;
}

/* نام ساختمان */
.game-card .b-name {
    display: block;
    margin-bottom: 6px;
}

/* شماره ساختمان (badge) */
.game-card .b-id {
    background: #333;
    padding: 3px 7px;
    border-radius: 5px;
    color: #ffd86b;
    font-size: 13px;
    font-weight: 600;
}

/* وقتی تیک خورد */
.game-card:has(input:checked) {
    background: #315e31;
    border-color: #4caf50;
    transform: scale(1.05);
}

.game-card:has(input:checked) .b-name {
    color: #7cff7c;
}

.game-card:has(input:checked) .b-id {
    background: #2f7d32;
    color: white;
}

.mini-note {
    color: red;
    margin-top: 12px;
    font-weight: bold;
}

/******************************* استایل  هیستوری آهنگری ********************************* */





.ahangari-history-wrapper {
  margin-top: 12px;
  max-width: 100%;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  color: #ccc;
}

.history-header button {
  background: #2b2b2b;
  border: 1px solid #444;
  color: #ffb3b3;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.history-header button:hover {
  background: #3a3a3a;
  color: #ff8080;
}

#ahangariHistory {
  width: 100%;
  min-height: 140px;
  max-height: 260px;
  resize: vertical;

  background: #0f0f0f;
  color: #9cff9c;
  border: 1px solid #333;
  border-radius: 10px;

  padding: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  font-family: Consolas, monospace;

  overflow-y: auto;
}

*
{
    box-sizing: border-box;
}


.topbar {
    background: linear-gradient(90deg, #6f4a1f, #8b5e29);
    color: white;
    padding: 17px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 2px;
    background: #5e3c18;
    padding: 8px;
    border-bottom: 3px solid #cfa45d;
}

.tab {
    background: linear-gradient(180deg, #a3723c, #845623);
    color: #fff8ec;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    transition: .25s;
    font-size: 14px;
    user-select: none;
    border: 1px solid rgba(255,255,255,.08);
}

.tab:hover {
    background: linear-gradient(180deg, #bb874d, #97642b);
}

.tab.active {
    background: linear-gradient(180deg, #f0c777, #d6a34e);
    color: #3f2a11;
    font-weight: bold;
    box-shadow: inset 0 -3px 0 #fff1c7;
}

.page {
    display: none;
    padding: 24px;
    animation: fade .25s ease-in-out;
}

.page.active {
    display: block;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 920px;
    margin: 0 auto;
}

.box {
    background: rgba(255, 248, 229, 0.95);
    border: 1px solid #d8bc86;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 20px rgba(86, 56, 20, 0.12);
}

.section-title {
    margin-top: 0;
    margin-bottom: 25px;
    color: #11491d !important; /* رنگ طلایی متن */
    font-size: 22px;
    font-weight: bold;
     position: relative;
    display: inline-block;
    padding-bottom: 10px;
}
 

 


label {
    display: block;
    margin: 12px 0 6px;
    font-size: 14px;
    font-weight: bold;
    color: #5a3a14;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    border: 1px solid #d6bb8b;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 14px;
    background: #fffdf7;
    outline: none;
    transition: .2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: #b6863e;
    box-shadow: 0 0 0 3px rgba(207,164,93,.18);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

button {
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: .2s;
    background-clip: padding-box;
    background-size: auto;
    background-color: #bd3d3d;
}

.btn-primary {
    background: linear-gradient(180deg, #d8ac5d, #bf8f43);
    color: #2d1e0c;
    background: green;
    font-size: 24px;
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(180deg, #a7a7a7, #8a8a8a);
    color: yellow;
    background: red;
}

.btn-secondary:hover {
    filter: brightness(1.05);
}

.btn-info {
    background: linear-gradient(180deg, #8cc1d6, #5d9bb3);
    color: #10242b;
}

.btn-info:hover {
    filter: brightness(1.05);
}

.btn-search {
    background: linear-gradient(180deg, #9dd18e, #74af63);
    color: #163113;
}
.btn-search:hover {
    filter: brightness(1.25);
}

.btn-Selectall {
    background: linear-gradient(180deg, #9dd18e, #74af63);
    color: yellow;
}

.btn-search2 {
    background: linear-gradient(900deg, #1dd18e, #24af63);
    color: #263113;
}
.btn-search2:hover {
    filter: brightness(1.25);
}

.btn-resource {
    background: linear-gradient(180deg, #c6e18a, #8fbe4f);
    color: #24350f;
}

.btn-resource:hover {
    filter: brightness(1.05);
}

.villages-title {
    margin-top: 22px;
    margin-bottom: 10px;
    font-size: 18px;
    color: #5a3912;
}

.village-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.village-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: linear-gradient(180deg, #fffef8, #f6ebcf);
    border: 1px solid #d8be8d;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 3px 8px rgba(83, 58, 23, 0.08);
    transition: .2s;
}

.village-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(83, 58, 23, 0.14);
    border-color: #c79b56;
}

.village-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.5;
}

.village-name {
    font-size: 14px;
    font-weight: bold;
    color: #4a3010;
}

.village-id {
    font-size: 12px;
    color: #7c6340;
}

.village-card input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #b98a3f;
    cursor: pointer;
    flex-shrink: 0;
}

.status-box {
    margin-top: 8px;
    font-size: 13px;
    color: #6c4b1d;
    line-height: 1.7;
    background: #fff9ea;
    border: 1px dashed #d4b06a;
    border-radius: 10px;
    padding: 10px 12px;
    white-space: pre-line;
}

.placeholder-page {
    background: rgba(255, 248, 229, 0.95);
    border: 1px solid #d8bc86;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(86, 56, 20, 0.12);
    text-align: center;
    color: #6a4a20;
    font-size: 18px;
}

.mini-note {
    margin-top: 4px;
    font-size: 12px;
    color: #846741;
}

.mini-note-red {
    margin-top: 4px;
    font-size: 14px;
    color: red;
}

.auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.auto-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .page {
        padding: 14px;
    }

    .box,
    .placeholder-page {
        padding: 16px;
        border-radius: 12px;
    }

    .tab {
        font-size: 13px;
        padding: 10px 14px;
    }

    .btn-row,
    .auto-actions {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}
 
 
 .login-layout {
    display: grid;
    grid-template-columns: 1fr 380px; /* سمت لاگ ثابت و سمت فرم انعطاف‌پذیر */
    gap: 16px;
    align-items: start;
}

.login-left {
    min-width: 0;
}

.login-log {
    min-width: 0;
}

.login-log textarea {
    width: 100%;
    min-height: 220px;
    max-height: 360px;
    overflow: auto;
}

@media (max-width: 900px){
    .login-layout {
        grid-template-columns: 1fr;
    }
}



/******************************* استایل  هیستوری آهنگری ********************************* */



.log-box {
    width: 100%;
    height: 450px;
    background: #f7f7f7;
    border: 1px solid #ccc;
    padding: 10px;
    overflow-y: auto;
    font-family: monospace;
    white-space: pre-wrap;
}

.log-box-build{
    height: 450px;
    overflow: auto;
    background: #111;
    color: #ddd;
    padding: 12px;
    border: 1px solid #444;
    font-size: 13px;
    line-height: 1.5;
}


/******************************* زمان سرور   ********************************* */

.server-time-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6); /* پس‌زمینه نیمه‌شفاف مشابه بازی */
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-family: Tahoma, sans-serif;
    font-size: 16px;
    font-weight: bold;
    width: fit-content;
    border: 1px solid #444;
}

.weather-icon {
    width: 24px;
    height: 24px;
}

.label {
    direction: rtl;
}

/**************تیک گلد طلایی ***************************/


/* کانتینر اصلی */
.gold-checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-family: Tahoma, sans-serif;
    user-select: none;
}

/* مخفی کردن چک‌باکس اصلی */
.gold-checkbox-container input {
    display: none;
}

/* ساخت باکس طلایی */
.checkmark {
    width: 20px;
    height: 20px;
    background-color: #f1c40f; /* رنگ طلایی */
    border: 2px solid #d4af37; /* حاشیه طلایی تیره */
    border-radius: 4px;
    display: inline-block;
    position: relative;
    margin-left: 10px;
}

/* استایل تیک (وقتی چک‌باکس تیک خورده است) */
.gold-checkbox-container input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid black;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* افکت جذاب برای حالت تیک خورده */
.gold-checkbox-container input:checked + .checkmark {
    background: linear-gradient(135deg, yellow, green);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}
/****************************استایل دکمه توقف *******************************/
.red-danger-btn {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    margin: 10px 0;
}

.red-danger-btn:hover {
    background: linear-gradient(145deg, #ff5e4d, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.4);
}

.red-danger-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/**************************استایل  آدرس ورود به بازی  *******************************/
/* تنظیم عرض و ارتفاع باکس اصلی */
/* استایل برای بهبود ظاهر کامبو و اینپوت */
#my-url-select, #url {
    width: 300px;
    padding: 8px 12px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    direction: ltr; /* اینجا چپ‌چین شد */
    text-align: left;
}

#my-url-select:focus, #url:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}


/***********************************************************/
.modal-overlay {
	    font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.7); display: flex; justify-content: center;
        align-items: center; z-index: 9999; opacity: 0; visibility: hidden;
        transition: all 0.4s ease;
    }
    .modal-overlay.active { opacity: 1; visibility: visible; }
    
    /* بدنه پنجره */
    .modal-content {
        background: #1e1e1e; color: #fff; width: 80%; max-width: 500px;
        padding: 20px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.5);
        display: flex; flex-direction: column; max-height: 80vh;
    }
    
    /* بخش اسکرول‌خور */
    .scrollable-text {
        overflow-y: auto; padding: 10px; margin-bottom: 20px;
        border: 1px solid #333; background: #000; border-radius: 5px;
    }
	
	
/***********************************************************/

   .modal-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
  }
  .modal-overlay.active{ display: flex; }

  .modal-content{
    width: min(900px, 95vw);
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
  }

  .scrollable-text{
    max-height: 65vh;
    overflow: auto;
    border: 1px solid #eee;
    padding: 12px;
    border-radius: 10px;
    margin: 10px 0 14px;
    line-height: 1.9;
  }
 

/***********************************************************/
/* --- فیکس اختصاصی بخش نیروها --- */
 

/***********************************************************/
/***********************************************************/
/***********************************************************/
/***********************************************************/

