.wrap,
.wrap * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.wrap {
    width: 100%;
    padding: 20px;
    margin: 20px auto;
    max-width: calc(100vw - 200px);
}

.folded .wrap {
    max-width: calc(100vw - 160px);
}

@media (max-width: 1200px) {
    .wrap {
        max-width: calc(100vw - 120px);
    }

    .folded .wrap {
        max-width: calc(100vw - 100px);
    }
}

@media (max-width: 960px) {
    .wrap {
        max-width: calc(100vw - 80px);
    }

    .folded .wrap {
        max-width: calc(100vw - 60px);
    }
}

@media (max-width: 768px) {
    .wrap {
        max-width: calc(100vw - 40px);
        margin: 15px auto;
        padding: 15px;
    }

    .folded .wrap {
        max-width: calc(100vw - 30px);
    }
}

@media (max-width: 600px) {
    .wrap {
        max-width: calc(100vw - 20px);
        margin: 10px auto;
        padding: 12px;
    }

    .folded .wrap {
        max-width: calc(100vw - 15px);
    }
}

@media (max-width: 480px) {
    .wrap {
        max-width: calc(100vw - 10px);
        margin: 5px auto;
        padding: 10px;
    }

    .folded .wrap {
        max-width: calc(100vw - 5px);
    }
}

.mfcrex-header-info {
    background: linear-gradient(135deg, #1e3c72, #667eea);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.mfcrex-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 45px;
    margin-bottom: 15px;
    gap: 15px;
}

.mfcrex-header-left {
    flex: 0 0 auto;
    margin-right: auto;
}

.mfcrex-header-center {
    flex: 0 0 auto;
}

.mfcrex-header-logo {
    height: 32px;
    width: auto;
}

.mfcrex-header-title {
    font-size: 22px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mfcrex-header-info hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 15px 0;
}

.mfcrex-info-content {
    line-height: 1.6;
}

.mfcrex-info-content p {
    margin-bottom: 15px;
}

.mfcrex-info-content p:last-child {
    margin-bottom: 0;
}

.mfcrex-wallet-section,
.mfcrex-wallet-pool-status,
.mfcrex-wallet-list-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.mfcrex-ethereum {
    border-left: 4px solid #627eea;
}

.mfcrex-tron {
    border-left: 4px solid #ff0013;
}

.mfcrex-bitcoin {
    border-left: 4px solid #f7931a;
}

.mfcrex-solana {
    border-left: 4px solid #9945ff;
}

.mfcrex-wallet-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1e293b;
}

.mfcrex-wallet-pool-status h2,
.mfcrex-wallet-list-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1e293b;
    text-align: center;
}

