/* استایل عمومی */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* تم روز */
.crypto-prices-wrapper[data-theme="light"],
.crypto-exchange-wrapper[data-theme="light"] {
    background: #f5f7fa;
    color: #2c3e50;
}

/* تم شب */
.crypto-prices-wrapper[data-theme="dark"],
.crypto-exchange-wrapper[data-theme="dark"] {
    background: #1a1a2e;
    color: #eaeaea;
}

/* هدر */
.crypto-header,
.exchange-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.crypto-prices-wrapper[data-theme="light"] .crypto-header,
.crypto-exchange-wrapper[data-theme="light"] .exchange-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.crypto-prices-wrapper[data-theme="dark"] .crypto-header,
.crypto-exchange-wrapper[data-theme="dark"] .exchange-header {
    background: #16213e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.crypto-header h2,
.exchange-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* فیلترها */
.crypto-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: all 0.3s;
}

.crypto-prices-wrapper[data-theme="light"] .search-input {
    background: white;
    color: #2c3e50;
}

.crypto-prices-wrapper[data-theme="dark"] .search-input {
    background: #16213e;
    color: #eaeaea;
    border-color: #2d3561;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.view-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.crypto-prices-wrapper[data-theme="light"] .view-btn {
    background: white;
    color: #2c3e50;
}

.crypto-prices-wrapper[data-theme="dark"] .view-btn {
    background: #16213e;
    color: #eaeaea;
}

.view-btn.active {
    background: #3498db;
    color: white;
}

/* جدول قیمت‌ها */
.crypto-table-container {
    overflow-x: auto;
    border-radius: 10px;
}

.crypto-table {
    width: 100%;
    border-collapse: collapse;
}

.crypto-prices-wrapper[data-theme="light"] .crypto-table {
    background: white;
}

.crypto-prices-wrapper[data-theme="dark"] .crypto-table {
    background: #16213e;
}

.crypto-table thead th {
    padding: 15px;
    text-align: right;
    font-weight: 700;
    border-bottom: 2px solid #ddd;
}

.crypto-prices-wrapper[data-theme="dark"] .crypto-table thead th {
    border-bottom-color: #2d3561;
}

.crypto-table tbody tr {
    transition: all 0.3s;
}

.crypto-table tbody tr:hover {
    background: rgba(52, 152, 219, 0.1);
}

.crypto-table tbody td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.crypto-prices-wrapper[data-theme="dark"] .crypto-table tbody td {
    border-bottom-color: #2d3561;
}

.crypto-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crypto-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.crypto-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.crypto-symbol {
    font-size: 12px;
    opacity: 0.7;
}

.crypto-change.positive {
    color: #27ae60;
}

.crypto-change.negative {
    color: #e74c3c;
}

/* تب‌های صرافی */
.exchange-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-radius: 10px;
    padding: 10px;
    flex-wrap: wrap;
}

.crypto-exchange-wrapper[data-theme="light"] .exchange-tabs {
    background: white;
}

.crypto-exchange-wrapper[data-theme="dark"] .exchange-tabs {
    background: #16213e;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.crypto-exchange-wrapper[data-theme="light"] .tab-btn {
    background: #f5f7fa;
    color: #2c3e50;
}

