/* ===== فونت و تنظیمات پایه ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #2d3748;
    direction: rtl;
}

.container {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    max-width: 1100px;
    width: 100%;
    padding: 30px 35px;
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
}

/* ===== هدر و تایتل ===== */
.hero {
    text-align: center;
    margin-bottom: 30px;
}
.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.hero p {
    font-size: 1.1rem;
    color: #4a5568;
    margin-top: 8px;
}

h2, h3 {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 18px;
}
h2 {
    font-size: 1.8rem;
    border-bottom: 3px solid #e2e8f0;
    padding-bottom: 12px;
}
h3 {
    font-size: 1.4rem;
}

/* ===== دکمه‌ها ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none !important;
    background: #edf2f7;
    color: #2d3748;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4292 100%);
}
.btn-secondary {
    background: #48bb78;
    color: #fff;
}
.btn-secondary:hover {
    background: #38a169;
}
.btn-danger {
    background: #fc8181;
    color: #fff;
}
.btn-danger:hover {
    background: #f56565;
}
.btn-block {
    width: 100%;
    display: block;
}
.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* ===== فرم‌ها ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 15px 0;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
select {
    padding: 12px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.25s ease;
    width: 100%;
    background: #f7fafc;
    color: #2d3748;
}
input:focus, select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.15);
    background: #fff;
}
select {
    appearance: auto;
    background: #f7fafc;
    cursor: pointer;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.expiry-row label {
    font-weight: 500;
    color: #4a5568;
    margin-left: 5px;
}
.expiry-row input[type="number"] {
    width: 90px;
    flex-shrink: 0;
}
.expiry-row select {
    width: 110px;
    flex-shrink: 0;
}
.expiry-row .hint {
    font-size: 0.85rem;
    color: #718096;
    margin-right: 5px;
}

/* ===== باکس احراز هویت (ورود/ثبت‌نام) ===== */
.auth-box {
    max-width: 450px;
    margin: 0 auto;
    padding: 10px 0;
}
.auth-box p {
    text-align: center;
    margin-top: 15px;
    color: #4a5568;
}
.auth-box a {
    color: #667eea;
    font-weight: 500;
    text-decoration: none;
}
.auth-box a:hover {
    text-decoration: underline;
}

/* ===== پیام‌ها ===== */
.error, .message {
    padding: 14px 20px;
    border-radius: 14px;
    margin: 15px 0;
    font-weight: 500;
    border-right: 6px solid transparent;
}
.error {
    background: #fff5f5;
    color: #c53030;
    border-right-color: #fc8181;
}
.message {
    background: #ebf8ff;
    color: #2b6cb0;
    border-right-color: #63b3ed;
}

/* ===== بخش کوتاه‌سازی ===== */
.shorten-form {
    background: #f7fafc;
    padding: 25px 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* ===== فیلد لینک اصلی ===== */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    direction: ltr; /* چپ‌چین */
}

.input-wrapper .input-icon {
    position: absolute;
    right: 15px;
    color: #a0aec0;
    font-size: 1rem;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 45px 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.25s ease;
    background: #fff;
    color: #2d3748;
    direction: ltr; /* چپ‌چین */
    text-align: left; /* چپ‌چین */
}

.input-wrapper input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.12);
}

/* ===== فیلد کد دلخواه ===== */
.custom-code-group {
    margin-bottom: 20px;
}

.custom-code-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    transition: 0.25s ease;
    overflow: hidden;
    direction: ltr; /* چپ‌چین */
    max-width: 500px;
}

.custom-code-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.12);
}

/* دامنه در سمت چپ */
.domain-prefix {
    padding: 12px 16px;
    background: #f7fafc;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    border-right: 2px solid #e2e8f0;
    direction: ltr; /* چپ‌چین */
    flex-shrink: 0;
}

/* فیلد ورودی در سمت راست */
.custom-code-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 0.95rem;
    font-family: inherit;
    background: transparent;
    color: #2d3748;
    min-width: 80px;
    direction: ltr; /* چپ‌چین */
    text-align: left; /* چپ‌چین */
}

.custom-code-input:focus {
    outline: none;
}

.custom-code-input::placeholder {
    color: #a0aec0;
    direction: rtl; /* پلیس‌هولدر راست‌چین برای فارسی */
    text-align: right;
    font-size: 0.85rem;
}

