/* استایل‌های حرفه‌ای و ریسپانسیو */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* لودینگ */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a, #1e1e1e);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

#loadingScreen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: clamp(36px, 8vw, 40px);
    height: clamp(36px, 8vw, 40px);
    border: 4px solid #007bff;
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loader p {
    font-size: clamp(12px, 3vw, 14px);
    color: #ffffff;
    letter-spacing: 1px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* مودال احراز هویت */
#authModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.auth-container {
    background: #1e1e1e;
    padding: clamp(15px, 4vw, 20px);
    border-radius: 10px;
    width: 100%;
    max-width: 90vw;
    margin: 0 auto; /* متعادل‌سازی */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
    border: 1px solid #007bff;
}

.auth-toggle {
    display: flex;
    margin-bottom: 15px;
}

.auth-toggle button {
    flex: 1;
    padding: clamp(8px, 2vw, 10px);
    border: none;
    background: #2a2a2a;
    color: #ffffff;
    font-size: clamp(13px, 3.2vw, 15px);
    cursor: pointer;
    transition: background 0.3s;
}

.auth-toggle button.active {
    background: #007bff;
}

.auth-toggle button:hover {
    background: #0056b3;
}

.auth-form input, .auth-form button {
    display: block;
    width: 100%;
    margin: clamp(8px, 2vw, 10px) 0;
    padding: clamp(8px, 2vw, 10px);
    border: none;
    border-radius: 6px;
    font-size: clamp(13px, 3.2vw, 15px);
    background: #2a2a2a;
    color: #ffffff;
}

.auth-form input[type="file"] {
    padding: clamp(6px, 1.5vw, 8px);
}

.auth-form button {
    background: #007bff;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-form button:hover {
    background: #0056b3;
}

.error-message {
    color: #dc3545;
    font-size: clamp(12px, 2.8vw, 13px);
    margin-top: 8px;
}

/* اطلاعات کاربر */
#userInfo {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 10px);
    margin-bottom: 20px;
    background: #1e1e1e;
    padding: clamp(8px, 2vw, 10px);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
}

.profile-pic {
    width: clamp(28px, 6vw, 32px);
    height: clamp(28px, 6vw, 32px);
    border-radius: 50%;
    object-fit: cover;
}

#changeProfileBtn {
    padding: clamp(6px, 1.5vw, 8px) clamp(10px, 2.5vw, 12px);
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(12px, 2.8vw, 13px);
}

#changeProfileBtn:hover {
    background: #0056b3;
}

#localTime {
    font-size: clamp(12px, 2.8vw, 13px);
    color: #b3b3b3;
}

/* تیکر */
#ticker {
    background: #1e1e1e;
    padding: clamp(6px, 1.5vw, 8px);
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
}

#tickerContent {
    display: inline-block;
    animation: ticker 20s linear infinite;
}

.ticker-item {
    display: inline-block;
    margin-right: 20px;
    font-size: clamp(13px, 3.2vw, 15px);
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* لیست علاقه‌مندی‌ها */
#favoritesList {
    margin-bottom: 20px;
    padding: clamp(10px, 2.5vw, 15px);
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
}

.favorite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(8px, 2vw, 10px);
    border-bottom: 1px solid #333;
    transition: background 0.2s;
}

.favorite-item:hover {
    background: #2a2a2a;
}

/* مودال آلرت */
#customAlertModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#customAlertContent {
    background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
    padding: clamp(15px, 4vw, 20px);
    border-radius: 10px;
    width: 100%;
    max-width: 90vw;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
    border: 1px solid #007bff;
}

#customAlertContent h2 {
    margin-bottom: 10px;
    font-size: clamp(18px, 4.5vw, 20px);
}

#customAlertContent p {
    margin-bottom: 15px;
    font-size: clamp(13px, 3.2vw, 15px);
}

#customAlertClose {
    padding: clamp(8px, 2vw, 10px) clamp(16px, 4vw, 20px);
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(13px, 3.2vw, 15px);
}

