/* استایل عمومی */
* {
    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;
    }
}
