/* MidEvils NFT Swap - Styles */

/* Swap-specific variables (use base.css tokens where possible) */
:root {
    --swap-primary: var(--color-info);
    --swap-primary-hover: #7b8ff0;
    --swap-success: var(--color-success);
    --swap-danger: var(--color-danger);
    --swap-bg-dark: #231e18;
}

/* Page-specific override */
body {
    padding: 20px;
}

/* Main Container — glass-morphism */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(138,106,58,0.08) 0%, transparent 50%), rgba(28,24,18,0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(138,106,58,0.35);
    border-radius: 2px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2;
    position: relative;
}

/* Header */
.swap-header {
    text-align: center;
    margin-bottom: 30px;
}

.swap-header h1 {
    font-family: 'Cinzel', serif;
    color: #D4A017;
    font-size: 36px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.beta-tag {
    font-size: 12px;
    background: rgba(212, 160, 23, 0.9);
    color: #1e2520;
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.swap-header p {
    color: var(--color-text-dim);
    font-size: 16px;
    margin-bottom: 20px;
}

/* Navigation */
.swap-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-link {
    font-family: 'Cinzel', serif;
    color: #f8f0e0;
    text-decoration: none;
    padding: 10px 25px;
    border: 2px solid #333;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-link:hover {
    border-color: #667eea;
    color: #667eea;
}

.nav-link.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Wallet Section */
.wallet-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px;
    background: #332c26;
    border-radius: 8px;
}

.wallet-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-status .status-text {
    color: var(--color-text-dim);
    font-size: 14px;
}

.wallet-status.connected .status-text {
    color: #28a745;
}

.connect-btn {
    font-family: 'Cinzel', serif;
    padding: 12px 25px;
    background: linear-gradient(135deg, #ab9ff2 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4);
}

.connect-btn.connected {
    background: #28a745;
}

.disconnect-btn {
    font-family: 'Cinzel', serif;
    padding: 12px 25px;
    background: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.disconnect-btn:hover {
    background: #dc3545;
    color: white;
}

/* Trade Partner Section */
.trade-partner-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #332c26;
    border-radius: 8px;
}

.trade-partner-section h2 {
    font-family: 'Cinzel', serif;
    color: #D4A017;
    font-size: 20px;
    margin-bottom: 15px;
}

.input-row {
    display: flex;
    gap: 15px;
}

.wallet-input {
    flex: 1;
    font-family: 'Crimson Text', serif;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #333;
    border-radius: 5px;
    background: #231e18;
    color: #eee;
    outline: none;
}

.wallet-input:focus {
    border-color: #667eea;
}

.wallet-input::placeholder {
    color: #666;
}

.load-btn {
    font-family: 'Cinzel', serif;
    padding: 12px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.load-btn:hover {
    background: #5568d3;
}

.load-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

/* Loading & Error */
.loading, .error {
    text-align: center;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.loading {
    background: #1e3a5f;
    color: #64b5f6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading .spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(100, 181, 246, 0.3);
    border-top-color: #64b5f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading .loading-text {
    text-align: left;
}

.loading .loading-steps {
    margin-top: 12px;
    font-size: 0.9em;
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 14px;
}

.loading .loading-step {
    font-family: 'Crimson Text', serif;
    padding: 6px 0;
    border-bottom: 1px solid rgba(51, 51, 51, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s, color 0.3s;
}

.loading .loading-step:last-child {
    border-bottom: none;
}

.loading .loading-step.done {
    opacity: 1;
    color: #28a745;
}

.loading .loading-step.done::before {
    content: '\2713';
    font-weight: 700;
    color: #28a745;
}

.loading .loading-step.active {
    opacity: 1;
    color: #D4A017;
    font-weight: 600;
}

.loading .loading-step.active::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border: 2px solid rgba(212, 160, 23, 0.3);
    border-top-color: #D4A017;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading .loading-step.pending {
    opacity: 0.35;
    color: var(--color-text-dim);
}

.loading .loading-step.pending::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border: 1px solid #555;
    border-radius: 50%;
}

.error {
    background: #3d1f1f;
    color: #ef5350;
}

/* Trade Builder */
.trade-builder {
    margin-bottom: 30px;
}

.trade-columns {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
}

.trade-column {
    background: #332c26;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #333;
}

.trade-column.your-offer {
    border-color: #D4A017;
}

.trade-column.you-want {
    border-color: #28a745;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.column-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 20px;
}

.your-offer .column-header h3 {
    color: #D4A017;
}

.you-want .column-header h3 {
    color: #28a745;
}

.selection-count {
    font-size: 14px;
    color: var(--color-text-label);
    background: #231e18;
    padding: 5px 10px;
    border-radius: 15px;
}

/* SOL Input */
.sol-input-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #231e18;
    border-radius: 5px;
}

.sol-input-section label {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-label);
    white-space: nowrap;
}

.sol-input-section label .sol-balance {
    color: #D4A017;
    font-weight: 600;
}

.sol-input-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sol-input {
    width: 100px;
    padding: 8px 10px;
    font-family: 'Crimson Text', serif;
    font-size: 16px;
    border: 2px solid #333;
    border-radius: 5px;
    background: #332c26;
    color: #eee;
    outline: none;
    text-align: right;
}

.sol-input:focus {
    border-color: #667eea;
}

.sol-symbol {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: #D4A017;
    font-weight: 600;
}

/* NFT Selection Area */
.nft-selection-area {
    max-height: 400px;
    overflow-y: auto;
}

.instruction {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-label);
    margin-bottom: 10px;
}