.custom-code-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #718096;
}

.custom-code-hint i {
    color: #667eea;
    font-size: 0.85rem;
}

/* ===== دکمه کوتاه‌سازی (کوچک‌تر در دسکتاپ) ===== */
.btn-shorten {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    margin-top: 5px;
    transition: all 0.3s ease;
    width: fit-content;
    min-width: 100px;
    justify-content: center;
}

.btn-shorten i {
    font-size: 0.9rem;
}

.btn-shorten:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.35);
}

/* ===== جدول لینک‌ها ===== */
.links-list {
    overflow-x: auto;
    margin-top: 10px;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    font-size: 0.95rem;
}
th {
    background: #edf2f7;
    color: #2d3748;
    font-weight: 600;
    padding: 12px 15px;
    text-align: right;
    border-radius: 12px 12px 0 0;
}
td {
    padding: 14px 15px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}
tr:last-child td {
    border-bottom: none;
}
tr.expired td {
    opacity: 0.65;
    background: #fef2f2;
}
tr.expired td a {
    color: #a0aec0;
    text-decoration: line-through;
}
td.original-url {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.empty-msg {
    text-align: center;
    color: #718096;
    padding: 30px 0;
    font-size: 1.1rem;
}

/* ===== هدر داشبورد ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}
.nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== پروفایل ===== */
.profile-info {
    background: #f7fafc;
    padding: 20px 25px;
    border-radius: 16px;
    margin: 15px 0;
    border: 1px solid #e2e8f0;
}
.profile-info p {
    font-size: 1.05rem;
    padding: 6px 0;
}
.change-password {
    margin-top: 30px;
    border-top: 2px solid #e2e8f0;
    padding-top: 25px;
}
.change-password form {
    max-width: 450px;
}

/* ===== لینک کوتاه و آیکون‌ها ===== */
.short-link-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.short-link {
    font-weight: 500;
    color: #4a6cf7;
    word-break: break-all;
}
.link-actions {
    display: flex;
    gap: 5px;
}
.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 1.1rem;
    color: #4a5568;
    transition: 0.2s;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon-btn:hover {
    background: #edf2f7;
    color: #2d3748;
    transform: scale(1.1);
}
.icon-btn i {
    pointer-events: none;
}

/* ===== لینک اصلی ===== */
td.original-url {
    max-width: 250px;
    word-break: break-all;
    white-space: normal;
    line-height: 1.5;
}

/* ===== دکمه‌های عملیات ===== */
.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ===== مودال QR ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}
.modal-content {
    background: #fff;
    padding: 30px 35px;
    border-radius: 28px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    direction: rtl;
}
.modal-close {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #a0aec0;
    transition: 0.2s;
    line-height: 1;
}
.modal-close:hover {
    color: #e53e3e;
    transform: rotate(90deg);
}
.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #1a202c;
}
.modal-content h3 i {
    color: #4a6cf7;
    margin-left: 8px;
}
.qr-url-display {
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #e2e8f0;
    word-break: break-all;
    font-size: 0.95rem;
}
.qr-url-display span {
    flex: 1;
    text-align: right;
    color: #2d3748;
}
.qr-image-wrapper {
    background: #fff;
    padding: 10px;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
    display: inline-block;
    margin-bottom: 20px;
}
#qrImage {
    max-width: 250px;
    height: auto;
    display: block;
    border-radius: 8px;
}
.modal-content .btn {
    width: 100%;
    padding: 12px;
    font-size: 1.05rem;
}

