* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #252542;
    --bg-input: #1a1a2e;
    --accent-blue: #4a90d9;
    --accent-gold: #d4af37;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #6c6c8a;
    --border-color: #3a3a5c;
    --success: #4ade80;
    --warning: #fbbf24;
    --error: #f87171;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    color: var(--text-primary);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(37, 37, 66, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border: 2px solid var(--accent-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent-blue);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-card);
    border-color: var(--accent-blue);
}

.nav-wallet {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.token-balance {
    padding: 0.75rem 1.25rem;
    background: var(--bg-input);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.token-balance span:first-child {
    color: var(--accent-gold);
    font-weight: 600;
}

.token-symbol {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.wallet-address {
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-address:hover {
    background: var(--accent-blue);
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Cards */
.bridge-card,
.transactions-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Bridge Content */
.bridge-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.swap-side {
    flex: 1;
}

.swap-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.swap-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.swap-box:hover {
    border-color: var(--accent-blue);
}

.token-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8960c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: #1a1a2e;
}

.token-info,
.nft-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.token-name,
.nft-name {
    font-weight: 600;
    color: var(--text-primary);
}

.token-amount {
    font-size: 1.125rem;
    color: var(--accent-gold);
    font-weight: 600;
}

.nft-quantity {
    color: var(--accent-blue);
    font-weight: 500;
}

.nft-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    overflow: hidden;
}

.nft-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nft-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.nft-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swap-arrow {
    color: var(--accent-blue);
    padding: 0 1rem;
}

/* Input Section */
.input-section {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.wallet-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', monospace;
    transition: all 0.3s ease;
}

.wallet-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.2);
}

.wallet-input::placeholder {
    color: var(--text-muted);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Price Info */
.price-info {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.price-row.total {
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.price-value {
    font-weight: 500;
}

.price-row.total .price-value {
    color: var(--accent-gold);
}

/* Bridge Button */
.bridge-btn {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #3a7bd5 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bridge-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 217, 0.4);
}

.bridge-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bridge-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--warning);
    margin-top: 1rem;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

/* Transactions */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-input);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.transaction-item.placeholder {
    justify-content: center;
    color: var(--text-muted);
}

.tx-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tx-wallet {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.tx-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tx-amount {
    text-align: right;
}

.tx-tokens {
    color: var(--accent-gold);
    font-weight: 600;
}

.tx-nfts {
    font-size: 0.75rem;
    color: var(--accent-blue);
}

.tx-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tx-status.pending {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
}

.tx-status.completed {
    background: rgba(74, 222, 128, 0.2);
    color: var(--success);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    border: 1px solid var(--border-color);
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-info {
    text-align: center;
}

.modal-info p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.deposit-address {
    background: var(--bg-input);
    padding: 1rem;
    border-radius: 10px;
    font-family: monospace;
    font-size: 0.875rem;
    word-break: break-all;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
}

.modal-wallet {
    font-size: 0.875rem;
}

.modal-wallet span {
    color: var(--accent-blue);
    font-family: monospace;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-btn {
    flex: 1;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.cancel {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.modal-btn.cancel:hover {
    border-color: var(--error);
    color: var(--error);
}

.modal-btn.confirm {
    background: var(--success);
    border: none;
    color: #1a1a2e;
}

.modal-btn.confirm:hover {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .bridge-content {
        flex-direction: column;
    }

    .swap-arrow {
        transform: rotate(90deg);
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 1rem;
    }
}