.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* NFT Card */
.nft-card {
    position: relative;
    border: 2px solid #333;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: #231e18;
}

.nft-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: #667eea;
}

.nft-card.selected {
    border-color: #D4A017;
    box-shadow: 0 0 15px rgba(212, 160, 23, 0.5);
}

.nft-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nft-card .nft-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.nft-card .nft-name {
    padding: 8px;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    color: #f8f0e0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #231e18;
}

.nft-card .selection-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    background: #D4A017;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #231e18;
}

.nft-card.selected .selection-indicator {
    display: flex;
}

/* Locked/Staked NFT styles */
.nft-card.not-tradeable {
    opacity: 0.6;
    cursor: not-allowed;
}

.nft-card.not-tradeable:hover {
    transform: none;
    box-shadow: none;
    border-color: #dc3545;
}

.nft-card .lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    pointer-events: none;
}

.nft-card .lock-icon {
    font-size: 24px;
}

.nft-card .lock-reason {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    color: #ff6b6b;
    text-transform: uppercase;
    font-weight: 700;
    text-align: center;
    padding: 2px 6px;
    background: rgba(220, 53, 69, 0.8);
    border-radius: 3px;
}

/* Trade Arrow */
.trade-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.arrow-icon {
    font-size: 40px;
    color: #D4A017;
}

/* Trade Summary */
.trade-summary {
    background: #332c26;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.trade-summary h3 {
    font-family: 'Cinzel', serif;
    color: #D4A017;
    font-size: 22px;
    text-align: center;
    margin-bottom: 20px;
}

.summary-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.summary-side {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    padding: 15px;
    background: #231e18;
    border-radius: 8px;
}

.summary-side h4 {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    margin-bottom: 10px;
}

.summary-side.giving h4 {
    color: #D4A017;
}

.summary-side.receiving h4 {
    color: #28a745;
}

.summary-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.summary-items .placeholder {
    color: #666;
    font-style: italic;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #332c26;
    border-radius: 5px;
    font-size: 13px;
}

.summary-item img {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
}

.summary-item.sol-item {
    color: #D4A017;
    font-weight: 600;
}

.summary-arrow {
    font-size: 30px;
    color: #D4A017;
}

/* Fee Notice */
.fee-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #1e3a5f;
    border-radius: 5px;
    margin: 20px 0;
    color: #64b5f6;
    font-size: 14px;
}

.fee-icon {
    font-size: 18px;
}

/* Create Offer Button */
.create-offer-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 15px 30px;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.create-offer-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
}

.create-offer-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #231e18;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #333;
}

.modal-header h2 {
    font-family: 'Cinzel', serif;
    color: #D4A017;
    font-size: 22px;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 30px;
    color: #888;
    cursor: pointer;
    transition: color 0.3s;
    padding: 0;
    line-height: 1;
}

.close-modal-btn:hover {
    color: #eee;
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    color: #f8f0e0;
    margin-bottom: 20px;
    text-align: center;
}

.offer-link-section {
    margin-bottom: 25px;
}

.offer-link-section label {
    display: block;
    font-size: 14px;
    color: var(--color-text-dim);
    margin-bottom: 10px;
}

.link-copy-row {
    display: flex;
    gap: 10px;
}