/* ناوبری */
nav {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 2vw, 10px);
    margin-bottom: 20px;
    width: 100%;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    padding: clamp(8px, 2vw, 10px) clamp(12px, 3vw, 15px);
    border-radius: 6px;
    font-size: clamp(13px, 3.2vw, 15px);
    transition: background 0.3s;
}

.nav-link.active, .nav-link:hover {
    background: #007bff;
}

.nav-link.external {
    background: #2a2a2a;
}

.nav-link.external:hover {
    background: #0056b3;
}

#logoutBtn {
    padding: clamp(8px, 2vw, 10px) clamp(16px, 4vw, 20px);
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(13px, 3.2vw, 15px);
}

#logoutBtn:hover {
    background: #c82333;
}

/* سایر استایل‌ها */
#appContainer {
    width: 100%;
    max-width: 95vw;
    margin: 0 auto;
    padding: clamp(10px, 2.5vw, 15px);
}

#totalMarketCap {
    background: #1e1e1e;
    padding: clamp(10px, 2.5vw, 12px);
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: clamp(14px, 3.5vw, 16px);
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
}

#searchInput {
    width: 100%;
    max-width: 90vw;
    padding: clamp(8px, 2vw, 10px);
    margin-bottom: 20px;
    border: none;
    border-radius: 6px;
    background: #1e1e1e;
    color: #ffffff;
    font-size: clamp(13px, 3.2vw, 15px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-left: auto;
    margin-right: auto;
}

#refreshBtn {
    padding: clamp(8px, 2vw, 10px) clamp(16px, 4vw, 20px);
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(13px, 3.2vw, 15px);
    margin-bottom: 20px;
    width: 100%;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
}

#refreshBtn:hover {
    background: #218838;
}

.content-section {
    margin-bottom: 20px;
    display: none;
    width: 100%;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
}

.content-section.active {
    display: block;
}