.mfcrex-input-control {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.mfcrex-input-wrapper input {
    width: 140px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.mfcrex-input-wrapper input:focus {
    outline: none;
    border-color: #6366f1;
}

.mfcrex-input-wrapper label {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.mfcrex-button-controls {
    display: flex;
    gap: 15px;
    flex: 1;
}

.mfcrex-generate-button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    min-width: 180px;
    transition: all 0.2s ease;
}

.mfcrex-generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.mfcrex-ethereum .mfcrex-generate-button {
    background: #627eea;
}

.mfcrex-tron .mfcrex-generate-button {
    background: #ff0013;
}

.mfcrex-bitcoin .mfcrex-generate-button {
    background: #f7931a;
}

.mfcrex-solana .mfcrex-generate-button {
    background: #9945ff;
}

.mfcrex-download-control {
    display: flex;
    gap: 10px;
    flex: 1;
}

.mfcrex-download-control select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 150px;
}

.mfcrex-download-control select:focus {
    outline: none;
    border-color: #6366f1;
}

.mfcrex-download-control button {
    padding: 10px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.mfcrex-download-control button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.mfcrex-wallet-result {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.mfcrex-wallet-item {
    background: white;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 13px;
    word-break: break-all;
    border: 1px solid #f1f5f9;
}

.mfcrex-wallet-item:last-child {
    margin-bottom: 0;
}

.mfcrex-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.mfcrex-network-status {
    padding: 15px;
    border-radius: 8px;
    color: white;
}

.mfcrex-network-status.mfcrex-ethereum {
    background: #627eea;
}

.mfcrex-network-status.mfcrex-tron {
    background: #ff0013;
}

.mfcrex-network-status.mfcrex-bitcoin {
    background: #f7931a;
}

.mfcrex-network-status.mfcrex-solana {
    background: #9945ff;
}

.mfcrex-network-status h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.mfcrex-status-numbers p {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.mfcrex-status-numbers p:last-child {
    margin-bottom: 0;
}

.mfcrex-wallet-table-container {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.wp-list-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 13px;
}

.wp-list-table th {
    background: #f8f9fa;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
}

.wp-list-table td {
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.wp-list-table tbody tr:hover {
    background: #f8f9fa;
}

.mfcrex-wallet-notes {
    width: 100%;
    min-height: 40px;
    padding: 6px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.mfcrex-wallet-notes:focus {
    outline: none;
    border-color: #6366f1;
}

.mfcrex-network-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    display: inline-block;
    width: 80px;
    text-align: center;
}

.mfcrex-network-badge.mfcrex-ethereum {
    background: #627eea;
}

.mfcrex-network-badge.mfcrex-tron {
    background: #ff0013;
}

.mfcrex-network-badge.mfcrex-bitcoin {
    background: #f7931a;
}

.mfcrex-network-badge.mfcrex-solana {
    background: #9945ff;
}

.mfcrex-status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
    display: inline-block;
}

.mfcrex-status-badge.mfcrex-available {
    background: #dcfce7;
    color: #15803d;
}

.mfcrex-status-badge.mfcrex-assigned {
    background: #dbeafe;
    color: #1d4ed8;
}

.mfcrex-action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.mfcrex-action-buttons .button-small {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    background: white;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #374151;
    min-width: 40px;
    text-align: center;
}

.mfcrex-action-buttons .button-link-delete {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.mfcrex-load-more-container {
    text-align: center;
    padding: 20px 0;
    background: #f8f9fa;
}

#mfcrex-load-more {
    padding: 10px 20px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.mfcrex-generate-button.mfcrex-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.mfcrex-generate-button.mfcrex-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: mfcrex-spin 1s linear infinite;
}

@keyframes mfcrex-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.mfcrex-mobile-wallet-list {
    display: none;
}

.mfcrex-mobile-wallet-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mfcrex-mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.mfcrex-mobile-card-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.mfcrex-mobile-card-label {
    font-weight: 700;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    flex-shrink: 0;
}

.mfcrex-mobile-card-content {
    flex: 1;
    margin-left: 10px;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.4;
}

@media (min-width: 1025px) {
    .mfcrex-status-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .wp-list-table th:nth-child(1),
    .wp-list-table td:nth-child(1) {
        width: 5%;
    }

    .wp-list-table th:nth-child(2),
    .wp-list-table td:nth-child(2) {
        width: 10%;
    }

    .wp-list-table th:nth-child(3),
    .wp-list-table td:nth-child(3) {
        width: 30%;
    }

    .wp-list-table th:nth-child(4),
    .wp-list-table td:nth-child(4) {
        width: 10%;
    }

    .wp-list-table th:nth-child(5),
    .wp-list-table td:nth-child(5) {
        width: 8%;
    }

    .wp-list-table th:nth-child(6),
    .wp-list-table td:nth-child(6) {
        width: 12%;
    }

    .wp-list-table th:nth-child(7),
    .wp-list-table td:nth-child(7) {
        width: 15%;
    }

    .wp-list-table th:nth-child(8),
    .wp-list-table td:nth-child(8) {
        width: 10%;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .mfcrex-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wp-list-table {
        font-size: 12px;
    }

    .wp-list-table th,
    .wp-list-table td {
        padding: 6px 4px;
    }

    .wp-list-table th:nth-child(7),
    .wp-list-table td:nth-child(7) {
        max-width: 120px;
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    .mfcrex-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .mfcrex-header-left {
        margin-right: 0;
    }

    .mfcrex-header-title {
        font-size: 18px;
    }

    .mfcrex-input-control {
        flex-direction: column;
        gap: 10px;
    }

    .mfcrex-input-wrapper input {
        width: 100%;
    }

    .mfcrex-button-controls {
        flex-direction: column;
        gap: 10px;
    }

    .mfcrex-generate-button {
        min-width: auto;
        width: 100%;
    }

    .mfcrex-download-control {
        flex-direction: column;
        gap: 8px;
    }

    .mfcrex-download-control button {
        width: 100%;
    }

    .mfcrex-download-control select {
        width: 100%;
    }

    .mfcrex-status-grid {
        grid-template-columns: 1fr;
    }

    .wp-list-table {
        font-size: 11px;
    }

    .wp-list-table th,
    .wp-list-table td {
        padding: 5px 3px;
    }

    .wp-list-table th:nth-child(3),
    .wp-list-table td:nth-child(3) {
        max-width: 150px;
        word-break: break-all;
    }

    .wp-list-table th:nth-child(7),
    .wp-list-table td:nth-child(7) {
        display: none;
    }

    .mfcrex-wallet-table-container {
        display: none;
    }

    .mfcrex-mobile-wallet-list {
        display: block;
    }
}

@media (max-width: 480px) {
    .mfcrex-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .mfcrex-header-left {
        margin-right: 0;
    }

    .mfcrex-header-title {
        font-size: 16px;
    }

    .mfcrex-input-control {
        flex-direction: column;
        gap: 10px;
    }

    .mfcrex-input-wrapper input {
        width: 100%;
    }

    .mfcrex-button-controls {
        flex-direction: column;
        gap: 10px;
    }

    .mfcrex-generate-button {
        min-width: auto;
        width: 100%;
    }

    .mfcrex-download-control {
        flex-direction: column;
        gap: 8px;
    }

    .mfcrex-download-control select {
        width: 100%;
    }

    .mfcrex-download-control button {
        width: 100%;
    }

    .mfcrex-status-grid {
        grid-template-columns: 1fr;
    }

    .mfcrex-wallet-table-container {
        display: none;
    }

    .mfcrex-mobile-wallet-list {
        display: block;
    }

    .mfcrex-mobile-card-row {
        flex-direction: column;
        gap: 5px;
    }

    .mfcrex-mobile-card-label {
        min-width: auto;
    }

    .mfcrex-mobile-card-content {
        margin-left: 0;
        width: 100%;
    }

    .mfcrex-wallet-notes {
        min-height: 50px;
        font-size: 13px;
        width: 100%;
    }

    .mfcrex-action-buttons {
        justify-content: flex-start;
        gap: 8px;
    }

    .mfcrex-action-buttons .button-small {
        min-width: 50px;
        padding: 6px 8px;
        font-size: 11px;
    }
}

.mfcrex-pool-status-banner {
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    padding: 18px 22px;
    margin: 18px 0 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mfcrex-pool-status-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.mfcrex-pool-status-header h2 {
    margin: 0;
    font-size: 16px;
    color: #1d2327;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.mfcrex-pool-status-users {
    font-size: 13px;
    color: #50575e;
}

.mfcrex-pool-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.mfcrex-pool-status-card {
    border: 1px solid #e2e6ea;
    border-left-width: 4px;
    border-radius: 6px;
    padding: 12px 14px;
    background: #fafbfc;
}

.mfcrex-pool-status-card.mfcrex-pool-status-healthy {
    border-left-color: #2e7d32;
}

.mfcrex-pool-status-card.mfcrex-pool-status-low {
    border-left-color: #ed8936;
    background: #fffaf2;
}

.mfcrex-pool-status-card.mfcrex-pool-status-empty {
    border-left-color: #c62828;
    background: #fdf2f2;
}

.mfcrex-pool-status-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 6px;
}

.mfcrex-pool-status-network {
    font-weight: 600;
    font-size: 13px;
    color: #1d2327;
}

.mfcrex-pool-status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.4px;
}

.mfcrex-pool-status-healthy .mfcrex-pool-status-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

.mfcrex-pool-status-low .mfcrex-pool-status-badge {
    background: #fff3e0;
    color: #b25f00;
}

.mfcrex-pool-status-empty .mfcrex-pool-status-badge {
    background: #ffebee;
    color: #c62828;
}

.mfcrex-pool-status-counts {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.mfcrex-pool-status-available {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #1d2327;
}

.mfcrex-pool-status-available-label {
    font-size: 12px;
    color: #50575e;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.mfcrex-pool-status-meta {
    font-size: 12px;
    color: #50575e;
}

.mfcrex-pool-status-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #c62828;
    font-weight: 500;
}

.mfcrex-pool-status-low .mfcrex-pool-status-hint {
    color: #b25f00;
}

.mfcrex-pool-status-tip {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e2e6ea;
    font-size: 12px;
    color: #50575e;
    line-height: 1.5;
}