.offer-link-input {
    flex: 1;
    padding: 12px;
    font-family: monospace;
    font-size: 13px;
    background: #332c26;
    border: 2px solid #333;
    border-radius: 5px;
    color: #f8f0e0;
}

.copy-btn {
    font-family: 'Cinzel', serif;
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #5568d3;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.view-offers-btn,
.create-another-btn {
    font-family: 'Cinzel', serif;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.view-offers-btn {
    background: #667eea;
    color: white;
    border: none;
}

.view-offers-btn:hover {
    background: #5568d3;
}

.create-another-btn {
    background: transparent;
    color: #f8f0e0;
    border: 2px solid #333;
}

.create-another-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

/* Offers Page Styles */
.offers-section {
    margin-bottom: 30px;
}

.offers-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    font-family: 'Cinzel', serif;
    padding: 15px 20px;
    background: #332c26;
    border: 2px solid #333;
    border-radius: 8px;
    color: #f8f0e0;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tab-btn:hover {
    border-color: #667eea;
}

.tab-btn.active {
    background: #667eea;
    border-color: #667eea;
}

.tab-count {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.tab-content {
    display: none;
}

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

.offers-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Offer Card */
.offer-card {
    position: relative;
    background: #332c26;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.offer-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.offer-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.offer-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.offer-countdown {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-label);
    padding: 4px 8px;
    background: #231e18;
    border-radius: 4px;
}

.offer-countdown.urgent {
    color: #ff6b6b;
    background: rgba(220, 53, 69, 0.2);
    animation: pulse 1s infinite;
}

.offer-countdown.expired {
    color: #6c757d;
    background: rgba(108, 117, 125, 0.2);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.offer-id {
    font-family: monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-label);
}

.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #D4A017;
    color: #231e18;
}

.status-badge.accepted {
    background: #28a745;
    color: white;
}

.status-badge.cancelled {
    background: #dc3545;
    color: white;
}

.status-badge.expired {
    background: #6c757d;
    color: white;
}

.status-badge.completed {
    background: #28a745;
    color: white;
}

.status-badge.escrowed,
.status-badge.release_failed {
    background: #1e3a5f;
    color: #64b5f6;
}

.status-badge.failed {
    background: #dc3545;
    color: white;
}

/* History card styles */
.history-card {
    border-color: #444;
}

.history-card .status-badge.accepted,
.history-card .status-badge.completed {
    background: #28a745;
}

.history-partner {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-label);
}

.offer-card-body {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.offer-preview-side {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.offer-preview-images {
    display: flex;
    gap: 5px;
}

.offer-preview-images img {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    object-fit: cover;
    border: 2px solid #333;
}

.offer-preview-text {
    font-size: 14px;
    color: var(--color-text-dim);
}

.offer-preview-text strong {
    color: #f8f0e0;
}

.offer-preview-arrow {
    font-size: 24px;
    color: #D4A017;
}

.offer-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.offer-meta {
    font-size: 12px;
    color: #666;
}

.offer-card-actions {
    display: flex;
    gap: 10px;
}

.view-offer-btn,
.cancel-offer-btn {
    font-family: 'Cinzel', serif;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.view-offer-btn {
    background: #667eea;
    color: white;
    border: none;
    text-decoration: none;
}

.view-offer-btn:hover {
    background: #5568d3;
}

.cancel-offer-btn {
    background: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
}

.cancel-offer-btn:hover {
    background: #dc3545;
    color: white;
}

/* Offer Detail Page Styles */
.offer-status-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: #332c26;
    border-radius: 8px;
    margin-bottom: 25px;
}

.refresh-offer-btn {
    background: none;
    border: 2px solid #333;
    color: var(--color-text-dim);
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
.refresh-offer-btn:hover {
    border-color: #667eea;
    color: #667eea;
}
.refresh-offer-btn:active {
    transform: rotate(180deg);
}

.expires-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-label);
}

.expires-text.urgent {
    color: #ff6b6b;
    font-weight: 600;
}

.expires-text.expired {
    color: #6c757d;
}

.offer-visualization {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.offer-side {
    background: #332c26;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #333;
}

.offer-side.initiator-side {
    border-color: #D4A017;
}

.offer-side.receiver-side {
    border-color: #28a745;
}

.side-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.side-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    margin-bottom: 5px;
}

.initiator-side .side-header h3 {
    color: #D4A017;
}

.receiver-side .side-header h3 {
    color: #28a745;
}

.wallet-badge {
    font-family: monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-label);
    word-break: break-all;
}