/* جدول */
.table-container {
    width: 100%;
    max-width: 95vw;
    overflow-x: hidden;
    margin: 0 auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

th, td {
    padding: clamp(8px, 2vw, 10px);
    text-align: left;
    font-size: clamp(11px, 2.8vw, 13px);
}

th {
    background: #007bff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: clamp(10px, 2.5vw, 12px);
}

tr:nth-child(even) {
    background: #2a2a2a;
}

.crypto-icon {
    width: clamp(18px, 4vw, 20px);
    height: clamp(18px, 4vw, 20px);
    border-radius: 50%;
    margin-right: clamp(4px, 1vw, 6px);
    vertical-align: middle;
}

.positive { color: #28a745; }
.negative { color: #dc3545; }

.fav-btn, .notify-btn, .remove-fav-btn, .edit-alert-btn, .delete-alert-btn {
    padding: clamp(6px, 1.5vw, 8px) clamp(10px, 2.5vw, 12px);
    margin: 0 4px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    font-size: clamp(11px, 2.8vw, 13px);
}

.fav-btn { background: #007bff; }
.fav-btn:hover { background: #0056b3; }
.notify-btn { background: #ffc107; }
.notify-btn:hover { background: #e0a800; }
.remove-fav-btn { background: #dc3545; }
.remove-fav-btn:hover { background: #c82333; }
.edit-alert-btn { background: #17a2b8; }
.edit-alert-btn:hover { background: #138496; }
.delete-alert-btn { background: #dc3545; }
.delete-alert-btn:hover { background: #c82333; }

#alertsList {
    margin-bottom: 20px;
    padding: clamp(10px, 2.5vw, 15px);
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(8px, 2vw, 10px);
    border-bottom: 1px solid #333;
}

#alertsError {
    color: #dc3545;
    font-size: clamp(12px, 2.8vw, 13px);
    margin-top: 8px;
    text-align: center;
}

#cryptoModal, #priceAlertModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 998;
}

.modal-content, #priceAlertForm {
    background: #1e1e1e;
    padding: clamp(15px, 4vw, 20px);
    border-radius: 10px;
    width: 100%;
    max-width: 90vw;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#closeModal {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
    font-size: clamp(16px, 4vw, 18px);
    color: #ffffff;
}

#priceAlertForm input, #priceAlertForm button {
    display: block;
    width: 100%;
    margin: clamp(8px, 2vw, 10px) 0;
    padding: clamp(8px, 2vw, 10px);
    border: none;
    border-radius: 6px;
    font-size: clamp(13px, 3.2vw, 15px);
}

#priceAlertForm button {
    background: #28a745;
    color: white;
    cursor: pointer;
}

#priceAlertForm button:hover {
    background: #218838;
}

#priceAlertError {
    color: #dc3545;
    font-size: clamp(12px, 2.8vw, 13px);
    margin-top: 8px;
}

.me {
    color: #00d4ff;
    font-size: clamp(13px, 3.2vw, 15px);
    font-weight: 600;
    text-decoration: none;
    padding: clamp(6px, 1.5vw, 8px) clamp(10px, 2.5vw, 12px);
    border-radius: 4px;
    border: 1px solid #00d4ff;
}

.me:hover {
    background-color: #00d4ff;
    color: #1a1a2e;
}

/* Media Query برای تبلت‌ها */
@media (max-width: 768px) {
    #appContainer {
        padding: clamp(8px, 2vw, 10px);
        max-width: 100%;
        margin: 0 auto;
    }

    /* تبدیل جدول به فرمت کارت */
    .table-container {
        overflow-x: hidden;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 10px;
        border-bottom: 1px solid #333;
        padding: clamp(6px, 1.5vw, 8px);
        background: #2a2a2a;
        border-radius: 6px;
    }

    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: clamp(4px, 1vw, 6px);
        font-size: clamp(9px, 2.2vw, 10px);
        text-align: right;
        border: none;
    }

    td:before {
        content: attr(data-label);
        font-weight: bold;
        width: 40%;
        text-align: left;
        font-size: clamp(9px, 2.2vw, 10px);
    }

    .crypto-icon {
        width: clamp(16px, 3.5vw, 18px);
        height: clamp(16px, 3.5vw, 18px);
        margin-right: clamp(3px, 0.8vw, 4px);
    }

    nav {
        flex-direction: column;
        gap: clamp(6px, 1.5vw, 8px);
        padding: clamp(8px, 2vw, 10px);
        max-width: 95vw;
        margin-left: auto;
        margin-right: auto;
    }

    .nav-link, #logoutBtn, #refreshBtn {
        width: 100%;
        text-align: center;
        padding: clamp(6px, 1.5vw, 8px);
        font-size: clamp(12px, 2.8vw, 13px);
    }

    #userInfo {
        flex-direction: column;
        align-items: flex-start;
        gap: clamp(6px, 1.5vw, 8px);
        max-width: 95vw;
        margin-left: auto;
        margin-right: auto;
    }

    .auth-container, .modal-content, #priceAlertForm, #customAlertContent {
        max-width: 95vw;
        padding: clamp(10px, 2.5vw, 12px);
        margin: 0 auto;
    }

    .favorite-item, .alert-item {
        flex-direction: column;
        align-items: flex-start;
        gap: clamp(6px, 1.5vw, 8px);
        max-width: 95vw;
    }

    .fav-btn, .notify-btn, .remove-fav-btn, .edit-alert-btn, .delete-alert-btn {
        width: 100%;
        padding: clamp(6px, 1.5vw, 8px);
        font-size: clamp(10px, 2.5vw, 11px);
    }

    #ticker {
        max-width: 95vw;
        margin-left: auto;
        margin-right: auto;
    }

    .ticker-item {
        font-size: clamp(11px, 2.5vw, 12px);
        margin-right: 10px;
    }
}