/* ===== ریسپانسیو (جدول کارت‌گونه از 820px به پایین) ===== */
@media (max-width: 820px) {
    .container {
        padding: 20px 18px;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .header {
        flex-direction: column;
        align-items: stretch;
    }
    .nav {
        justify-content: center;
    }
    .expiry-row {
        flex-wrap: wrap;
    }
    .expiry-row input[type="number"],
    .expiry-row select {
        width: 100%;
        flex-shrink: 1;
    }
    .shorten-form .btn {
        align-self: stretch;
    }
    .actions {
        flex-direction: column;
        align-items: center;
    }
    .auth-box {
        max-width: 100%;
    }

    /* ===== تبدیل جدول به کارت ===== */
    .links-list {
        overflow-x: visible !important;
    }
    .table-wrapper {
        overflow-x: visible !important;
    }
    table {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }
    thead {
        display: none;
    }
    tbody {
        display: block;
        width: 100%;
    }
    tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        padding: 12px 15px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px dashed #edf2f7;
        background: transparent !important;
        border: none;
    }
    td:last-child {
        border-bottom: none;
    }
    td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #4a5568;
        margin-left: 10px;
        flex-shrink: 0;
        font-size: 0.85rem;
    }
    td.original-url {
        max-width: 100%;
        word-break: break-all;
        white-space: normal;
    }
    .short-link-wrapper {
        flex-wrap: wrap;
    }
    /* دکمه‌های عملیات به‌صورت افقی و کوچک */
    td[data-label="عملیات"] {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 4px;
    }
    .action-buttons {
        flex-direction: row;
        gap: 4px;
        width: auto;
        flex-wrap: wrap;
    }
    .action-buttons .btn {
        width: auto;
        padding: 4px 10px;
        font-size: 0.75rem;
        border-radius: 30px;
        white-space: nowrap;
    }
    
    /* ===== ریسپانسیو برای کد دلخواه (تبلت و موبایل) ===== */
    .custom-code-wrapper {
        max-width: 100%;
    }
    
    /* ===== دکمه در تبلت ===== */
    .btn-shorten {
        width: 100% !important;
        justify-content: center;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ===== تنظیمات ریسپانسیو برای کد دلخواه (موبایل) ===== */
@media (max-width: 600px) {
    .container {
        padding: 15px 12px;
        border-radius: 18px;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    input, select {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    .modal-content {
        padding: 20px;
    }
    #qrImage {
        max-width: 180px;
    }
    .qr-url-display {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    .qr-url-display span {
        width: 100%;
        text-align: center;
    }
    
    /* ===== کد دلخواه در موبایل: کنار هم (افقی) ===== */
    .custom-code-wrapper {
        flex-wrap: nowrap !important;
        direction: ltr;
        max-width: 100%;
    }
    
    .custom-code-input {
        flex: 1;
        padding: 10px 12px;
        text-align: left;
        direction: ltr;
        order: 2;
        border-bottom: none;
        font-size: 0.9rem;
        min-width: 60px;
    }
    
    .custom-code-input::placeholder {
        text-align: right;
        font-size: 0.8rem;
    }
    
    .domain-prefix {
        flex-shrink: 0;
        padding: 10px 12px;
        font-size: 0.85rem;
        border-right: 2px solid #e2e8f0;
        border-top: none;
        order: 1;
        width: auto;
    }
    
    .btn-shorten {
        width: 100% !important;
        justify-content: center;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ===== تنظیمات اضافی برای موبایل‌های بسیار کوچک ===== */
@media (max-width: 480px) {
    .container {
        padding: 12px 10px;
        border-radius: 16px;
    }
    .custom-code-input {
        font-size: 0.8rem;
        padding: 8px 10px;
        min-width: 50px;
    }
    .domain-prefix {
        font-size: 0.75rem;
        padding: 8px 10px;
    }
}

/* ===== قابلیت‌های رمز ===== */
.password-row {
    margin-top: 5px;
}
.password-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
}
.password-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
#passwordField {
    margin-top: 5px;
}
.password-input {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.25s ease;
    background: #f7fafc;
    color: #2d3748;
}
.password-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.15);
    background: #fff;
}

/* ===== فرم ورود رمز در index.php ===== */
.password-form-box {
    max-width: 450px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: center;
}
.password-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}
.password-form-box h2 {
    border-bottom: none;
    text-align: center;
}
.password-hint {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1rem;
}
.password-link-display {
    background: #f7fafc;
    padding: 10px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    word-break: break-all;
    font-size: 0.95rem;
    color: #2d3748;
}
.password-link-display i {
    color: #667eea;
}
.password-form {
    max-width: 100%;
}

/* ===== مودال تغییر رمز ===== */
.password-modal-content {
    max-width: 450px !important;
}
.password-info {
    background: #f7fafc;
    padding: 15px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    text-align: right;
}
.password-info p {
    margin: 5px 0;
    word-break: break-all;
}
.password-info p:last-child {
    margin-bottom: 0;
}
#currentPasswordDisplay {
    color: #4a5568;
    font-size: 0.95rem;
}
#currentPasswordStars {
    font-family: monospace;
    letter-spacing: 2px;
    color: #2d3748;
}

