/* ================= فونت‌ها ================= */
@font-face {
    font-family: "YekanBakh";
    src: url("../font/YekanBakh-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "YekanBakh-Black";
    src: url("../font/YekanBakhFaNum-Black.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "YekanBakh", sans-serif; /* فونت پیش‌فرض */
    -webkit-tap-highlight-color: transparent; 
}

/* اعمال فونت ضخیم برای تیترها */
h1, h2, h3, .title, .faq-category-title, th {
    font-family: "YekanBakh-Black", sans-serif;
}

body {
    background: linear-gradient(to bottom, #0f2027, #203a43, #2c5364);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden; 
}

/* ================= ساختار اصلی ================= */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    width: 100%;
}

.card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.title {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: #f5c16c;
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* ================= فرم‌ها و اینپوت‌ها ================= */
.form-group {
    margin-bottom: 1.5rem;
    text-align: right;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-family: "YekanBakh-Black", sans-serif; /* لیبل‌های ضخیم */
}

.required {
    color: #ff5252;
    margin-right: 4px;
}

.form-note {
    font-size: 0.8rem;
    color: #b0b0b0;
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-field:focus {
    border-color: #f5c16c;
    background: rgba(255, 255, 255, 0.1);
}

/* ================= دکمه‌ها ================= */
.actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.9rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1rem;
    font-family: "YekanBakh-Black", sans-serif;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s; 
}

.btn.primary {
    background: #f5c16c;
    color: #1a1a1a;
}
.btn.primary:active { background: #e0ab54; }

.payment-btn {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #00c853, #009624);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.payment-btn:active { background: linear-gradient(135deg, #00b34a, #00801e); }

.payment-btn .price {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: "YekanBakh", sans-serif; /* قیمت با فونت عادی */
}

/* استایل جدید برای دکمه بازگشت در پایین صفحات */
.btn.back-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    margin-top: 1.5rem;
    padding: 0.7rem;
    font-family: "YekanBakh", sans-serif;
}
.btn.back-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

/* ================= جداول ================= */
.result-table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed; 
}

.result-table th, .result-table td {
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    word-wrap: break-word; 
}

.result-table th {
    text-align: right;
    opacity: 0.9;
    width: 50%;
}

.result-table td {
    text-align: left;
    font-family: "YekanBakh-Black", sans-serif; /* نتایج با فونت ضخیم‌تر */
}

.result-image {
    width: 100%;
    max-width: 240px;
    height: auto; 
    margin: 1.5rem auto;
    display: block;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* ================= سوالات متداول و راهنما ================= */
.faq-container, .guide-wrapper, .history-wrapper {
    width: 100%;
    max-width: 600px;
    margin: auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 16px;
}

.faq-category-title {
    font-size: 1.2rem;
    margin: 25px 0 15px;
    border-bottom: 2px solid #f5c16c;
    padding-bottom: 8px;
    color: #f5c16c;
}

.faq-item {
    margin-bottom: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.faq-question {
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-family: "YekanBakh-Black", sans-serif;
    font-size: 0.95rem;
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    line-height: 1.8;
    font-size: 0.9rem;
    text-align: justify;
}

.faq-answer p { margin-bottom: 10px; }

/* ================= بخش راهنمای محاسبات (Guide) ================= */
.guide-wrapper {
    max-width: 850px;
    margin: auto;
    padding: 2rem 1rem 4rem;
}

.guide-header {
    text-align: center;
    margin-bottom: 3rem;
}

.guide-header h1 {
    font-size: 1.9rem;
    margin-bottom: 1rem;
    font-family: "YekanBakh-Black", sans-serif;
}

.guide-header p {
    opacity: 0.85;
    line-height: 2;
}

.guide-section {
    background: rgba(255, 255, 255, 0.06);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    text-align: right;
    line-height: 2;
    transition: background-color 0.3s ease;
}

/* افکت هاور که در نسخه قبلی بود */
.guide-section:hover {
    background: rgba(255, 255, 255, 0.09);
}

.guide-section h2 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #f5c16c;
    font-family: "YekanBakh-Black", sans-serif;
}

.guide-section ul {
    padding-right: 1.2rem;
}

.guide-section li {
    margin-bottom: 0.6rem;
}

.note {
    margin-top: 1rem;
    padding: 0.8rem;
    background: rgba(245, 193, 108, 0.15); /* رنگ طلایی با شفافیت */
    border-radius: 10px;
    font-size: 0.9rem;
    color: #f5c16c;
}

.conversion-grid {
    display: grid;
    gap: 10px;
    margin-top: 1rem;
}

.conversion-grid div {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.8rem;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    font-family: "YekanBakh-Black", sans-serif;
}

.guide-warning {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    background: rgba(255, 82, 82, 0.15);
    color: #ff5252;
    font-weight: bold;
    font-family: "YekanBakh-Black", sans-serif;
}

/* ================= استایل‌های تاریخچه (آکاردئون) ================= */
.history-item {
    margin-bottom: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.history-header {
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-type {
    font-family: "YekanBakh-Black", sans-serif;
    font-size: 1rem;
    color: #f5c16c;
}

.history-date {
    font-size: 0.8rem;
    opacity: 0.7;
}

.history-details {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0, 0, 0, 0.15); /* کمی تیره‌تر برای تمایز */
}

.history-details p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.history-details p:first-child {
    margin-top: 15px;
}
.empty-history {
    text-align: center;
    padding: 2rem;
    opacity: 0.8;
}

/* ================= استایل صفحات خطا و دسترسی ================= */
.access-card {
    max-width: 450px;
    margin: auto;
    border: 1px solid rgba(255, 82, 82, 0.2);
}

.access-img {
    width: 80px; /* سایز استاندارد برای آیکون ضربدر */
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 82, 82, 0.3));
}

.access-danger {
    color: #ff5252 !important;
    font-size: 1.3rem !important;
    margin-bottom: 1rem;
}

.brand-danger {
    color: #ff5252;
    font-family: "YekanBakh-Black", sans-serif;
    background: rgba(255, 82, 82, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

/* بهبود ریسپانسیو برای کارت‌های هشدار */
@media (max-width: 480px) {
    .access-card {
        padding: 1.5rem 1rem;
        width: 95%; /* در موبایل‌های کوچک فضای خالی کناری حفظ شود */
    }
    
    .access-danger {
        font-size: 1.1rem !important;
    }
    
    .subtitle {
        font-size: 0.85rem;
        line-height: 1.7;
    }
}

.history-result-image img {
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.history-result-image img:active {
    transform: scale(1.5); /* زوم شدن عکس هنگام لمس در موبایل */
    z-index: 100;
}