
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
        }

        body {
            background-color: #000;
            color: #fff;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
        }

        /* Background animation */
        .background-glow {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 20% 30%, rgba(32, 129, 226, 0.15) 0%, transparent 50%),
                        radial-gradient(circle at 80% 70%, rgba(252, 114, 255, 0.1) 0%, transparent 50%);
            z-index: -1;
        }

        /* Header */
        .header {
            width: 100%;
            max-width: 480px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 0;
            margin-bottom: 20px;
        }

        .logo {
            display: flex;
            align-items: center;
            font-size: 24px;
            font-weight: 700;
        }

        .logo i {
            color: rgb(204, 255, 0);
            margin-right: 8px;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .connect-wallet-btn {
            background-color: rgb(204, 255, 0);
            color: rgb(17, 14, 8);
            border: none;
            border-radius: 16px;
            padding: 10px 20px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .connect-wallet-btn:hover {
            background-color: rgb(220, 255, 60);
            transform: translateY(-2px);
        }

        .nav-icons {
            display: flex;
            gap: 15px;
        }

        .nav-icons button {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .nav-icons button:hover {
            background: rgba(255, 255, 255, 0.15);
        }

        /* Chain Selection Modal */
        .chain-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.85);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .chain-modal.active {
            display: flex;
        }

        .chain-modal-content {
            background-color: rgba(19, 19, 19, 0.95);
            border-radius: 24px;
            width: 90%;
            max-width: 400px;
            padding: 30px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            animation: modalFadeIn 0.3s ease;
        }

        @keyframes modalFadeIn {
            from { opacity: 0; transform: translateY(-20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .chain-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
        }

        .chain-modal-title {
            font-size: 22px;
            font-weight: 600;
        }

        .close-modal {
            background: transparent;
            border: none;
            color: #888;
            font-size: 20px;
            cursor: pointer;
            padding: 5px;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .close-modal:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.05);
        }

        .chain-options {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-bottom: 25px;
        }

        .chain-option {
            background-color: rgba(30, 30, 30, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 18px;
            padding: 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: all 0.2s ease;
        }

        .chain-option:hover {
            background-color: rgba(40, 40, 40, 0.9);
            border-color: rgba(204, 255, 0, 0.3);
            transform: translateY(-2px);
        }

        .chain-option.selected {
            background-color: rgba(204, 255, 0, 0.1);
            border-color: rgb(204, 255, 0);
        }

        .chain-logo {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            font-size: 18px;
        }

        .chain-info {
            flex-grow: 1;
        }

        .chain-name {
            font-weight: 600;
            font-size: 18px;
            margin-bottom: 4px;
        }

        .chain-status {
            font-size: 14px;
            color: #aaa;
        }

        .chain-status.connected {
            color: rgb(204, 255, 0);
        }

        .confirm-chain-btn {
            width: 100%;
            padding: 16px;
            border-radius: 20px;
            border: none;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
            background-color: rgb(204, 255, 0);
            color: rgb(17, 14, 8);
        }

        .confirm-chain-btn:hover {
            background-color: rgb(220, 255, 60);
        }

        .confirm-chain-btn:disabled {
            background-color: rgba(204, 255, 0, 0.5);
            color: rgba(17, 14, 8, 0.5);
            cursor: not-allowed;
        }

        /* Chain-specific logo colors */
    /* Chain-specific logo colors - WITH REAL LOGOS */
.sol-logo {
    background-image: url('sol.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.eth-logo {
    background-image: url('eth.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.trx-logo {
    background-image: url('trx.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

        /* Main swap container */
        .swap-container {
            background-color: rgba(19, 19, 19, 0.9);
            border-radius: 24px;
            padding: 20px;
            width: 100%;
            max-width: 480px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            margin-bottom: 30px;
        }

        .swap-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .swap-title {
            font-size: 20px;
            font-weight: 600;
        }

        .swap-settings {
            background: transparent;
            border: none;
            color: #888;
            font-size: 18px;
            cursor: pointer;
            padding: 5px;
            border-radius: 8px;
        }

        .swap-settings:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.05);
        }

        /* Token input sections */
        .token-input {
            background-color: rgba(30, 30, 30, 0.9);
            border-radius: 20px;
            padding: 16px;
            margin-bottom: 12px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .token-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 14px;
            color: #aaa;
        }

        .token-amount {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
        }

        .amount-input {
            background: transparent;
            border: none;
            color: #fff;
            font-size: 28px;
            font-weight: 500;
            width: 70%;
            outline: none;
        }

        .amount-input::placeholder {
            color: #555;
        }

        .token-selector {
            background-color: rgba(40, 40, 40, 0.9);
            border-radius: 18px;
            padding: 10px 16px;
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid rgba(255, 255, 255, 0.05);
            min-width: 140px;
            margin-top: 10px;
        }

        .token-selector:hover {
            background-color: rgba(50, 50, 50, 0.9);
        }

        .token-icon {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            margin-right: 10px;
            flex-shrink: 0;
        }

        .token-name {
            font-weight: 600;
            font-size: 18px;
            white-space: nowrap;
        }

        .token-dropdown {
            margin-left: 8px;
            color: #888;
            font-size: 12px;
        }

        /* Swap direction button */
        .swap-direction {
            display: flex;
            justify-content: center;
            margin: 5px 0;
        }

        .swap-direction-btn {
            background-color: rgba(30, 30, 30, 0.9);
            border: 4px solid #000;
            border-radius: 12px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #fff;
            font-size: 18px;
            transition: all 0.2s ease;
        }

        .swap-direction-btn:hover {
            background-color: rgba(50, 50, 50, 0.9);
        }

        /* Swap button replaced with Connect Wallet */
        .connect-swap-btn {
            width: 100%;
            padding: 18px;
            border-radius: 20px;
            border: none;
            font-size: 18px;
            font-weight: 700;
            cursor: pointer;
            margin-top: 20px;
            transition: all 0.2s ease;
            background-color: rgb(204, 255, 0);
            color: rgb(17, 14, 8);
        }

        .connect-swap-btn:hover {
            background-color: rgb(220, 255, 60);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(204, 255, 0, 0.3);
        }

        .connect-swap-btn:active {
            transform: translateY(0);
        }

        .connect-swap-btn:disabled {
            background-color: rgba(204, 255, 0, 0.5);
            color: rgba(17, 14, 8, 0.5);
            cursor: not-allowed;
        }

        /* Connected state for swap button */
        .swap-execute-btn {
            width: 100%;
            padding: 18px;
            border-radius: 20px;
            border: none;
            font-size: 18px;
            font-weight: 700;
            cursor: pointer;
            margin-top: 20px;
            transition: all 0.2s ease;
            background-color: rgb(204, 255, 0);
            color: rgb(17, 14, 8);
            display: none;
        }

        .swap-execute-btn:hover {
            background-color: rgb(220, 255, 60);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(204, 255, 0, 0.3);
        }

        /* Price info */
        .price-info {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 14px;
            color: #aaa;
            flex-wrap: wrap;
        }

        .price-info > div {
            margin-bottom: 10px;
            min-width: 140px;
        }

        /* Network indicator */
        .network-indicator {
            display: flex;
            align-items: center;
            background-color: rgba(40, 40, 40, 0.9);
            border-radius: 20px;
            padding: 10px 20px;
            margin-top: 20px;
            font-size: 14px;
            flex-wrap: wrap;
        }

        .network-dot {
            width: 8px;
            height: 8px;
            background-color: rgb(204, 255, 0);
            border-radius: 50%;
            margin-right: 10px;
            flex-shrink: 0;
        }

        /* Footer */
        .footer {
            margin-top: 30px;
            text-align: center;
            color: #666;
            font-size: 14px;
            max-width: 480px;
            width: 100%;
        }

        .footer-links {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 10px;
            flex-wrap: wrap;
        }

        .footer-links a {
            color: #888;
            text-decoration: none;
        }

        .footer-links a:hover {
            color: rgb(204, 255, 0);
        }

        /* Mobile menu (hidden by default) */
        .mobile-menu-btn {
            display: none;
            background: transparent;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
        }

        /* Connected wallet indicator */
        .wallet-connected {
            display: flex;
            align-items: center;
            background-color: rgba(204, 255, 0, 0.1);
            border: 1px solid rgba(204, 255, 0, 0.3);
            border-radius: 16px;
            padding: 8px 16px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .wallet-connected:hover {
            background-color: rgba(204, 255, 0, 0.15);
        }

        .wallet-icon {
            margin-right: 8px;
            color: rgb(204, 255, 0);
        }

        .wallet-address {
            max-width: 120px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* Responsive Design */
        
        /* Large Desktop Screens (1200px and above) */
        @media (min-width: 1200px) {
            .swap-container, .header, .footer {
                max-width: 520px;
            }
            
            .token-selector {
                min-width: 160px;
            }
        }
        
        /* Tablet Landscape (1024px to 1199px) */
        @media (min-width: 1024px) and (max-width: 1199px) {
            .swap-container, .header, .footer {
                max-width: 500px;
            }
        }
        
        /* Tablet Portrait (768px to 1023px) */
        @media (min-width: 768px) and (max-width: 1023px) {
            .swap-container, .header, .footer {
                max-width: 460px;
            }
            
            .nav-icons {
                gap: 12px;
            }
            
            .nav-icons button {
                width: 36px;
                height: 36px;
            }
            
            .connect-wallet-btn {
                padding: 8px 16px;
                font-size: 13px;
            }
        }
        
        /* Mobile Landscape (576px to 767px) */
        @media (min-width: 576px) and (max-width: 767px) {
            .swap-container {
                padding: 16px;
                border-radius: 20px;
            }
            
            .header {
                padding: 15px 0;
            }
            
            .logo {
                font-size: 22px;
            }
            
            .header-actions {
                gap: 10px;
            }
            
            .connect-wallet-btn {
                padding: 8px 14px;
                font-size: 12px;
            }
            
            .nav-icons button {
                width: 34px;
                height: 34px;
                font-size: 14px;
            }
            
            .amount-input {
                font-size: 24px;
                width: 65%;
            }
            
            .token-selector {
                min-width: 120px;
                padding: 8px 12px;
            }
            
            .token-name {
                font-size: 16px;
            }
            
            .connect-swap-btn, .swap-execute-btn {
                padding: 16px;
                font-size: 16px;
            }
            
            .price-info > div {
                min-width: 120px;
            }
            
            .chain-modal-content {
                padding: 25px;
            }
        }
        
        /* Mobile Portrait (up to 575px) */
        @media (max-width: 575px) {
            body {
                padding: 15px;
            }
            
            .header {
                padding: 10px 0;
                margin-bottom: 15px;
            }
            
            .logo {
                font-size: 20px;
            }
            
            .header-actions {
                gap: 8px;
            }
            
            .connect-wallet-btn {
                padding: 8px 12px;
                font-size: 11px;
                border-radius: 12px;
            }
            
            .nav-icons {
                gap: 8px;
            }
            
            .nav-icons button {
                width: 32px;
                height: 32px;
                font-size: 13px;
                border-radius: 10px;
            }
            
            .swap-container {
                padding: 15px;
                border-radius: 18px;
                margin-bottom: 20px;
            }
            
            .swap-title {
                font-size: 18px;
            }
            
            .swap-settings {
                font-size: 16px;
            }
            
            .token-input {
                padding: 14px;
                border-radius: 18px;
                margin-bottom: 10px;
            }
            
            .token-label {
                font-size: 13px;
                margin-bottom: 6px;
            }
            
            .token-amount {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .amount-input {
                font-size: 22px;
                width: 100%;
                margin-bottom: 10px;
            }
            
            .token-selector {
                min-width: 100%;
                padding: 10px 14px;
                margin-top: 5px;
            }
            
            .token-name {
                font-size: 16px;
            }
            
            .swap-direction-btn {
                width: 36px;
                height: 36px;
                font-size: 16px;
                border: 3px solid #000;
            }
            
            .connect-swap-btn, .swap-execute-btn {
                padding: 16px;
                font-size: 16px;
                border-radius: 18px;
                margin-top: 15px;
            }
            
            .price-info {
                flex-direction: column;
                gap: 15px;
                margin-top: 15px;
                padding-top: 15px;
            }
            
            .price-info > div {
                min-width: 100%;
            }
            
            .network-indicator {
                font-size: 13px;
                padding: 8px 16px;
                margin-top: 15px;
                justify-content: center;
                text-align: center;
            }
            
            .network-dot {
                margin-right: 8px;
            }
            
            .footer {
                margin-top: 20px;
                font-size: 13px;
            }
            
            .footer-links {
                gap: 15px;
            }
            
            .chain-modal-content {
                padding: 20px;
                width: 95%;
            }
            
            .chain-option {
                padding: 16px;
            }
            
            .chain-logo {
                width: 36px;
                height: 36px;
                font-size: 16px;
            }
            
            .chain-name {
                font-size: 16px;
            }
            
            .chain-status {
                font-size: 13px;
            }
            
            /* Show mobile menu button and hide some nav icons on very small screens */
            @media (max-width: 380px) {
                .mobile-menu-btn {
                    display: block;
                }
                
                .nav-icons {
                    display: none;
                }
                
                .logo {
                    font-size: 18px;
                }
                
                .amount-input {
                    font-size: 20px;
                }
                
                .footer-links {
                    gap: 12px;
                }
                
                .footer-links a {
                    font-size: 12px;
                }
            }
        }
        
        /* Extra small screens (up to 320px) */
        @media (max-width: 320px) {
            body {
                padding: 10px;
            }
            
            .swap-container {
                padding: 12px;
                border-radius: 16px;
            }
            
            .token-input {
                padding: 12px;
            }
            
            .amount-input {
                font-size: 18px;
            }
            
            .token-name {
                font-size: 14px;
            }
            
            .connect-swap-btn, .swap-execute-btn {
                padding: 14px;
                font-size: 15px;
            }
            
            .chain-modal-content {
                padding: 15px;
            }
            
            .chain-option {
                padding: 12px;
            }
        }
        
        /* Fix for very tall screens */
        @media (min-height: 900px) {
            body {
                justify-content: center;
                padding-top: 40px;
                padding-bottom: 40px;
            }
        }
        
        /* Fix for very short screens */
        @media (max-height: 600px) {
            .swap-container {
                margin-bottom: 15px;
            }
            
            .footer {
                margin-top: 15px;
            }
        }
        
        /* Dark mode preference support */
        @media (prefers-color-scheme: dark) {
            /* Already dark theme, no changes needed */
        }
        
        /* High contrast mode support */
        @media (prefers-contrast: high) {
            .swap-container {
                border: 2px solid rgba(255, 255, 255, 0.2);
            }
            
            .token-input {
                border: 2px solid rgba(255, 255, 255, 0.1);
            }
            
            .connect-swap-btn, .swap-execute-btn, .connect-wallet-btn {
                border: 2px solid rgb(17, 14, 8);
            }
        }
        
        /* Reduced motion preference */
        @media (prefers-reduced-motion: reduce) {
            * {
                transition: none !important;
            }
            
            .connect-swap-btn:hover, .swap-execute-btn:hover, .connect-wallet-btn:hover {
                transform: none;
            }
            
            @keyframes modalFadeIn {
                from { opacity: 0; }
                to { opacity: 1; }
            }
        }