.offer-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.offer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #231e18;
    border-radius: 8px;
    width: 100px;
    flex-shrink: 1;
}

.offer-item img {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    object-fit: cover;
    margin-bottom: 8px;
}

.offer-item .item-name {
    font-size: 11px;
    color: #f8f0e0;
    text-align: center;
    word-break: break-word;
}

.offer-item.sol-item {
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    color: #D4A017;
}

.offer-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Action Buttons */
.offer-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}

.accept-btn,
.decline-btn,
.cancel-btn,
.confirm-btn {
    font-family: 'Cinzel', serif;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.accept-btn {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    border: none;
}

.accept-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
}

.decline-btn,
.cancel-btn {
    background: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
}

.decline-btn:hover,
.cancel-btn:hover {
    background: #dc3545;
    color: white;
}

.retry-release-btn {
    background: #1e3a5f;
    color: #64b5f6;
    border: 1px solid #64b5f6;
    padding: 6px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 8px;
}

.retry-release-btn:hover {
    background: #64b5f6;
    color: #0d1b2a;
}

.confirm-btn {
    background: #667eea;
    color: white;
    border: none;
}

.confirm-btn:hover {
    background: #5568d3;
}

/* Footer */
.swap-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    margin-top: 30px;
}

.swap-footer p {
    color: #666;
    font-size: 14px;
}

.swap-footer a {
    color: #667eea;
    text-decoration: none;
}

.swap-footer a:hover {
    text-decoration: underline;
}

/* Scrollbar Styling */
.nft-selection-area::-webkit-scrollbar {
    width: 8px;
}

.nft-selection-area::-webkit-scrollbar-track {
    background: #231e18;
    border-radius: 4px;
}