/* ===== انیمیشن مودال ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================================
   استایل‌های لندینگ پیج
   ============================================================ */

/* ===== کانتینر لندینگ ===== */
.landing-container {
    max-width: 1200px;
    padding: 20px 30px;
}

/* ===== هدر لندینگ ===== */
.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a202c;
    text-decoration: none;
}
.logo-icon {
    font-size: 2rem;
}
.logo-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}
.landing-nav a:not(.btn) {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
    font-size: 0.95rem;
}
.landing-nav a:not(.btn):hover {
    color: #667eea;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #2d3748;
    cursor: pointer;
    padding: 5px;
}

/* ===== منوی موبایل ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: #fff;
    box-shadow: -4px 0 30px rgba(0,0,0,0.1);
    padding: 30px 25px;
    z-index: 1000;
    flex-direction: column;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}
.mobile-menu.active {
    display: flex;
    transform: translateX(0);
}
.mobile-menu-close {
    align-self: flex-start;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #4a5568;
}
.mobile-menu a:not(.btn) {
    color: #2d3748;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f7;
}
.mobile-menu .btn {
    text-align: center;
}

/* ===== بخش قهرمان ===== */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    padding: 40px 0 60px;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1 1 500px;
}

.hero-badge {
    display: inline-block;
    background: rgba(102, 126, 234, 0.12);
    color: #667eea;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1a202c;
    margin-bottom: 20px;
}
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #4a5568;
    line-height: 1.8;
    max-width: 520px;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
    border-radius: 50px;
}
.btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #2d3748;
}
.btn-outline:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}
.btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.4);
    color: #fff;
}
.btn-outline-light:hover {
    border-color: #fff;
    transform: translateY(-2px);
    background: rgba(255,255,255,0.1);
}

.hero-stats {
    display: flex;
    gap: 40px;
}
.stat-item {
    text-align: center;
}
.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
}
.stat-label {
    font-size: 0.9rem;
    color: #718096;
}

/* ===== تصویر قهرمان ===== */
.hero-image {
    flex: 1 1 400px;
    display: flex;
    justify-content: center;
}
.hero-illustration {
    background: linear-gradient(145deg, #f7fafc, #edf2f7);
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.06);
    width: 100%;
    max-width: 450px;
}

.illustration-card {
    background: #fff;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}
.illustration-url {
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 10px;
    margin-bottom: 15px;
}
.url-label {
    display: block;
    font-size: 0.75rem;
    color: #a0aec0;
    margin-bottom: 4px;
}
.url-text {
    font-size: 0.9rem;
    color: #2d3748;
    direction: ltr;
    display: block;
    text-align: left;
}
.illustration-arrow {
    text-align: center;
    font-size: 1.8rem;
    margin: 10px 0;
    color: #667eea;
}
.illustration-result {
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 10%, #764ba2 100%);
    border-radius: 10px;
    color: #fff;
}
.result-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 4px;
}
.result-text {
    font-size: 1.1rem;
    font-weight: 600;
    direction: ltr;
    display: block;
    text-align: left;
}
.result-icons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.icon-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
}

/* ===== بخش امکانات ===== */
.features-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-tag {
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}
.section-header h2 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
}
.section-header p {
    color: #4a5568;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 25px;
}

.feature-card {
    background: #fff;
    padding: 28px 24px;
    border-radius: 18px;
    border: 1px solid #edf2f7;
    transition: all 0.3s ease;
    text-align: center;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.06);
    border-color: #667eea;
}
.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
}
.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
}

/* ===== بخش نحوه کار ===== */
.how-it-works-section {
    padding: 60px 0;
    background: #f7fafc;
    border-radius: 28px;
    margin: 20px 0;
    padding: 60px 40px;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.step-card {
    background: #fff;
    padding: 30px 25px;
    border-radius: 18px;
    text-align: center;
    flex: 1 1 200px;
    max-width: 260px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #edf2f7;
    transition: 0.3s;
}
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.06);
}
.step-number {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.step-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.step-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}
.step-card p {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.6;
}
.step-arrow {
    font-size: 2rem;
    color: #a0aec0;
    font-weight: 300;
}