/* موبایل‌های خیلی کوچک */
@media (max-width: 480px) {
    body {
        padding: clamp(0.3rem, 0.8vw, 0.5rem);
        font-size: clamp(8px, 2vw, 9px);
    }

    #appContainer {
        padding: clamp(6px, 1.5vw, 8px);
    }

    tr {
        margin-bottom: 8px;
        padding: clamp(4px, 1vw, 6px);
    }

    td {
        padding: clamp(3px, 0.8vw, 4px);
        font-size: clamp(8px, 2vw, 9px);
    }

    td:before {
        font-size: clamp(8px, 2vw, 9px);
    }

    .crypto-icon {
        width: clamp(14px, 3vw, 16px);
        height: clamp(14px, 3vw, 16px);
        margin-right: clamp(2px, 0.6vw, 3px);
    }

    nav {
        gap: clamp(4px, 1vw, 6px);
        padding: clamp(6px, 1.5vw, 8px);
    }

    .nav-link, #logoutBtn, #refreshBtn {
        padding: clamp(5px, 1.2vw, 6px);
        font-size: clamp(10px, 2.2vw, 11px);
    }

    #userInfo {
        padding: clamp(6px, 1.5vw, 8px);
        gap: clamp(4px, 1vw, 6px);
    }

    .profile-pic {
        width: clamp(24px, 5vw, 26px);
        height: clamp(24px, 5vw, 26px);
    }

    #changeProfileBtn {
        padding: clamp(5px, 1.2vw, 6px) clamp(8px, 2vw, 10px);
        font-size: clamp(10px, 2.2vw, 11px);
    }

    #localTime {
        font-size: clamp(10px, 2.2vw, 11px);
    }

    .auth-container, .modal-content, #priceAlertForm, #customAlertContent {
        padding: clamp(8px, 2vw, 10px);
        max-width: 98vw;
        margin: 0 auto;
    }

    .favorite-item, .alert-item {
        padding: clamp(6px, 1.5vw, 8px);
        gap: clamp(4px, 1vw, 6px);
    }

    .fav-btn, .notify-btn, .remove-fav-btn, .edit-alert-btn, .delete-alert-btn {
        padding: clamp(5px, 1.2vw, 6px);
        font-size: clamp(9px, 2.2vw, 10px);
    }

    #ticker {
        padding: clamp(5px, 1.2vw, 6px);
        max-width: 98vw;
        margin-left: auto;
        margin-right: auto;
    }

    .ticker-item {
        font-size: clamp(10px, 2.2vw, 11px);
        margin-right: 8px;
    }

    #searchInput {
        padding: clamp(6px, 1.5vw, 8px);
        font-size: clamp(10px, 2.2vw, 11px);
        max-width: 98vw;
        margin-left: auto;
        margin-right: auto;
    }
}