.nft-selection-area::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.nft-selection-area::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .trade-columns,
    .offer-visualization {
        grid-template-columns: 1fr;
    }

    .trade-arrow,
    .offer-arrow {
        transform: rotate(90deg);
        padding: 10px 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .swap-header h1 {
        font-size: 24px;
    }

    .swap-header p {
        font-size: 14px;
    }

    .swap-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-link {
        padding: 12px 16px;
        font-size: 13px;
        flex: 1;
        text-align: center;
        min-width: 120px;
    }

    .wallet-section {
        flex-direction: column;
        gap: 12px;
    }

    .connect-btn,
    .disconnect-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }

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

    .wallet-input {
        font-size: 14px;
        padding: 14px;
    }

    .load-btn {
        width: 100%;
        padding: 14px;
    }

    /* Trade columns mobile */
    .trade-column {
        padding: 15px;
    }

    .column-header h3 {
        font-size: 18px;
    }

    .sol-input-section {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

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

    .sol-input {
        width: 100%;
        text-align: left;
        padding: 12px;
    }

    /* NFT grid mobile - larger cards for easier tapping */
    .nft-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }

    .nft-card {
        min-height: 120px;
    }

    .nft-card .nft-image {
        aspect-ratio: 1;
    }

    .nft-card .nft-name {
        padding: 6px;
        font-size: 10px;
    }

    .nft-card .selection-indicator {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .nft-card .lock-overlay {
        gap: 3px;
    }

    .nft-card .lock-icon {
        font-size: 20px;
    }

    .nft-card .lock-reason {
        font-size: 8px;
        padding: 2px 4px;
    }

    /* Offers tabs mobile */
    .offers-tabs {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        flex: 0 0 auto;
        padding: 12px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .tab-count {
        font-size: 11px;
        padding: 2px 8px;
    }

    /* Offer cards mobile */
    .offer-card {
        padding: 15px;
    }

    .offer-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .offer-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .offer-card-body {
        flex-direction: column;
        gap: 10px;
    }

    .offer-preview-side {
        width: 100%;
    }

    .offer-preview-images img {
        width: 45px;
        height: 45px;
    }

    .offer-preview-arrow {
        transform: rotate(90deg);
        font-size: 20px;
    }

    .offer-card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .offer-card-actions {
        display: flex;
        gap: 10px;
    }

    .view-offer-btn,
    .cancel-offer-btn {
        flex: 1;
        text-align: center;
        padding: 12px 16px;
    }

    /* Trade summary mobile */
    .summary-content {
        flex-direction: column;
        gap: 15px;
    }

    .summary-side {
        min-width: 100%;
    }

    .summary-arrow {
        transform: rotate(90deg);
    }

    .create-offer-btn {
        width: 100%;
        max-width: none;
        padding: 16px;
        font-size: 16px;
    }

    /* Offer detail mobile */
    .offer-status-banner {
        flex-direction: column;
        gap: 10px;
    }

    .offer-side {
        padding: 15px;
    }

    .side-header h3 {
        font-size: 16px;
    }

    .offer-items {
        justify-content: center;
    }

    .offer-item {
        width: 80px;
    }

    .offer-item img {
        width: 60px;
        height: 60px;
    }

    .offer-actions {
        flex-direction: column;
        gap: 12px;
    }

    .accept-btn,
    .decline-btn,
    .cancel-btn {
        width: 100%;
        padding: 16px;
    }

    /* Modal mobile */
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .view-offers-btn,
    .create-another-btn {
        width: 100%;
        text-align: center;
    }

    /* Fee notice mobile */
    .fee-notice {
        flex-direction: column;
        text-align: center;
        gap: 5px;
        padding: 12px;
        font-size: 13px;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .container {
        padding: 10px;
    }

    .swap-header h1 {
        font-size: 20px;
    }

    .nft-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .nft-card .nft-name {
        font-size: 9px;
        padding: 4px;
    }

    .offers-tabs {
        gap: 6px;
    }

    .tab-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    .offer-item {
        width: 70px;
        padding: 6px;
    }

    .offer-item img {
        width: 50px;
        height: 50px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects that don't work well on touch */
    .nft-card:hover {
        transform: none;
    }

    .nft-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .offer-card:hover {
        transform: none;
    }

    .offer-card:active {
        transform: scale(0.99);
    }

    /* Larger touch targets */
    .nft-card {
        min-height: 100px;
    }

    button, .nav-link, .view-offer-btn, .cancel-offer-btn {
        min-height: 44px;
    }
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #231e18 25%, #3d362e 50%, #231e18 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Confirmation trade summary */
.confirm-trade-summary {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 15px 0;
    text-align: left;
}
.confirm-trade-summary .confirm-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.confirm-trade-summary .confirm-side strong {
    color: #D4A017;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    margin-bottom: 2px;
}
.confirm-trade-summary .confirm-side span {
    color: #f8f0e0;
    font-size: 13px;
}
.confirm-warning {
    font-size: 12px;
    color: #ef5350;
    margin-top: 10px;
}
.solscan-link {
    color: #64b5f6;
    text-decoration: none;
    font-size: 14px;
}
.solscan-link:hover {
    text-decoration: underline;
}
.offer-card-actions .solscan-link {
    font-family: 'Cinzel', serif;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid #64b5f6;
    transition: all 0.3s;
}
.offer-card-actions .solscan-link:hover {
    background: #64b5f6;
    color: #0d1b2a;
    text-decoration: none;
}

/* Unseen offer indicators */
.nav-link {
    position: relative;
}
.nav-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef5350;
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 4px;
    font-family: 'Crimson Text', serif;
}
.tab-count.has-new {
    background: #ef5350;
    color: white;
    font-weight: 700;
}
.offer-card.unseen-offer {
    border-color: #D4A017;
    box-shadow: 0 0 10px rgba(212, 160, 23, 0.3);
}
.offer-card.unseen-offer::before {
    content: 'NEW';
    display: inline-block;
    background: #D4A017;
    color: #231e18;
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
}

/* Mobile wallet prompt */
.mobile-wallet-prompt p {
    color: #f8f0e0;
    margin-bottom: 12px;
    font-size: 14px;
}
.mobile-wallet-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.mobile-wallet-btn {
    display: inline-block;
    font-family: 'Cinzel', serif;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
}
.mobile-wallet-btn.phantom-btn {
    background: linear-gradient(135deg, #ab9ff2 0%, #7c3aed 100%);
}
.mobile-wallet-btn.phantom-btn:hover {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}
.mobile-wallet-btn.solflare-btn {
    background: linear-gradient(135deg, #fc9c44 0%, #e67a15 100%);
}
.mobile-wallet-btn.solflare-btn:hover {
    box-shadow: 0 4px 12px rgba(230, 122, 21, 0.4);
}

/* Action notices */
.action-notice {
    background: #2a4a6a;
    color: #a8d4ff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    border-left: 4px solid #4a9eff;
}

.success-notice {
    background: #1e5f3a;
    color: #6bf6a0;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #4aff7a;
}

.share-x-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #000 0%, #231e18 100%);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.share-x-btn::before {
    content: '𝕏';
    font-size: 1.15rem;
    font-weight: 900;
}

.share-x-btn:hover {
    background: linear-gradient(135deg, #231e18 0%, #3d362e 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15), 0 0 30px rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.share-x-btn:active {
    transform: translateY(0);
}

/* Blockchain status indicator */
.blockchain-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 15px;
    background: #1a3a5a;
    color: #64b5f6;
    margin-top: 10px;
}

.blockchain-status.on-chain {
    background: #1e5f3a;
    color: #6bf6a0;
}

.blockchain-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* How It Works Section */
.how-it-works {
    margin-bottom: 25px;
    border: 1px solid #3d3d5c;
    border-radius: 8px;
    overflow: hidden;
}

.how-it-works-toggle {
    width: 100%;
    padding: 15px 20px;
    background: rgba(212, 160, 23, 0.1);
    border: none;
    color: #D4A017;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.how-it-works-toggle:hover {
    background: rgba(212, 160, 23, 0.2);
}

.toggle-icon {
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.2s;
}

.how-it-works.open .toggle-icon {
    transform: rotate(45deg);
}

.how-it-works-content {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
}

.how-it-works-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #D4A017;
    color: #231e18;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    flex-shrink: 0;
}

.step-text strong {
    color: #f8f0e0;
    display: block;
    margin-bottom: 4px;
}

.step-text p {
    color: var(--color-text-dim);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.trust-notice {
    background: rgba(212, 160, 23, 0.1);
    border: 1px solid rgba(212, 160, 23, 0.3);
    border-radius: 6px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #b8a88a;
}

.trust-notice strong {
    color: #D4A017;
}

@media (max-width: 600px) {
    .how-it-works-steps {
        gap: 20px;
    }

    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Escrow Recovery Banner */
.escrow-recovery-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #332c26;
    border: 2px solid #e6a817;
    border-radius: 8px;
    margin-bottom: 20px;
}

.escrow-recovery-text {
    flex: 1;
    min-width: 200px;
}

.escrow-recovery-text strong {
    display: block;
    color: #e6a817;
    font-family: 'Cinzel', serif;
    font-size: 15px;
    margin-bottom: 4px;
}

.escrow-recovery-text span {
    color: var(--color-text-dim);
    font-size: 14px;
    line-height: 1.4;
}

.escrow-recovery-error {
    width: 100%;
    color: #ef5350;
    font-size: 13px;
    padding: 8px 12px;
    background: #3d1f1f;
    border-radius: 5px;
}

.escrow-recovery-actions {
    display: flex;
    gap: 10px;
}

.escrow-recovery-retry {
    font-family: 'Cinzel', serif;
    padding: 10px 20px;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.escrow-recovery-retry:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    transform: translateY(-1px);
}

.escrow-recovery-retry:disabled {
    background: #555;
    cursor: not-allowed;
}

.escrow-recovery-dismiss {
    font-family: 'Cinzel', serif;
    padding: 10px 20px;
    background: transparent;
    color: var(--color-text-dim);
    border: 2px solid #555;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.escrow-recovery-dismiss:hover {
    border-color: #dc3545;
    color: #dc3545;
}

@media (max-width: 768px) {
    .escrow-recovery-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .escrow-recovery-actions {
        justify-content: stretch;
    }

    .escrow-recovery-retry,
    .escrow-recovery-dismiss {
        flex: 1;
        text-align: center;
    }
}

/* Wallet Selection Modal */
.wallet-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.wallet-modal-card {
    background: #231e18;
    border: 1px solid rgba(212, 160, 23, 0.3);
    border-radius: 12px;
    width: 340px;
    max-width: 90vw;
    overflow: hidden;
}

.wallet-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(212, 160, 23, 0.15);
    color: #e0d5c0;
    font-size: 16px;
    font-weight: 600;
}

.wallet-modal-close {
    background: none;
    border: none;
    color: #b8a88a;
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.wallet-modal-close:hover {
    color: #e0d5c0;
}

.wallet-modal-list {
    padding: 8px;
}

.wallet-modal-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #e0d5c0;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.wallet-modal-option:hover {
    background: rgba(212, 160, 23, 0.1);
    border-color: rgba(212, 160, 23, 0.3);
}

.wallet-modal-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}