/* ===== بخش CTA ===== */
.cta-section {
    margin: 40px 0;
    padding: 50px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 28px;
    text-align: center;
    color: #fff;
}
.cta-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}
.cta-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 25px;
}
.cta-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}
.cta-actions .btn-primary {
    background: #fff;
    color: #667eea;
}
.cta-actions .btn-primary:hover {
    background: #f7fafc;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* ===== فوتر ===== */
.landing-footer {
    padding: 30px 0 15px;
    border-top: 1px solid #edf2f7;
    margin-top: 20px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-brand .logo-text {
    font-weight: 700;
    font-size: 1.3rem;
}
.footer-brand p {
    font-size: 0.85rem;
    color: #718096;
    margin-right: 10px;
}
.footer-links {
    display: flex;
    gap: 20px;
}
.footer-links a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
}
.footer-links a:hover {
    color: #667eea;
}
.footer-copy p {
    font-size: 0.85rem;
    color: #a0aec0;
}

/* ===== ریسپانسیو لندینگ ===== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.6rem;
    }
    .hero-section {
        flex-direction: column;
        text-align: center;
    }
    .hero-subtitle {
        max-width: 100%;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .hero-image {
        width: 100%;
    }
    .hero-illustration {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .landing-nav {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .mobile-menu {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-stats {
        gap: 25px;
    }
    .stat-number {
        font-size: 1.6rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }
    .feature-card {
        padding: 20px 16px;
    }
    
    .steps-container {
        flex-direction: column;
        gap: 15px;
    }
    .step-arrow {
        transform: rotate(90deg);
    }
    .step-card {
        max-width: 100%;
        width: 100%;
    }
    
    .cta-section {
        padding: 35px 20px;
    }
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .landing-container {
        padding: 12px 15px;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .hero-stats {
        flex-direction: column;
        gap: 10px;
    }
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
    .section-header h2 {
        font-size: 1.8rem;
    }
}

/* ===== بخش بوکمارکت ===== */
.bookmarklet-section {
    margin: 40px 0 30px;
    padding: 20px 0;
    position: relative;
}

.bookmarklet-section .section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}
.bookmarklet-section .section-header p {
    color: #4a5568;
    font-size: 1.05rem;
}

.bookmarklet-box {
    background: linear-gradient(145deg, #f7fafc, #edf2f7);
    border-radius: 24px;
    padding: 35px 30px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

/* ===== فلش پس‌زمینه ===== */
.bookmarklet-box::after {
    content: "⬇";
    position: absolute;
    bottom: 20px;
    left: 30px;
    font-size: 8rem;
    opacity: 0.08;
    transform: rotate(-15deg);
    pointer-events: none;
    font-weight: 300;
    color: #667eea;
}

.bookmarklet-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.bookmarklet-icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: -10px;
}

.bookmarklet-text h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
}

.bookmarklet-text p {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

.bookmarklet-hint {
    font-size: 0.85rem !important;
    color: #718096 !important;
    margin-top: 8px !important;
    background: #ebf8ff;
    padding: 8px 16px;
    border-radius: 50px;
    display: inline-block;
}

.bookmarklet-hint i {
    color: #667eea;
    margin-left: 6px;
}

/* ===== دکمه کشیدنی بوکمارکت ===== */
.bookmarklet-button {
    margin: 5px 0 10px;
}

.bookmarklet-drag-btn {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(102,126,234,0.35);
    transition: 0.3s ease;
    cursor: grab;
    user-select: none;
    border: 2px solid rgba(255,255,255,0.2);
}

.bookmarklet-drag-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(102,126,234,0.45);
}

.bookmarklet-drag-btn:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.bookmarklet-drag-btn i {
    margin-left: 8px;
}

/* ===== فلش راهنما ===== */
.bookmarklet-arrow {
    font-size: 2rem;
    color: #667eea;
    animation: bounceDown 1.5s infinite;
    opacity: 0.6;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
    .bookmarklet-box {
        padding: 25px 18px;
    }
    .bookmarklet-text h3 {
        font-size: 1.3rem;
    }
    .bookmarklet-drag-btn {
        padding: 12px 28px;
        font-size: 1rem;
    }
    .bookmarklet-box::after {
        font-size: 5rem;
        bottom: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .bookmarklet-box {
        padding: 20px 14px;
    }
    .bookmarklet-text h3 {
        font-size: 1.1rem;
    }
    .bookmarklet-text p {
        font-size: 0.9rem;
    }
    .bookmarklet-drag-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .bookmarklet-box::after {
        font-size: 4rem;
        bottom: 5px;
        left: 5px;
    }
}

/* ============================================================
   استایل‌های صفحه پشتیبانی (support.php)
   ============================================================ */

/* ===== بخش سوالات متداول ===== */
.faq-section {
    margin: 40px 0 50px;
}
.faq-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}
.faq-section .section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    border-bottom: none;
}
.faq-section .section-header p {
    color: #4a5568;
    font-size: 1.05rem;
}