/* برای دسکتاپ‌های بزرگ */
@media (min-width: 1024px) {
    body {
        font-size: clamp(14px, 1.5vw, 16px);
    }

    #appContainer {
        max-width: 1200px; /* عرض مناسب برای دسکتاپ */
        padding: clamp(15px, 2vw, 20px);
    }

    .table-container {
        max-width: 1200px;
        margin: 0 auto;
    }

    table {
        font-size: clamp(14px, 1.5vw, 16px);
    }

    th {
        font-size: clamp(13px, 1.4vw, 15px);
    }

    td {
        font-size: clamp(13px, 1.4vw, 15px);
        padding: clamp(10px, 1.5vw, 12px);
    }

    .crypto-icon {
        width: clamp(24px, 2vw, 26px);
        height: clamp(24px, 2vw, 26px);
    }

    .nav-link, #logoutBtn, #refreshBtn {
        font-size: clamp(14px, 1.5vw, 16px);
        padding: clamp(10px, 1.5vw, 12px) clamp(18px, 2vw, 20px);
    }

    #userInfo {
        max-width: 1200px;
        font-size: clamp(14px, 1.5vw, 16px);
    }

    #changeProfileBtn {
        font-size: clamp(13px, 1.4vw, 15px);
        padding: clamp(8px, 1.2vw, 10px) clamp(12px, 1.8vw, 14px);
    }

    #localTime {
        font-size: clamp(13px, 1.4vw, 15px);
    }

    #ticker {
        max-width: 1200px;
        font-size: clamp(14px, 1.5vw, 16px);
    }

    .ticker-item {
        font-size: clamp(14px, 1.5vw, 16px);
    }

    #searchInput {
        font-size: clamp(14px, 1.5vw, 16px);
        padding: clamp(10px, 1.5vw, 12px);
        max-width: 1200px;
    }

    .auth-container, .modal-content, #priceAlertForm, #customAlertContent {
        max-width: 600px;
        padding: clamp(20px, 2.5vw, 25px);
    }

    .auth-form input, .auth-form button {
        font-size: clamp(14px, 1.5vw, 16px);
        padding: clamp(10px, 1.5vw, 12px);
    }

    #customAlertContent h2 {
        font-size: clamp(20px, 2vw, 22px);
    }

    #customAlertContent p {
        font-size: clamp(14px, 1.5vw, 16px);
    }

    .favorite-item, .alert-item {
        font-size: clamp(14px, 1.5vw, 16px);
        padding: clamp(10px, 1.5vw, 12px);
    }

    .fav-btn, .notify-btn, .remove-fav-btn, .edit-alert-btn, .delete-alert-btn {
        font-size: clamp(13px, 1.4vw, 15px);
        padding: clamp(8px, 1.2vw, 10px) clamp(12px, 1.8vw, 14px);
    }
}
/* متغیرهای CSS با پسوند b */
:root {
    --primary-color-b: #007bff;
    --secondary-color-b: #28a745;
    --error-color-b: #dc3545;
    --background-dark-b: #1e1e1e;
    --text-color-b: #ffffff;
    --shadow-color-b: rgba(0, 0, 0, 0.3);
    --border-color-b: #007bff;
}

/* فوتر */
#footerb {
    background: linear-gradient(135deg, #0a0a0a, #1e1e1e);
    padding: clamp(20px, 5vw, 30px);
    width: 100%;
    max-width: 95vw;
    margin: 0 auto;
    border-top: 1px solid var(--border-color-b);
    box-shadow: 0 -2px 10px var(--shadow-color-b);
    animation: fadeInUp 1s ease-out;
}

.footer-contentb {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: clamp(15px, 3vw, 20px);
    max-width: 1200px;
    margin: 0 auto;
}

.newsletterb {
    flex: 1 1 300px;
    text-align: center;
}

.newsletterb h3 {
    font-size: clamp(16px, 4vw, 18px);
    margin-bottom: 10px;
    color: var(--text-color-b);
}

.newsletterb p {
    font-size: clamp(12px, 3vw, 14px);
    color: #b3b3b3;
    margin-bottom: 15px;
}