.crypto-exchange-wrapper[data-theme="dark"] .tab-btn {
    background: #1a1a2e;
    color: #eaeaea;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

/* محتوای تب */
.tab-content {
    display: none;
    padding: 20px;
    border-radius: 10px;
}

.tab-content.active {
    display: block;
}

.crypto-exchange-wrapper[data-theme="light"] .tab-content {
    background: white;
}

.crypto-exchange-wrapper[data-theme="dark"] .tab-content {
    background: #16213e;
}

/* فرم صرافی */
.exchange-form {
    max-width: 500px;
    margin: 0 auto;
}

.exchange-form h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.crypto-select,
.form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.crypto-exchange-wrapper[data-theme="light"] .crypto-select,
.crypto-exchange-wrapper[data-theme="light"] .form-group input {
    background: #f5f7fa;
    color: #2c3e50;
}

.crypto-exchange-wrapper[data-theme="dark"] .crypto-select,
.crypto-exchange-wrapper[data-theme="dark"] .form-group input {
    background: #1a1a2e;
    color: #eaeaea;
    border-color: #2d3561;
}

.balance-info {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    opacity: 0.7;
}

/* اطلاعات معامله */
.exchange-info {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
}

.crypto-exchange-wrapper[data-theme="light"] .exchange-info {
    background: #f5f7fa;
}

.crypto-exchange-wrapper[data-theme="dark"] .exchange-info {
    background: #1a1a2e;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.info-row.total {
    font-weight: 700;
    font-size: 18px;
    border-top: 2px solid #ddd;
    margin-top: 10px;
    padding-top: 15px;
}

.crypto-exchange-wrapper[data-theme="dark"] .info-row.total {
    border-top-color: #2d3561;
}

/* دکمه‌ها */
.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-buy {
    background: #27ae60;
    color: white;
}

.btn-buy:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-sell {
    background: #e74c3c;
    color: white;
}

.btn-sell:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-copy {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.btn-copy:hover {
    background: #2980b9;
}

/* کیف پول */
.wallet-info,
.referral-info {
    max-width: 700px;
    margin: 0 auto;
}

.wallet-address {
    margin-bottom: 30px;
}

.address-box,
.code-input {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.address-box input,
.code-input input {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.crypto-exchange-wrapper[data-theme="light"] .address-box input,
.crypto-exchange-wrapper[data-theme="light"] .code-input input {
    background: #f5f7fa;
}

.crypto-exchange-wrapper[data-theme="dark"] .address-box input,
.crypto-exchange-wrapper[data-theme="dark"] .code-input input {
    background: #1a1a2e;
    border-color: #2d3561;
}

.balance-table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.balance-table th,
.balance-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.crypto-exchange-wrapper[data-theme="dark"] .balance-table th,
.crypto-exchange-wrapper[data-theme="dark"] .balance-table td {
    border-bottom-color: #2d3561;
}

.no-balance {
    text-align: center;
    padding: 30px;
    opacity: 0.7;
}

/* معرفی */
.referral-code-box {
    margin: 30px 0;
}

.referral-stats {
    margin-top: 30px;
}

.stat-box {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.crypto-exchange-wrapper[data-theme="light"] .stat-box {
    background: #f5f7fa;
}

.crypto-exchange-wrapper[data-theme="dark"] .stat-box {
    background: #1a1a2e;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #27ae60;
    margin-top: 10px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .crypto-filters {
        flex-direction: column;
    }
    
    .search-input {
        min-width: 100%;
    }
    
    .exchange-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    .crypto-table {
        font-size: 14px;
    }
    
    .crypto-icon {
        width: 30px;
        height: 30px;
    }
    
    .address-box,
    .code-input {
        flex-direction: column;
    }
    
    .crypto-actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
}

/* دکمه‌های عملیات */
.crypto-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.buy-btn {
    background: #27ae60;
    color: white;
}

.buy-btn:hover {
    background: #229954;
}

.sell-btn {
    background: #e74c3c;
    color: white;
}

.sell-btn:hover {
    background: #c0392b;
}

.withdraw-btn {
    background: #3498db;
    color: white;
}

.withdraw-btn:hover {
    background: #2980b9;
}

.login-btn {
    background: #95a5a6;
    color: white;
    text-decoration: none;
    display: inline-block;
}

.login-btn:hover {
    background: #7f8c8d;
}

/* مودال */
.crypto-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.crypto-prices-wrapper[data-theme="dark"] .modal-content,
.crypto-exchange-wrapper[data-theme="dark"] .modal-content {
    background: #16213e;
    color: #eaeaea;
}

.close-modal {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #000;
}

.crypto-prices-wrapper[data-theme="dark"] .close-modal:hover {
    color: #fff;
}

.modal-body {
    margin-top: 20px;
}

.modal-body .form-group {
    margin-bottom: 15px;
}

.modal-body label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.modal-body input,
.modal-body select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.crypto-prices-wrapper[data-theme="dark"] .modal-body input,
.crypto-prices-wrapper[data-theme="dark"] .modal-body select {
    background: #1a1a2e;
    color: #eaeaea;
    border-color: #2d3561;
}

.modal-body small {
    display: block;
    margin-top: 5px;
    opacity: 0.7;
}

.modal-info {
    margin: 15px 0;
    padding: 15px;
    border-radius: 5px;
    background: #f5f7fa;
}

.crypto-prices-wrapper[data-theme="dark"] .modal-info {
    background: #1a1a2e;
}

.modal-info p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

.modal-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn.buy {
    background: #27ae60;
    color: white;
}

.modal-btn.buy:hover {
    background: #229954;
}

.modal-btn.sell {
    background: #e74c3c;
    color: white;
}

.modal-btn.sell:hover {
    background: #c0392b;
}

.modal-btn.withdraw {
    background: #3498db;
    color: white;
}

.modal-btn.withdraw:hover {
    background: #2980b9;
}

.btn-all {
    padding: 10px 16px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-all:hover {
    background: #8e44ad;
    transform: scale(1.05);
}

/* تب شارژ */
.charge-info,
.history-info {
    max-width: 600px;
    margin: 0 auto;
}

.charge-form {
    margin-top: 20px;
}

.quick-amounts {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.quick-btn {
    flex: 1;
    min-width: 100px;
    padding: 10px;
    border: 2px solid #3498db;
    background: transparent;
    color: #3498db;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.quick-btn:hover {
    background: #3498db;
    color: white;
}

.btn-charge {
    background: #f39c12;
    color: white;
}

.btn-charge:hover {
    background: #e67e22;
}

.toman-balance-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.balance-amount {
    font-size: 32px;
    font-weight: 700;
    margin-top: 10px;
}

/* تاریخچه */
.history-table {
    width: 100%;
    margin-top: 20px;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.crypto-exchange-wrapper[data-theme="dark"] .history-table th,
.crypto-exchange-wrapper[data-theme="dark"] .history-table td {
    border-bottom-color: #2d3561;
}

.order-type {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.order-type.buy {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.order-type.sell {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.status-pending {
    color: #f39c12;
}

.status-completed {
    color: #27ae60;
}

.status-cancelled {
    color: #e74c3c;
}

.no-history {
    text-align: center;
    padding: 40px;
    opacity: 0.7;
}


/* Wallet Multi-Network Styles */
.wallet-addresses {
    margin-top: 30px;
}

.wallet-network-box {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(41, 128, 185, 0.1));
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.wallet-network-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.crypto-exchange-wrapper[data-theme="dark"] .wallet-network-box {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(41, 128, 185, 0.15));
    border-color: #5dade2;
}

.network-header {
    margin-bottom: 15px;
}

.network-badge {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.wallet-address-input {
    flex: 1;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: white;
}

.crypto-exchange-wrapper[data-theme="dark"] .wallet-address-input {
    background: #1e2749;
    border-color: #2d3561;
    color: #e0e0e0;
}

.network-info {
    display: block;
    margin-top: 10px;
    color: #666;
    font-size: 12px;
    padding: 8px 12px;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 5px;
    border-right: 3px solid #3498db;
}

.crypto-exchange-wrapper[data-theme="dark"] .network-info {
    color: #aaa;
    background: rgba(52, 152, 219, 0.1);
}

.info-text {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 18px;
    margin: 15px 0;
    font-size: 13px;
    color: #856404;
}

.crypto-exchange-wrapper[data-theme="dark"] .info-text {
    background: rgba(255, 193, 7, 0.15);
    border-color: #ffc107;
    color: #ffca2c;
}