.faq-accordion {
    max-width: 850px;
    margin: 0 auto;
}
.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: 0.3s ease;
    background: #fff;
}
.faq-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 12px rgba(102,126,234,0.08);
}
.faq-item.active {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102,126,234,0.12);
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
    gap: 15px;
}
.faq-question:hover {
    background: #f7fafc;
}
.faq-question h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
    flex: 1;
}
.faq-question .faq-icon {
    font-size: 1.2rem;
    color: #667eea;
    transition: 0.3s ease;
    flex-shrink: 0;
}
.faq-item.active .faq-question .faq-icon {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 24px;
}
.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 24px 20px;
}
.faq-answer p {
    color: #4a5568;
    font-size: 0.98rem;
    line-height: 1.8;
    margin: 0;
}
.faq-answer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}
.faq-answer a:hover {
    text-decoration: underline;
}

/* ===== بخش تماس با ما ===== */
.contact-section {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 24px;
    padding: 50px 40px;
    margin: 40px 0 30px;
    border: 1px solid #e2e8f0;
}
.contact-section .section-header {
    text-align: center;
    margin-bottom: 35px;
}
.contact-section .section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    border-bottom: none;
}
.contact-section .section-header p {
    color: #4a5568;
    font-size: 1.05rem;
}
.contact-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}
.contact-form {
    flex: 2;
    min-width: 280px;
}
.contact-info {
    flex: 1;
    min-width: 220px;
    background: #fff;
    padding: 30px 25px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.contact-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 15px;
}
.contact-info .info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
}
.contact-info .info-item:last-child {
    border-bottom: none;
}
.contact-info .info-item i {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102,126,234,0.1);
    border-radius: 50%;
    color: #667eea;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.contact-info .info-item span {
    color: #4a5568;
    font-size: 0.95rem;
}
.contact-info .social-links {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.contact-info .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #edf2f7;
    color: #4a5568;
    transition: 0.3s;
    font-size: 1.1rem;
    text-decoration: none;
}
.contact-info .social-links a:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
}