.newsletter-formb {
    display: flex;
    gap: clamp(8px, 2vw, 10px);
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-formb input {
    padding: clamp(8px, 2vw, 10px);
    border: none;
    border-radius: 6px;
    background: var(--background-dark-b);
    color: var(--text-color-b);
    font-size: clamp(12px, 3vw, 14px);
    flex: 1;
    transition: box-shadow 0.3s;
}

.newsletter-formb input:focus {
    box-shadow: 0 0 8px var(--primary-color-b);
    outline: none;
}

.subscribe-btnb {
    padding: clamp(8px, 2vw, 10px) clamp(12px, 3vw, 15px);
    background: var(--primary-color-b);
    color: var(--text-color-b);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(12px, 3vw, 14px);
    transition: transform 0.3s, background 0.3s;
}

.subscribe-btnb:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.subscribe-btnb:active {
    transform: scale(0.95);
}

.error-messageb {
    color: var(--error-color-b);
    font-size: clamp(11px, 2.5vw, 12px);
    margin-top: 8px;
}

.social-linksb {
    display: flex;
    gap: clamp(10px, 2.5vw, 15px);
    justify-content: center;
    flex: 1 1 200px;
}

.social-iconb {
    font-size: clamp(18px, 4vw, 20px);
    color: var(--text-color-b);
    background: var(--background-dark-b);
    padding: clamp(8px, 2vw, 10px);
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}

.social-iconb:hover {
    transform: scale(1.2);
    background: var(--primary-color-b);
    box-shadow: 0 0 10px var(--primary-color-b);
}

.footer-navb {
    flex: 1 1 100px;
    text-align: center;
}

.footer-navb a {
    color: var(--text-color-b);
    text-decoration: none;
    font-size: clamp(12px, 3vw, 14px);
    transition: color 0.3s;
}

.footer-navb a:hover {
    color: var(--primary-color-b);
}

.footer-bottomb {
    text-align: center;
    margin-top: clamp(15px, 3vw, 20px);
    font-size: clamp(11px, 2.5vw, 12px);
    color: #b3b3b3;
}

/* مودال About Us */
#aboutModalb {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#aboutModalb.activeb {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-contentb {
    background: var(--background-dark-b);
    padding: clamp(20px, 5vw, 25px);
    border-radius: 10px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 20px var(--shadow-color-b);
    border: 1px solid var(--border-color-b);
    text-align: center;
    animation: slideIn 0.3s ease-in-out;
}

.modal-contentb h2 {
    font-size: clamp(18px, 4.5vw, 20px);
    margin-bottom: 15px;
    color: var(--text-color-b);
}

.modal-contentb p {
    font-size: clamp(13px, 3.2vw, 15px);
    color: #b3b3b3;
    line-height: 1.6;
}

.close-modalb {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: clamp(18px, 4vw, 20px);
    color: var(--text-color-b);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modalb:hover {
    color: var(--primary-color-b);
}

/* انیمیشن‌ها */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Media Query برای موبایل‌ها */
@media (max-width: 768px) {
    .footer-contentb {
        flex-direction: column;
        align-items: center;
        gap: clamp(10px, 2.5vw, 15px);
    }

    .newsletterb {
        flex: 1 1 100%;
    }

    .newsletter-formb {
        flex-direction: column;
        gap: clamp(6px, 1.5vw, 8px);
    }

    .social-linksb {
        flex: 1 1 100%;
    }

    .footer-navb {
        flex: 1 1 100%;
    }

    .modal-contentb {
        max-width: 95vw;
        padding: clamp(15px, 4vw, 20px);
    }
}

/* برای دسکتاپ‌های بزرگ */
@media (min-width: 1024px) {
    #footerb {
        padding: clamp(30px, 4vw, 40px);
    }

    .newsletterb h3 {
        font-size: clamp(20px, 2vw, 22px);
    }

    .newsletterb p {
        font-size: clamp(14px, 1.5vw, 16px);
    }

    .newsletter-formb input, .subscribe-btnb {
        font-size: clamp(14px, 1.5vw, 16px);
        padding: clamp(10px, 1.5vw, 12px);
    }

    .social-iconb {
        font-size: clamp(20px, 2vw, 22px);
        padding: clamp(10px, 1.5vw, 12px);
    }

    .footer-navb a {
        font-size: clamp(14px, 1.5vw, 16px);
    }

    .footer-bottomb {
        font-size: clamp(13px, 1.4vw, 14px);
    }

    .modal-contentb h2 {
        font-size: clamp(22px, 2vw, 24px);
    }

    .modal-contentb p {
        font-size: clamp(14px, 1.5vw, 16px);
    }
}
/* ------------------- آیکون‌های ناوبری ------------------- */
nav .nav-link,
nav .me,
nav #logoutBtn {
    display: flex;
    align-items: center;
    gap: 10px;                    /* فاصله بین آیکون و متن */
    padding: clamp(10px, 2.5vw, 12px) clamp(16px, 4vw, 20px) !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

