/* Trading Widget Styles */
.trading-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    font-family: 'Roboto', Arial, sans-serif;
    color: white;
    z-index: 10000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 90vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.trading-widget:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

/* Widget Header */
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.token-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #00d4ff;
}

.token-details h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #00d4ff;
}

.token-address {
    margin: 0;
    font-size: 12px;
    color: #888;
    font-family: monospace;
}

.price-info {
    text-align: right;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: #00ff88;
    margin-bottom: 5px;
}

.price-change {
    font-size: 14px;
    font-weight: 500;
}

.price-change.positive {
    color: #00ff88;
}

.price-change.negative {
    color: #ff4757;
}

/* Market Stats */
.market-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

/* Wallet Section */
.wallet-section {
    margin-bottom: 20px;
}

.connect-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.wallet-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
}

.balance-info {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* Trading Section */
.trading-section {
    margin-bottom: 20px;
}

.trade-tabs {
    display: flex;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: #888;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: white;
}

.trade-panel {
    display: none;
}

.trade-panel.active {
    display: block;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ccc;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.input-wrapper input::placeholder {
    color: #666;
}

.max-btn {
    position: absolute;
    right: 10px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.max-btn:hover {
    transform: scale(1.05);
}

.arrow-down {
    display: flex;
    justify-content: center;
    margin: 10px 0;
    color: #666;
    font-size: 18px;
}

.trade-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.buy-btn {
    background: linear-gradient(135deg, #00ff88, #00d4ff);
}

.sell-btn {
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
}

.trade-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.trade-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Quick Buy Section */
.quick-buy-section {
    margin-bottom: 20px;
}

.quick-buy-section p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #ccc;
    font-weight: 500;
}

.quick-buy-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.quick-btn {
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

/* Powered By */
.powered-by {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.powered-by p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.powered-by a {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 500;
}

.powered-by a:hover {
    text-decoration: underline;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    transform: translateX(400px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #00ff88, #00d4ff);
}

.notification.error {
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
}

.notification.info {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .trading-widget {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 80vh;
    }
    
    .market-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-item:last-child {
        grid-column: span 2;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Scrollbar Styling */
.trading-widget::-webkit-scrollbar {
    width: 6px;
}

.trading-widget::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.trading-widget::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.5);
    border-radius: 3px;
}

.trading-widget::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.7);
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}