/* ===== فرم تماس ===== */
.contact-form .form-group {
    margin-bottom: 18px;
}
.contact-form .form-group label {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 5px;
    font-size: 0.95rem;
}
.contact-form .form-group input,
.contact-form .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.25s ease;
    background: #fff;
    color: #2d3748;
}
.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.12);
}
.contact-form .form-group textarea {
    resize: vertical;
    min-height: 120px;
}
.contact-form .btn {
    padding: 14px 40px;
    font-size: 1rem;
    border-radius: 50px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
    .contact-section {
        padding: 30px 20px;
    }
    .contact-wrapper {
        flex-direction: column;
    }
    .faq-question {
        padding: 14px 18px;
    }
    .faq-question h4 {
        font-size: 0.95rem;
    }
    .faq-answer p {
        font-size: 0.9rem;
    }
    .contact-info .info-item {
        padding: 8px 0;
    }
    .contact-info .info-item span {
        font-size: 0.9rem;
    }
}
@media (max-width: 480px) {
    .faq-question h4 {
        font-size: 0.88rem;
    }
    .contact-section .section-header h2 {
        font-size: 1.5rem;
    }
    .contact-info .social-links a {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* ============================================================
   استایل‌های تضمینی برای فرم کوتاه‌سازی مهمان
   ============================================================ */

/* ===== بخش کلی ===== */
.guest-shorten-section {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 40px 30px;
    border-radius: 20px;
    margin: 30px 0 50px;
    border: 2px dashed #667eea;
    text-align: center;
}

.guest-shorten-section h2 {
    font-size: 1.6rem;
    color: #1a202c;
    margin-bottom: 8px;
    border-bottom: none;
}

.guest-shorten-section .subtitle {
    color: #4a5568;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* ===== فرم ===== */
.guest-shorten-section .guest-form {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.guest-shorten-section .guest-form input[type="url"] {
    flex: 1;
    min-width: 200px;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1rem;
    background: #fff;
    direction: ltr;
    text-align: left;
    transition: 0.25s ease;
}

.guest-shorten-section .guest-form input[type="url"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.guest-shorten-section .guest-form .btn {
    padding: 14px 32px;
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.guest-shorten-section .guest-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.guest-shorten-section .guest-form .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== باکس نتیجه ===== */
.guest-result-box {
    margin: 20px auto 0;
    max-width: 550px;
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 2px solid #d4edda;
    animation: fadeInUp 0.5s ease;
    display: none;
}

.guest-result-box.visible {
    display: block;
}

.guest-result-box .result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.guest-result-box .result-header .title {
    font-weight: 600;
    color: #155724;
    font-size: 1.1rem;
}

.guest-result-box .result-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.guest-result-box .result-link .link-text {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3748;
    word-break: break-all;
    direction: ltr;
    text-align: left;
}

.guest-result-box .result-link .link-text a {
    color: #4a6cf7;
    text-decoration: none;
}

.guest-result-box .result-link .link-text a:hover {
    text-decoration: underline;
}

.guest-result-box .result-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.guest-result-box .result-actions .action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #4a5568;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.guest-result-box .result-actions .action-btn:hover {
    background: #edf2f7;
    color: #2d3748;
    transform: scale(1.05);
}

.guest-result-box .result-actions .action-btn.copy-btn {
    color: #4a6cf7;
}

.guest-result-box .result-actions .action-btn.copy-btn:hover {
    background: #ebf4ff;
    color: #3b5de7;
}

.guest-result-box .result-actions .action-btn.qr-btn {
    color: #ed8936;
}

.guest-result-box .result-actions .action-btn.qr-btn:hover {
    background: #fffaf0;
    color: #dd6b20;
}

.guest-result-box .result-note {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.guest-result-box .result-note i {
    color: #667eea;
}

/* ===== خطا ===== */
.guest-error {
    background: #fff5f5;
    color: #c53030;
    padding: 14px 20px;
    border-radius: 12px;
    margin-top: 12px;
    border-right: 4px solid #fc8181;
    display: none;
}

.guest-error.visible {
    display: block;
}

/* ===== توضیحات پایین ===== */
.guest-note {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 12px;
}

.guest-note i {
    color: #667eea;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 600px) {
    .guest-shorten-section .guest-form {
        flex-direction: column;
        align-items: stretch;
    }

    .guest-shorten-section .guest-form .btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }

    .guest-result-box .result-link {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .guest-result-box .result-link .link-text {
        text-align: center;
    }

    .guest-result-box .result-actions {
        justify-content: center;
    }
}

/* ===== انیمیشن ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   استایل‌های بخش بالای داشبورد
   ============================================================ */

.dashboard-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #f7fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.dashboard-welcome h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
    border-bottom: none;
}

.dashboard-subtitle {
    color: #4a5568;
    font-size: 0.95rem;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 600px) {
    .dashboard-top-bar {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    .dashboard-welcome h2 {
        font-size: 1.2rem;
    }
    .dashboard-actions {
        width: 100%;
        justify-content: center;
    }
    .dashboard-actions .btn {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================================
   استایل‌های مودال (وسط‌چین شده در صفحه نمایش)
   ============================================================ */

/* استایل‌های مودال */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

.modal-content {
    background: #ffffff;
    padding: 30px 25px;
    border-radius: 24px;
    max-width: 420px;
    width: 92%;
    text-align: center;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    direction: rtl;
    max-height: 90vh;
    overflow-y: auto;
    /* حذف margin: auto برای جلوگیری از تداخل در flexbox والد */
}

.qr-url-display {
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #e2e8f0;
    word-break: break-all;
    font-size: 0.95rem;
}

.qr-url-display span {
    flex: 1;
    text-align: right;
    color: #2d3748;
}

.qr-image-wrapper {
    background: #fff;
    padding: 10px;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
    display: inline-block;
    margin-bottom: 20px;
}

#qrImage {
    max-width: 220px;
    height: auto;
    display: block;
    border-radius: 8px;
}

.modal-content .btn {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    background: #5b3b8c; /* بنفش طبق تصویر */
    color: #fff;
    transition: background 0.2s;
}

.modal-content .btn:hover {
    background: #4a2d73;
}

/* استایل مودال تغییر رمز */
.password-modal-content {
    max-width: 480px !important;
}

.password-info {
    background: #f7fafc;
    padding: 15px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    text-align: right;
}

.password-info p {
    margin: 5px 0;
    word-break: break-all;
}

.password-info p:last-child {
    margin-bottom: 0;
}

#currentPasswordDisplay {
    color: #4a5568;
    font-size: 0.95rem;
}

#currentPasswordStars {
    font-family: monospace;
    letter-spacing: 2px;
    color: #2d3748;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================================================
   استایل‌های صفحه هشدار امنیتی (warning.php)
   ============================================================ */

.warning-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.warning-container h2 {
    border-bottom: none;
}

.warning-container .btn {
    align-items: center;
    gap: 8px;
}

@media (max-width: 600px) {
    .warning-container {
        padding: 20px;
        margin: 20px 15px;
    }
    .warning-container form {
        flex-direction: column;
    }
    .warning-container form .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== نوار ابزار عملیات گروهی ===== */
.links-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bulk-actions span {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.bulk-actions .btn {
    padding: 5px 12px;
    font-size: 0.8rem;
}

.bulk-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#selectedCount {
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
    text-align: center;
}

#loadAllLinksBtn, #loadAllLinksBtnBottom {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .links-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .bulk-actions {
        justify-content: center;
    }
    #loadAllLinksBtn, #loadAllLinksBtnBottom {
        width: 100%;
        justify-content: center;
    }
}

/* ===== استایل ستون شماره و انتخاب در موبایل ===== */
@media (max-width: 820px) {
    td[data-label="شماره"] {
        justify-content: center;
    }
    td[data-label="انتخاب"] {
        justify-content: center;
    }
    td[data-label="شماره"]::before {
        content: "شماره";
    }
    td[data-label="انتخاب"]::before {
        content: "انتخاب";
    }
}

/* ============================================================
   استایل‌های تاگل لینک / یادداشت
   ============================================================ */

.content-type-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #f7fafc;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    max-width: 280px;
    position: relative;
}

.content-type-toggle .toggle-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.content-type-toggle .toggle-btn i {
    font-size: 1.1rem;
}

.content-type-toggle .toggle-btn:hover {
    color: #2d3748;
}

.content-type-toggle .toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.content-type-toggle .toggle-btn.active i {
    color: #fff;
}

/* ===== ریسپانسیو تاگل ===== */
@media (max-width: 600px) {
    .content-type-toggle {
        max-width: 100%;
        padding: 5px;
        border-radius: 14px;
    }
    
    .content-type-toggle .toggle-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    
    .content-type-toggle .toggle-btn i {
        font-size: 0.95rem;
    }
}

@media (max-width: 400px) {
    .content-type-toggle .toggle-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .content-type-toggle .toggle-btn i {
        font-size: 0.8rem;
    }
}

/* ===== استایل فیلد یادداشت ===== */
#noteField textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: #2d3748;
    transition: 0.25s ease;
    resize: vertical;
    min-height: 150px;
    line-height: 1.8;
}

#noteField textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

#noteField textarea::placeholder {
    color: #a0aec0;
    direction: rtl;
    text-align: right;
}

#noteField small {
    display: block;
    color: #718096;
    font-size: 0.8rem;
    margin-top: 6px;
}

/* ===== استایل‌های صفحه نمایش یادداشت (note.php) ===== */
.note-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.note-container .note-content {
    font-size: 1.05rem;
    line-height: 2.2;
    color: #2d3748;
    padding: 10px 5px;
    word-wrap: break-word;
    text-align: justify;
    text-justify: inter-word;
}

.note-container .note-content p {
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    .note-container {
        padding: 20px 15px;
        margin: 15px 10px;
    }
    
    .note-container .note-content {
        font-size: 0.95rem;
        line-height: 2;
    }
}

/* ===== استایل ستون نوع در جدول ===== */
td .type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.type-badge-note {
    background: #ebf8ff;
    color: #2b6cb0;
}

.type-badge-url {
    background: #f0fff4;
    color: #276749;
}