nav .nav-link i,
nav .me i,
nav #logoutBtn i {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

/* افکت هاور قشنگ */
nav .nav-link:hover i,
nav .me:hover i,
nav #logoutBtn:hover i {
    transform: translateY(-2px) scale(1.1);
}

nav .nav-link.active::before,
nav .me.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #007bff;
    border-radius: 0 4px 4px 0;
}

nav .nav-link.active,
nav .me.active {
    background: rgba(0, 123, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
}

/* برای موبایل: آیکون‌ها بزرگ‌تر و متن مخفی بشه */
@media (max-width: 768px) {
    nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    nav .nav-link,
    nav .me,
    nav #logoutBtn {
        flex-direction: column;
        gap: 6px;
        padding: 12px !important;
        font-size: clamp(11px, 2.5vw, 12px);
    }
    
    nav .nav-link span,
    nav .me span {
        font-size: 10px;
    }
}
/* انیمیشن ورود آیتم‌های منو */
nav a,
nav button {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

nav a:nth-child(1) { animation-delay: 0.1s; }
nav a:nth-child(2) { animation-delay: 0.2s; }
nav a:nth-child(3) { animation-delay: 0.3s; }
nav a:nth-child(4) { animation-delay: 0.4s; }
nav a:nth-child(5) { animation-delay: 0.5s; }
nav a:nth-child(6) { animation-delay: 0.6s; }
nav a:nth-child(7) { animation-delay: 0.7s; }
nav button { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Subscription Section */
#subscriptionSection {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.subscription-container {
    text-align: center;
}

.subscription-container h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #fff;
}

.subtitle {
    color: #aaa;
    margin-bottom: 30px;
}

.vip-plans {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.vip-card {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 15px;
    padding: 20px;
    width: 280px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.vip-card:hover {
    transform: translateY(-10px);
    border-color: #f7931a;
    box-shadow: 0 10px 20px rgba(247, 147, 26, 0.2);
}

.vip-icon {
    font-size: 3rem;
    font-weight: bold;
    color: #f7931a;
    margin-bottom: 10px;
}

.vip-card h3 {
    margin: 10px 0;
    color: #fff;
}

.price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #f7931a;
    margin: 15px 0;
}

.features {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    text-align: left;
    color: #ccc;
}

.features li {
    margin: 8px 0;
    position: relative;
    padding-left: 25px;
}

.features li:before {
    content: '✓';
    color: #4caf50;
    position: absolute;
    left: 0;
}

.select-plan-btn {
    background: #f7931a;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    margin-top: 15px;
    transition: 0.3s;
}

.select-plan-btn:hover {
    background: #e68600;
}

/* Payment Modal */
#subscriptionPaymentModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

#subscriptionPaymentModal .modal-content {
    background: #111;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid #333;
}

#closeSubscriptionModal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
}

#closeSubscriptionModal:hover {
    color: #fff;
}

.wallet-address {
    background: #222;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.wallet-address code {
    color: #f7931a;
    word-break: break-all;
    font-size: 0.9rem;
}

.copy-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.copy-btn:hover {
    background: #f7931a;
}

#paymentForm label {
    display: block;
    margin: 15px 0 5px;
    color: #ccc;
    text-align: left;
}

#txid {
    width: 100%;
    padding: 12px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
}

#paymentForm button {
    background: #f7931a;
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

#paymentForm button:hover {
    background: #e68600;
}

.success-message {
    text-align: center;
    color: #4caf50;
    font-weight: bold;
    margin-top: 20px;
}

.note {
    font-size: 0.9rem;
    color: #aaa;
    margin: 10px 0;
}
.duration {
    font-size: 0.9rem;
    color: #4caf50;
    font-weight: bold;
    margin: 8px 0;
}